Skip to content

Commit 1412fb3

Browse files
committed
use user.pk instead of user.id
1 parent 102c851 commit 1412fb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

oauth2_provider/oauth2_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,9 @@ def get_jwt_bearer_token(self, token, token_handler, request):
792792

793793
def get_claim_dict(self, request):
794794
if self._get_additional_claims_is_request_agnostic():
795-
claims = {"sub": lambda r: str(r.user.id)}
795+
claims = {"sub": lambda r: str(r.user.pk)}
796796
else:
797-
claims = {"sub": str(request.user.id)}
797+
claims = {"sub": str(request.user.pk)}
798798

799799
# https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
800800
if self._get_additional_claims_is_request_agnostic():

0 commit comments

Comments
 (0)