Remove client from sub generator.

This commit is contained in:
juanifioren 2015-03-03 13:39:32 -03:00
parent f60ac01d97
commit 964d649d3d
3 changed files with 3 additions and 4 deletions

2
doc.md
View file

@ -132,7 +132,7 @@ Default is `60*10`.
OPTIONAL. Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client.
Is a function that receives both `user` and `client` objects. Default is:
```python
def default_sub_generator(user, client):
def default_sub_generator(user):
return user.id
```

View file

@ -58,8 +58,7 @@ class TokenEndpoint(object):
def create_response_dic(self):
sub = settings.get('OIDC_IDTOKEN_SUB_GENERATOR')(
user=self.code.user,
client=self.client)
user=self.code.user)
id_token_dic = create_id_token(
iss=settings.get('SITE_URL'),

View file

@ -3,7 +3,7 @@ from django.conf import settings
from oidc_provider.lib.claims import AbstractScopeClaims
def default_sub_generator(user, client):
def default_sub_generator(user):
return user.id