Remove client from sub generator.
This commit is contained in:
parent
f60ac01d97
commit
964d649d3d
3 changed files with 3 additions and 4 deletions
2
doc.md
2
doc.md
|
@ -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.
|
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:
|
Is a function that receives both `user` and `client` objects. Default is:
|
||||||
```python
|
```python
|
||||||
def default_sub_generator(user, client):
|
def default_sub_generator(user):
|
||||||
|
|
||||||
return user.id
|
return user.id
|
||||||
```
|
```
|
||||||
|
|
|
@ -58,8 +58,7 @@ class TokenEndpoint(object):
|
||||||
def create_response_dic(self):
|
def create_response_dic(self):
|
||||||
|
|
||||||
sub = settings.get('OIDC_IDTOKEN_SUB_GENERATOR')(
|
sub = settings.get('OIDC_IDTOKEN_SUB_GENERATOR')(
|
||||||
user=self.code.user,
|
user=self.code.user)
|
||||||
client=self.client)
|
|
||||||
|
|
||||||
id_token_dic = create_id_token(
|
id_token_dic = create_id_token(
|
||||||
iss=settings.get('SITE_URL'),
|
iss=settings.get('SITE_URL'),
|
||||||
|
|
|
@ -3,7 +3,7 @@ from django.conf import settings
|
||||||
from oidc_provider.lib.claims import AbstractScopeClaims
|
from oidc_provider.lib.claims import AbstractScopeClaims
|
||||||
|
|
||||||
|
|
||||||
def default_sub_generator(user, client):
|
def default_sub_generator(user):
|
||||||
|
|
||||||
return user.id
|
return user.id
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue