mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-04 15:27:17 -05:00
Merge pull request #1699 from owncloud/fix-token-ttl
fix token cache TTL
This commit is contained in:
5
changelog/unreleased/fix-tokencache-ttl.md
Normal file
5
changelog/unreleased/fix-tokencache-ttl.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Bugfix: Fix the ttl of the authentication middleware cache
|
||||
|
||||
The authentication cache ttl was multiplied with `time.Second` multiple times. This resulted in a ttl that was not intended.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1699
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -114,7 +113,7 @@ func newOIDCAuth(options Options) func(http.Handler) http.Handler {
|
||||
HTTPClient(options.HTTPClient),
|
||||
OIDCIss(options.OIDCIss),
|
||||
TokenCacheSize(options.UserinfoCacheSize),
|
||||
TokenCacheTTL(time.Second*time.Duration(options.UserinfoCacheTTL)),
|
||||
TokenCacheTTL(options.UserinfoCacheTTL),
|
||||
CredentialsByUserAgent(options.CredentialsByUserAgent),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user