Authenticates users and their API tokens for API requests.
This will handle authenticating users and their API tokens for API requests. It’s only used for API requests that specify a username and a token.
An OAuth2 token authentication backend that handles local sites.
This is similar to
oauth2_provider.backends.OAuth2Backendexcept it ensures the application is enabled and either:
- not limited to a local site; or
- limited to the local site being requested.
verify_request(request, token, user)¶
Ensure the given authentication request is valid.
This method ensures the following:
- The Application being used for authentication is enabled.
- The Local Site the Application is associated with matches the Local Site of the current HTTP request.
- If the Application is associated with a Local Site that site must be accessible to the user performing the authentication.
Whether or not the authentication request is valid.
A specialized WebAPI Basic auth backend that supports e-mail addresses.
Return the credentials supplied in the request.
If the user provides an e-mail address as the username credential, it will be translated to a username.
Parameters: request (django.http.HttpRequest) – The request containing the credentials. Returns: A dictionary of the supplied credentials. Return type: dict