Validate expiration of access_token in UserInfo.
This commit is contained in:
parent
0f03bdfb67
commit
180e0183c5
1 changed files with 3 additions and 0 deletions
|
@ -45,6 +45,9 @@ class UserInfoEndpoint(object):
|
||||||
try:
|
try:
|
||||||
self.token = Token.objects.get(access_token=self.params.access_token)
|
self.token = Token.objects.get(access_token=self.params.access_token)
|
||||||
|
|
||||||
|
if self.token.has_expired():
|
||||||
|
raise UserInfoError('invalid_token')
|
||||||
|
|
||||||
except Token.DoesNotExist:
|
except Token.DoesNotExist:
|
||||||
raise UserInfoError('invalid_token')
|
raise UserInfoError('invalid_token')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue