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