Settings¶
The following settings can be specified in Django settings.py:
MAC Key Length¶
OAUTH2_MAC_KEY_LENGTH
Length of the MAC authentication key. Only used when the authentication method is set to oauth2app.consts.MAC. See Authentication method.
Default 20
Authorization Code Expiration¶
OAUTH2_CODE_EXPIRATION
Number of seconds in which an authorization code should expire.
Default 120
Access Token Expiration¶
OAUTH2_ACCESS_TOKEN_EXPIRATION
Number of seconds in which an access token should expire.
Default 3600
Authentication method¶
OAUTH2_AUTHENTICATION_METHOD
Authentication method. Possible values are oauth2app.consts.MAC and oauth2app.consts.BEARER.
For Bearer see http://tools.ietf.org/html/draft-ietf-oauth-saml2-bearer-03 and http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04
For MAC see http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-00
Default oauth2app.consts.BEARER