Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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