Memleak fixes.

This commit is contained in:
2025-05-09 19:05:24 +01:00
parent 81000a824d
commit da70e69ad1
4 changed files with 120 additions and 30 deletions
+5
View File
@@ -278,6 +278,11 @@ func (tc *TokenCache) Cleanup() {
tc.cache.Cleanup()
}
// Close stops the cleanup goroutine in the underlying cache.
func (tc *TokenCache) Close() {
tc.cache.Close()
}
// exchangeCodeForToken is a convenience function that wraps exchangeTokens specifically
// for the "authorization_code" grant type. It handles the conditional inclusion of the
// PKCE code verifier based on the middleware's configuration (t.enablePKCE).