Skip to content

Commit

Permalink
Merge pull request #1699 from owncloud/fix-token-ttl
Browse files Browse the repository at this point in the history
fix token cache TTL
  • Loading branch information
butonic authored Feb 22, 2021
2 parents bbb94c4 + 7ad38d7 commit 4fffec0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-tokencache-ttl.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions proxy/pkg/middleware/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"net/http"
"regexp"
"strings"
"time"
)

var (
Expand Down Expand Up @@ -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),
)
}
Expand Down

0 comments on commit 4fffec0

Please sign in to comment.