mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Update authentication.py
This commit is contained in:
parent
96318b7265
commit
137b3409c6
1 changed files with 0 additions and 1 deletions
|
@ -44,7 +44,6 @@ class ExpiringTokenAuthentication(TokenAuthentication):
|
||||||
)
|
)
|
||||||
utc_now = datetime.datetime.now(datetime.timezone.utc)
|
utc_now = datetime.datetime.now(datetime.timezone.utc)
|
||||||
if token.created < utc_now - token_duration:
|
if token.created < utc_now - token_duration:
|
||||||
raise ValueError('boom')
|
|
||||||
raise exceptions.AuthenticationFailed(_('Token has expired'))
|
raise exceptions.AuthenticationFailed(_('Token has expired'))
|
||||||
|
|
||||||
return (token.user, token)
|
return (token.user, token)
|
||||||
|
|
Loading…
Reference in a new issue