Validate expiration of access_token in UserInfo.

This commit is contained in:
juanifioren 2015-04-21 17:14:26 -03:00
parent 0f03bdfb67
commit 180e0183c5

View file

@ -45,6 +45,9 @@ class UserInfoEndpoint(object):
try:
self.token = Token.objects.get(access_token=self.params.access_token)
if self.token.has_expired():
raise UserInfoError('invalid_token')
except Token.DoesNotExist:
raise UserInfoError('invalid_token')