def authenticate(self, request: AxesHttpRequest, username: str = None, password: str = None, **kwargs: dict):
if request is None:<EOL><INDENT>raise AxesBackendRequestParameterRequired('<STR_LIT>')<EOL><DEDENT>credentials = get_credentials(username=username, password=password, **kwargs)<EOL>if AxesProxyHandler.is_allowed(request, credentials):<EOL><INDENT>return<EOL><DEDENT>error_msg = get_lockout_message()<EOL>response_context = kwargs.get('<STR_LIT>', {})<EOL>response_context['<STR_LIT:error>'] = error_msg<EOL>raise AxesBackendPermissionDenied('<STR_LIT>')<EOL>
Checks user lockout status and raise a PermissionDenied if user is not allowed to log in.

This method interrupts the login flow and inserts  error message directly to the
``response_context`` attribute that is supplied as a keyword argument.

:keyword response_context: kwarg that will be have its ``error`` attribute updated with context.
:raises AxesBackendRequestParameterRequired: if request parameter is not passed.
:raises AxesBackendPermissionDenied: if user is already locked out.