mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-21 04:57:48 +00:00
gofmt the updated files.
This commit is contained in:
@@ -709,17 +709,17 @@ func (t *TraefikOidc) buildAuthURL(redirectURL, state, nonce string) string {
|
||||
|
||||
// startTokenCleanup starts the token cleanup goroutine
|
||||
func (t *TraefikOidc) startTokenCleanup() {
|
||||
ticker := time.NewTicker(1 * time.Minute) // Run cleanup every minute
|
||||
go func() {
|
||||
defer ticker.Stop()
|
||||
for range ticker.C {
|
||||
t.logger.Debug("Starting token cleanup cycle")
|
||||
t.tokenCache.Cleanup()
|
||||
t.tokenBlacklist.Cleanup()
|
||||
t.jwkCache.Cleanup() // Assuming jwkCache is the cache from cache.go
|
||||
// Removed runtime.GC() call
|
||||
}
|
||||
}()
|
||||
ticker := time.NewTicker(1 * time.Minute) // Run cleanup every minute
|
||||
go func() {
|
||||
defer ticker.Stop()
|
||||
for range ticker.C {
|
||||
t.logger.Debug("Starting token cleanup cycle")
|
||||
t.tokenCache.Cleanup()
|
||||
t.tokenBlacklist.Cleanup()
|
||||
t.jwkCache.Cleanup() // Assuming jwkCache is the cache from cache.go
|
||||
// Removed runtime.GC() call
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// RevokeToken adds the token to the blacklist
|
||||
|
||||
+4
-4
@@ -1782,7 +1782,7 @@ func TestBuildAuthURL(t *testing.T) {
|
||||
issuerURL string
|
||||
redirectURL string
|
||||
state string
|
||||
nonce string
|
||||
nonce string
|
||||
expectedPrefix string
|
||||
}{
|
||||
{
|
||||
@@ -1791,7 +1791,7 @@ func TestBuildAuthURL(t *testing.T) {
|
||||
issuerURL: "https://auth.example.com",
|
||||
redirectURL: "https://app.example.com/callback",
|
||||
state: "test-state",
|
||||
nonce: "test-nonce",
|
||||
nonce: "test-nonce",
|
||||
expectedPrefix: "https://auth.example.com/oauth/authorize?",
|
||||
},
|
||||
{
|
||||
@@ -1800,7 +1800,7 @@ func TestBuildAuthURL(t *testing.T) {
|
||||
issuerURL: "https://logto.example.com",
|
||||
redirectURL: "https://app.example.com/callback",
|
||||
state: "test-state",
|
||||
nonce: "test-nonce",
|
||||
nonce: "test-nonce",
|
||||
expectedPrefix: "https://logto.example.com/oidc/auth?",
|
||||
},
|
||||
{
|
||||
@@ -1809,7 +1809,7 @@ func TestBuildAuthURL(t *testing.T) {
|
||||
issuerURL: "https://auth.example.com:8443",
|
||||
redirectURL: "https://app.example.com/callback",
|
||||
state: "test-state",
|
||||
nonce: "test-nonce",
|
||||
nonce: "test-nonce",
|
||||
expectedPrefix: "https://auth.example.com:8443/sign-in?",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user