Fix a bug that the value of STANDARD_CLAIMS is updated

This commit is contained in:
hpool 2016-11-09 19:21:56 +09:00
parent 155b4598b0
commit acc5b408d1

View file

@ -1,3 +1,5 @@
import copy
from django.utils.translation import ugettext as _
from oidc_provider import settings
@ -16,7 +18,8 @@ class ScopeClaims(object):
def __init__(self, token):
self.user = token.user
self.userinfo = settings.get('OIDC_USERINFO', import_str=True)(STANDARD_CLAIMS, self.user)
claims = copy.deepcopy(STANDARD_CLAIMS)
self.userinfo = settings.get('OIDC_USERINFO', import_str=True)(claims, self.user)
self.scopes = token.scope
self.client = token.client