mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 17:07:33 -02:30
Merge pull request #1449 from rooftopcellist/fix_exp_time
fix token expiration time
This commit is contained in:
@@ -35,7 +35,10 @@ register(
|
|||||||
register(
|
register(
|
||||||
'OAUTH2_PROVIDER',
|
'OAUTH2_PROVIDER',
|
||||||
field_class=OAuth2ProviderField,
|
field_class=OAuth2ProviderField,
|
||||||
default={'ACCESS_TOKEN_EXPIRE_SECONDS': 315360000000, 'AUTHORIZATION_CODE_EXPIRE_SECONDS': 600},
|
default={'ACCESS_TOKEN_EXPIRE_SECONDS': 315360000000,
|
||||||
|
'AUTHORIZATION_CODE_EXPIRE_SECONDS': 600,
|
||||||
|
'REFRESH_TOKEN_EXPIRE_SECONDS': 315360000000
|
||||||
|
},
|
||||||
label=_('OAuth 2 Timeout Settings'),
|
label=_('OAuth 2 Timeout Settings'),
|
||||||
help_text=_('Dictionary for customizing OAuth 2 timeouts, available items are '
|
help_text=_('Dictionary for customizing OAuth 2 timeouts, available items are '
|
||||||
'`ACCESS_TOKEN_EXPIRE_SECONDS`, the duration of access tokens in the number '
|
'`ACCESS_TOKEN_EXPIRE_SECONDS`, the duration of access tokens in the number '
|
||||||
|
|||||||
@@ -340,7 +340,10 @@ AUTHENTICATION_BACKENDS = (
|
|||||||
OAUTH2_PROVIDER_APPLICATION_MODEL = 'main.OAuth2Application'
|
OAUTH2_PROVIDER_APPLICATION_MODEL = 'main.OAuth2Application'
|
||||||
OAUTH2_PROVIDER_ACCESS_TOKEN_MODEL = 'main.OAuth2AccessToken'
|
OAUTH2_PROVIDER_ACCESS_TOKEN_MODEL = 'main.OAuth2AccessToken'
|
||||||
|
|
||||||
OAUTH2_PROVIDER = {}
|
OAUTH2_PROVIDER = {'ACCESS_TOKEN_EXPIRE_SECONDS': 31536000000,
|
||||||
|
'AUTHORIZATION_CODE_EXPIRE_SECONDS': 600,
|
||||||
|
'REFRESH_TOKEN_EXPIRE_SECONDS': 31536000000
|
||||||
|
}
|
||||||
|
|
||||||
# LDAP server (default to None to skip using LDAP authentication).
|
# LDAP server (default to None to skip using LDAP authentication).
|
||||||
# Note: This setting may be overridden by database settings.
|
# Note: This setting may be overridden by database settings.
|
||||||
|
|||||||
Reference in New Issue
Block a user