summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/oauth2/v4/manage/config.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-02 16:42:51 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-02 16:42:51 +0100
commit8488ac928651656c6f7bebf5eaabce62c2b9fb66 (patch)
tree94357311026e5ed96862a647400375a4543dd815 /vendor/github.com/superseriousbusiness/oauth2/v4/manage/config.go
parent[chore] go-swagger -> codeberg (#3856) (diff)
downloadgotosocial-8488ac928651656c6f7bebf5eaabce62c2b9fb66.tar.xz
[chore] migrate oauth2 -> codeberg (#3857)
Diffstat (limited to 'vendor/github.com/superseriousbusiness/oauth2/v4/manage/config.go')
-rw-r--r--vendor/github.com/superseriousbusiness/oauth2/v4/manage/config.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/vendor/github.com/superseriousbusiness/oauth2/v4/manage/config.go b/vendor/github.com/superseriousbusiness/oauth2/v4/manage/config.go
deleted file mode 100644
index 664c0a386..000000000
--- a/vendor/github.com/superseriousbusiness/oauth2/v4/manage/config.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package manage
-
-import "time"
-
-// Config authorization configuration parameters
-type Config struct {
- // access token expiration time, 0 means it doesn't expire
- AccessTokenExp time.Duration
- // refresh token expiration time, 0 means it doesn't expire
- RefreshTokenExp time.Duration
- // whether to generate the refreshing token
- IsGenerateRefresh bool
-}
-
-// RefreshingConfig refreshing token config
-type RefreshingConfig struct {
- // access token expiration time, 0 means it doesn't expire
- AccessTokenExp time.Duration
- // refresh token expiration time, 0 means it doesn't expire
- RefreshTokenExp time.Duration
- // whether to generate the refreshing token
- IsGenerateRefresh bool
- // whether to reset the refreshing create time
- IsResetRefreshTime bool
- // whether to remove access token
- IsRemoveAccess bool
- // whether to remove refreshing token
- IsRemoveRefreshing bool
-}
-
-// default configs
-var (
- DefaultCodeExp = time.Minute * 10
- DefaultAuthorizeCodeTokenCfg = &Config{AccessTokenExp: time.Hour * 2, RefreshTokenExp: time.Hour * 24 * 3, IsGenerateRefresh: true}
- DefaultImplicitTokenCfg = &Config{AccessTokenExp: time.Hour * 1}
- DefaultPasswordTokenCfg = &Config{AccessTokenExp: time.Hour * 2, RefreshTokenExp: time.Hour * 24 * 7, IsGenerateRefresh: true}
- DefaultClientTokenCfg = &Config{AccessTokenExp: time.Hour * 2}
- DefaultRefreshTokenCfg = &RefreshingConfig{IsGenerateRefresh: true, IsRemoveAccess: true, IsRemoveRefreshing: true}
-)