From 669ec9c382d16894eb3f49c5a4fde50c7423d955 Mon Sep 17 00:00:00 2001 From: jakedt Date: Tue, 25 Mar 2014 15:38:16 -0400 Subject: [PATCH] Change the token expiration time to 10 years. --- data/model/oauth.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/model/oauth.py b/data/model/oauth.py index f0076fb42..b99a9cb58 100644 --- a/data/model/oauth.py +++ b/data/model/oauth.py @@ -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