Example #1
0
 def account(self):
     log.debug('CoreListener.account() <<<<')
     account_dict = self.ui_config.get('account') or {}
     if account_dict:
         if 'clientID' in account_dict:
             account_dict['clientID'] = rc4.decrypt(account_dict['clientID'], RC4_KEY)
         if 'authKey' in account_dict:
             account_dict['authKey'] = rc4.decrypt(account_dict['authKey'], RC4_KEY)
     return Account(**account_dict)
Example #2
0
 def account(self):
     log.debug('CoreListener.account() <<<<')
     account_dict = self.ui_config.get('account') or {}
     if account_dict:
         if 'clientID' in account_dict:
             account_dict['clientID'] = rc4.decrypt(
                 account_dict['clientID'], RC4_KEY)
         if 'authKey' in account_dict:
             account_dict['authKey'] = rc4.decrypt(account_dict['authKey'],
                                                   RC4_KEY)
     return Account(**account_dict)
Example #3
0
def unlink(core_client, ui_config):
    account_dict = ui_config.get('account')
    if account_dict:
        if 'clientID' in account_dict:
            account_dict['clientID'] = rc4.decrypt(account_dict['clientID'], RC4_KEY)
        if 'authKey' in account_dict:
            account_dict['authKey'] = rc4.decrypt(account_dict['authKey'], RC4_KEY)
        account = Account(**account_dict)
        ui_config.unset('account')
        ui_config.unset('cloud_home')
        core_client.unlink(account)
        return True
    return False
Example #4
0
def unlink(core_client, ui_config):
    account_dict = ui_config.get("account")
    if account_dict:
        if "clientID" in account_dict:
            account_dict["clientID"] = rc4.decrypt(account_dict["clientID"], RC4_KEY)
        if "authKey" in account_dict:
            account_dict["authKey"] = rc4.decrypt(account_dict["authKey"], RC4_KEY)
        account = Account(**account_dict)
        ui_config.unset("account")
        ui_config.unset("cloud_home")
        core_client.unlink(account)
        return True
    return False
Example #5
0
def unlink(core_client, ui_config):
    account_dict = ui_config.get('account')
    if account_dict:
        if 'clientID' in account_dict:
            account_dict['clientID'] = rc4.decrypt(account_dict['clientID'],
                                                   RC4_KEY)
        if 'authKey' in account_dict:
            account_dict['authKey'] = rc4.decrypt(account_dict['authKey'],
                                                  RC4_KEY)
        account = Account(**account_dict)
        ui_config.unset('account')
        ui_config.unset('cloud_home')
        core_client.unlink(account)
        return True
    return False