File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,12 @@ class AbstractApplication(models.Model):
83
83
created = models .DateTimeField (auto_now_add = True )
84
84
updated = models .DateTimeField (auto_now = True )
85
85
86
+ access_token_expire_seconds = models .IntegerField (
87
+ default = oauth2_settings .ACCESS_TOKEN_EXPIRE_SECONDS
88
+ )
89
+ refresh_token_expire_seconds = models .IntegerField (
90
+ default = oauth2_settings .REFRESH_TOKEN_EXPIRE_SECONDS
91
+ )
86
92
class Meta :
87
93
abstract = True
88
94
Original file line number Diff line number Diff line change 44
44
"READ_SCOPE" : "read" ,
45
45
"WRITE_SCOPE" : "write" ,
46
46
"AUTHORIZATION_CODE_EXPIRE_SECONDS" : 60 ,
47
- "ACCESS_TOKEN_EXPIRE_SECONDS" : 36000 ,
48
- "REFRESH_TOKEN_EXPIRE_SECONDS" : None ,
47
+ "ACCESS_TOKEN_EXPIRE_SECONDS" : 36000 , # 10 hours in seconds
48
+ "REFRESH_TOKEN_EXPIRE_SECONDS" : 31556952 , # 1 year in seconds
49
49
"REFRESH_TOKEN_GRACE_PERIOD_SECONDS" : 0 ,
50
50
"ROTATE_REFRESH_TOKEN" : True ,
51
51
"ERROR_RESPONSE_WITH_SCOPES" : False ,
You can’t perform that action at this time.
0 commit comments