deux.oauth2.backends¶
-
class
deux.oauth2.backends.MFARequestBackend[source]¶ OAuth2 backend class for MFA extending
JSONOAuthLibCore. It extracts extra credentials (mfa_codeandbackup_code) from the request body.-
_get_extra_credentials(body)[source]¶ Gets dictionary of
mfa_codeandbackup_codefrom the body.Parameters: body – The request body in url encoded form. Returns: Dictionary with mfa_codeandbackup_code.
-
create_token_response(request)[source]¶ Overrides the base method to pass in the request body instead of the request because Django only allows the request data stream to be read once.
Parameters: request – The request to create a token response from. Returns: The redirect uri, headers, body, and status of the response.
-