Change the token expiration time to 10 years.
This commit is contained in:
parent
f39793b3ac
commit
669ec9c382
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Reference in a new issue