diff options
author | Jonas Franz <info@jonasfranz.software> | 2019-04-12 09:50:21 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-04-12 15:50:21 +0800 |
commit | 783cd649276c472aa3af97dd311eb4766ff3adfb (patch) | |
tree | b5751426ada7ac3c41d2a65d2b023148b751ec08 /modules | |
parent | 3ff0a126e12109b6c3aceaa229dd1bf229b6ad4b (diff) | |
download | gitea-783cd649276c472aa3af97dd311eb4766ff3adfb.tar.gz gitea-783cd649276c472aa3af97dd311eb4766ff3adfb.zip |
Add option to disable refresh token invalidation (#6584)
* Add option to disable refresh token invalidation
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add integration tests and remove wrong todos
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix typo
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix tests and add documentation
Signed-off-by: Jonas Franz <info@jonasfranz.software>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/user_form.go | 1 | ||||
-rw-r--r-- | modules/setting/setting.go | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go index 78dd75fa1d..810a2f941a 100644 --- a/modules/auth/user_form.go +++ b/modules/auth/user_form.go @@ -172,7 +172,6 @@ type AccessTokenForm struct { ClientID string ClientSecret string RedirectURI string - // TODO Specify authentication code length to prevent against birthday attacks Code string RefreshToken string diff --git a/modules/setting/setting.go b/modules/setting/setting.go index ab290fc4fc..c3d57452c9 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -304,12 +304,14 @@ var ( Enable bool AccessTokenExpirationTime int64 RefreshTokenExpirationTime int64 + InvalidateRefreshTokens bool JWTSecretBytes []byte `ini:"-"` JWTSecretBase64 string `ini:"JWT_SECRET"` }{ Enable: true, AccessTokenExpirationTime: 3600, RefreshTokenExpirationTime: 730, + InvalidateRefreshTokens: false, } U2F = struct { |