Change the token expiration time to 10 years.

This commit is contained in:
jakedt 2014-03-25 15:38:16 -04:00
parent f39793b3ac
commit 669ec9c382

View file

@ -21,6 +21,12 @@ class DatabaseAuthorizationProvider(AuthorizationProvider):
def _generate_data_string(self):
return json.dumps({'username': self.get_authorized_user().username})
@property
def token_expires_in(self):
"""Property method to get the token expiration time in seconds.
"""
return int(60*60*24*365.25*10) # 10 Years
def validate_client_id(self, client_id):
return self.get_application_for_client_id(client_id) is not None