def get_authc_info(self, identifier, session=None):
        """
        If an Account requires credentials from multiple data stores, this
        AccountStore is responsible for aggregating them (composite) and returning
        the results in a single account object.

        :returns: a dict of account attributes
        """
        user = self._get_user_query(session, identifier).first()

        creds = self._get_credential_query(session, identifier).all()
        if not creds:
            return None
        authc_info = {cred_type: {'credential': cred_value, 'failed_attempts': []}
                      for cred_type, cred_value in creds}

        if 'totp_key' in authc_info:
            authc_info['totp_key']['2fa_info'] = {'phone_number': user.phone_number}

        return dict(account_locked=user.account_lock_millis, authc_info=authc_info)
def get_authc_info ( self , identifier , session = None ) : user = self . _get_user_query ( session , identifier ) . first ( ) creds = self . _get_credential_query ( session , identifier ) . all ( ) if not creds : return None authc_info = { cred_type : { 'credential' : cred_value , 'failed_attempts' : [ ] } for cred_type , cred_value in creds } if 'totp_key' in authc_info : authc_info [ 'totp_key' ] [ '2fa_info' ] = { 'phone_number' : user . phone_number } return dict ( account_locked = user . account_lock_millis , authc_info = authc_info )
If an Account requires credentials from multiple data stores, this
        AccountStore is responsible for aggregating them (composite) and returning
        the results in a single account object.

        :returns: a dict of account attributes