Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Frederico Vieira
Gaël Utard
Glauco Junior
Giovanni Giampauli
Hamid Hashemi
Hasan Ramezani
Hiroki Kiyohara
Hossein Shakiba
Expand Down Expand Up @@ -129,4 +130,4 @@ Yuri Savin
Miriam Forner
Alex Kerkum
Tuhin Mitra
q0w
q0w
4 changes: 3 additions & 1 deletion oauth2_provider/oauth2_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,11 @@ def _get_token_from_authentication_server(
expires, timezone=get_timezone(oauth2_settings.AUTHENTICATION_SERVER_EXP_TIME_ZONE)
)

token_checksum = hashlib.sha256(token.encode("utf-8")).hexdigest()
access_token, _created = AccessToken.objects.update_or_create(
token=token,
token_checksum=token_checksum,
defaults={
"token": token,
"user": user,
"application": None,
"scope": scope,
Expand Down
Loading