diff --git a/oidc_provider/lib/endpoints/authorize.py b/oidc_provider/lib/endpoints/authorize.py index 429f74b..b6ca2fe 100644 --- a/oidc_provider/lib/endpoints/authorize.py +++ b/oidc_provider/lib/endpoints/authorize.py @@ -98,7 +98,7 @@ class AuthorizeEndpoint(object): code.client = self.client code.code = uuid.uuid4().hex code.expires_at = timezone.now() + timedelta( - seconds=settings.get('DOP_CODE_EXPIRE')) + seconds=settings.get('OIDC_CODE_EXPIRE')) code.scope = self.params.scope code.save() diff --git a/oidc_provider/lib/endpoints/token.py b/oidc_provider/lib/endpoints/token.py index 4d9ba74..87f73f1 100644 --- a/oidc_provider/lib/endpoints/token.py +++ b/oidc_provider/lib/endpoints/token.py @@ -77,7 +77,7 @@ class TokenEndpoint(object): dic = { 'access_token': token.access_token, 'token_type': 'bearer', - 'expires_in': settings.get('DOP_TOKEN_EXPIRE'), + 'expires_in': settings.get('OIDC_TOKEN_EXPIRE'), 'id_token': id_token, } diff --git a/oidc_provider/lib/endpoints/userinfo.py b/oidc_provider/lib/endpoints/userinfo.py index 745e00d..163dfd5 100644 --- a/oidc_provider/lib/endpoints/userinfo.py +++ b/oidc_provider/lib/endpoints/userinfo.py @@ -61,7 +61,7 @@ class UserInfoEndpoint(object): dic.update(standard_claims.create_response_dic()) - extra_claims = settings.get('DOP_EXTRA_SCOPE_CLAIMS')( + extra_claims = settings.get('OIDC_EXTRA_SCOPE_CLAIMS')( self.token.user, self.token.scope) dic.update(extra_claims.create_response_dic()) diff --git a/oidc_provider/lib/utils/token.py b/oidc_provider/lib/utils/token.py index 64d5660..d24ac7c 100644 --- a/oidc_provider/lib/utils/token.py +++ b/oidc_provider/lib/utils/token.py @@ -15,7 +15,7 @@ def create_id_token_dic(user, iss, aud): Return a dic. """ - expires_in = settings.get('DOP_IDTOKEN_EXPIRE') + expires_in = settings.get('OIDC_IDTOKEN_EXPIRE') now = timezone.now() @@ -62,7 +62,7 @@ def create_token(user, client, id_token_dic, scope): token.refresh_token = uuid.uuid4().hex token.expires_at = timezone.now() + timedelta( - seconds=settings.get('DOP_TOKEN_EXPIRE')) + seconds=settings.get('OIDC_TOKEN_EXPIRE')) token.scope = scope return token diff --git a/oidc_provider/settings.py b/oidc_provider/settings.py index 6add2d6..f557d39 100644 --- a/oidc_provider/settings.py +++ b/oidc_provider/settings.py @@ -3,16 +3,17 @@ from oidc_provider.lib.claims import AbstractScopeClaims # Here goes all the package default settings. + default_settings = { # Required. 'LOGIN_URL': None, 'SITE_URL': None, # Optional. - 'DOP_CODE_EXPIRE': 60*10, - 'DOP_EXTRA_SCOPE_CLAIMS': AbstractScopeClaims, - 'DOP_IDTOKEN_EXPIRE': 60*10, - 'DOP_TOKEN_EXPIRE': 60*60, + 'OIDC_CODE_EXPIRE': 60*10, + 'OIDC_EXTRA_SCOPE_CLAIMS': AbstractScopeClaims, + 'OIDC_IDTOKEN_EXPIRE': 60*10, + 'OIDC_TOKEN_EXPIRE': 60*60, } def get(name):