def authenticate_account(self, authc_token):
try:<EOL><INDENT>identifier = authc_token.identifier<EOL><DEDENT>except AttributeError:<EOL><INDENT>msg = '<STR_LIT>'<EOL>raise AttributeError(msg)<EOL><DEDENT>tc = authc_token.__class__<EOL>try:<EOL><INDENT>verifier = self.token_resolver[tc]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise TypeError('<STR_LIT>', tc.__name__)<EOL><DEDENT>account = self.get_authentication_info(identifier)<EOL>try:<EOL><INDENT>if account.get('<STR_LIT>'):<EOL><INDENT>msg = "<STR_LIT>".format(account['<STR_LIT>'], account['<STR_LIT>'])<EOL>raise LockedAccountException(msg)<EOL><DEDENT><DEDENT>except (AttributeError, TypeError):<EOL><INDENT>if not account:<EOL><INDENT>msg = "<STR_LIT>" + str(identifier)<EOL>raise AccountException(msg)<EOL><DEDENT><DEDENT>self.assert_credentials_match(verifier, authc_token, account)<EOL>return account<EOL>
:type authc_token: authc_abcs.AuthenticationToken
:rtype: dict
:raises IncorrectCredentialsException:  when authentication fails