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