Versions in this module Expand all Collapse all v1 v1.0.33 Aug 24, 2026 Changes in this version + const ConstSessionTimeout + const DefaultLogLevel + const DefaultMemoryMonitorInterval + const DefaultRateLimit + const MinMemoryMonitorInterval + const MinRateLimit + const MinSessionEncryptionKeyLength + const REDACTED + var AccessTokenConfig = TokenConfig + var ClockSkewTolerance = ClockSkewToleranceFuture + var ClockSkewToleranceFuture = 2 * time.Minute + var ClockSkewTolerancePast = 10 * time.Second + var ErrShutdownTimeout = &shutdownTimeoutError + var IDTokenConfig = TokenConfig + var RefreshTokenConfig = TokenConfig + func BuildLogoutURL(endSessionURL, idToken, postLogoutRedirectURI string) (string, error) + func CheckGoroutineLeaks(t *testing.T, initialCount int) + func CleanupGlobalCacheManager() error + func CleanupIdleConnections(client *http.Client, interval time.Duration, stopChan <-chan struct{}) + func CompressTokenOptimized(token string) (string, error) + func CreateDefaultHTTPClient() *http.Client + func CreateHTTPClientWithConfig(config HTTPClientConfig) *http.Client + func CreatePooledHTTPClient(config HTTPClientConfig) *http.Client + func CreateTokenHTTPClient() *http.Client + func DecompressTokenOptimized(compressed string) (string, error) + func ForceGoroutineCleanup() + func GetTestDuration(normal time.Duration) time.Duration + func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error) + func ResetGlobalMemoryMonitor() + func ResetGlobalMemoryOptimizations() + func ResetGlobalSessionCounters() + func ResetGlobalTaskRegistry() + func ResetSingletonNoOpLogger() + func ResetUniversalCacheManagerForTesting() + func SetTestConfig(config *TestConfig) + func ShutdownAllTasks() + func TestCleanupHelper(t *testing.T) + type BackgroundTask struct + func NewBackgroundTask(name string, interval time.Duration, taskFunc func(), logger *Logger, ...) *BackgroundTask + func (bt *BackgroundTask) Start() + func (bt *BackgroundTask) Stop() + type BaseRecoveryMechanism struct + func NewBaseRecoveryMechanism(name string, logger *Logger) *BaseRecoveryMechanism + func (b *BaseRecoveryMechanism) GetBaseMetrics() map[string]interface{} + func (b *BaseRecoveryMechanism) LogDebug(format string, args ...interface{}) + func (b *BaseRecoveryMechanism) LogError(format string, args ...interface{}) + func (b *BaseRecoveryMechanism) LogInfo(format string, args ...interface{}) + func (b *BaseRecoveryMechanism) RecordFailure() + func (b *BaseRecoveryMechanism) RecordRequest() + func (b *BaseRecoveryMechanism) RecordSuccess() + type BoundedCache = CacheInterfaceWrapper + type BoundedCacheAdapter = CacheInterfaceWrapper + type BufferPool struct + func NewBufferPool(maxSize int) *BufferPool + func (p *BufferPool) Get() *bytes.Buffer + func (p *BufferPool) Put(buf *bytes.Buffer) + type Cache = CacheInterfaceWrapper + type CacheAdapter = CacheInterfaceWrapper + type CacheEntry struct + ExpiresAt time.Time + Key string + Value interface{} + type CacheInterface interface + Cleanup func() + Clear func() + Close func() + Delete func(key string) + Get func(key string) (any, bool) + GetStats func() map[string]any + Set func(key string, value any, ttl time.Duration) + SetMaxSize func(size int) + Size func() int + func NewBoundedCache(maxSize int) CacheInterface + func NewCache() CacheInterface + func NewLazyCache() CacheInterface + func NewLazyCacheWithLogger(logger *Logger) CacheInterface + type CacheInterfaceWrapper struct + func NewCacheAdapter(cache interface{}) *CacheInterfaceWrapper + func NewOptimizedCache() *CacheInterfaceWrapper + func NewOptimizedCacheWithConfig(config OptimizedCacheConfig) *CacheInterfaceWrapper + func (c *CacheInterfaceWrapper) Cleanup() + func (c *CacheInterfaceWrapper) Clear() + func (c *CacheInterfaceWrapper) Close() + func (c *CacheInterfaceWrapper) Delete(key string) + func (c *CacheInterfaceWrapper) Get(key string) (interface{}, bool) + func (c *CacheInterfaceWrapper) GetStats() map[string]interface{} + func (c *CacheInterfaceWrapper) Set(key string, value interface{}, ttl time.Duration) + func (c *CacheInterfaceWrapper) SetMaxMemory(bytes int64) + func (c *CacheInterfaceWrapper) SetMaxSize(size int) + func (c *CacheInterfaceWrapper) Size() int + type CacheItem struct + AccessCount int64 + CacheType CacheType + ExpiresAt time.Time + Key string + LastAccessed time.Time + Metadata map[string]interface{} + Size int64 + Value interface{} + type CacheManager struct + func GetGlobalCacheManager(wg *sync.WaitGroup) *CacheManager + func GetGlobalCacheManagerWithConfig(wg *sync.WaitGroup, config *Config) *CacheManager + func (cm *CacheManager) Close() error + func (cm *CacheManager) GetSharedIntrospectionCache() CacheInterface + func (cm *CacheManager) GetSharedJWKCache() JWKCacheInterface + func (cm *CacheManager) GetSharedMetadataCache() *MetadataCache + func (cm *CacheManager) GetSharedRefreshResultCache() CacheInterface + func (cm *CacheManager) GetSharedSessionInvalidationCache() CacheInterface + func (cm *CacheManager) GetSharedTokenBlacklist() CacheInterface + func (cm *CacheManager) GetSharedTokenCache() *TokenCache + func (cm *CacheManager) GetSharedTokenTypeCache() CacheInterface + type CacheMemoryProfiler struct + func NewCacheMemoryProfiler(cache CacheInterface, logger *Logger) *CacheMemoryProfiler + func (cmp *CacheMemoryProfiler) AnalyzeLeaks(baseline, current *MemorySnapshot) *LeakAnalysis + func (cmp *CacheMemoryProfiler) GetCurrentStats() *runtime.MemStats + func (cmp *CacheMemoryProfiler) StartProfiling(config ProfilingConfig) error + func (cmp *CacheMemoryProfiler) StopProfiling() (*MemorySnapshot, error) + func (cmp *CacheMemoryProfiler) TakeSnapshot() (*MemorySnapshot, error) + type CacheStrategy interface + EstimateSize func(item interface{}) int64 + GetEvictionCandidate func() (key string, found bool) + Name func() string + OnAccess func(key string, item interface{}) + OnRemove func(key string) + ShouldEvict func(item interface{}, now time.Time) bool + func NewLRUStrategy(maxSize int) CacheStrategy + type CacheType string + const CacheTypeGeneral + const CacheTypeJWK + const CacheTypeMetadata + const CacheTypeSession + const CacheTypeToken + type ChunkManager struct + func NewChunkManager(logger *Logger) *ChunkManager + func (cm *ChunkManager) CanCreateSession() (bool, error) + func (cm *ChunkManager) CleanupExpiredSessions(force ...bool) + func (cm *ChunkManager) EmergencyCleanup() + func (cm *ChunkManager) GetMemoryStats() map[string]interface{} + func (cm *ChunkManager) GetSessionCount() int + func (cm *ChunkManager) GetToken(singleToken string, compressed bool, chunks map[int]*sessions.Session, ...) TokenRetrievalResult + func (cm *ChunkManager) Shutdown() + type CircuitBreaker struct + func NewCircuitBreaker(config CircuitBreakerConfig, logger *Logger) *CircuitBreaker + func (cb *CircuitBreaker) Execute(fn func() error) error + func (cb *CircuitBreaker) ExecuteWithContext(ctx context.Context, fn func() error) error + func (cb *CircuitBreaker) GetMetrics() map[string]interface{} + func (cb *CircuitBreaker) GetState() CircuitBreakerState + func (cb *CircuitBreaker) IsAvailable() bool + func (cb *CircuitBreaker) Reset() + type CircuitBreakerConfig struct + MaxFailures int + ResetTimeout time.Duration + Timeout time.Duration + func DefaultCircuitBreakerConfig() CircuitBreakerConfig + type CircuitBreakerState int + const CircuitBreakerClosed + const CircuitBreakerHalfOpen + const CircuitBreakerOpen + type ClientAssertionSigner struct + func NewClientAssertionSigner(pemBytes []byte, alg, kid string) (*ClientAssertionSigner, error) + func (s *ClientAssertionSigner) Sign(audience, clientID string) (string, error) + type ClientRegistrationError struct + Error string + ErrorDescription string + type ClientRegistrationMetadata struct + ApplicationType string + ClientName string + ClientURI string + Contacts []string + DefaultACRValues []string + DefaultMaxAge int + GrantTypes []string + JWKSURI string + LogoURI string + PolicyURI string + RedirectURIs []string + RequireAuthTime bool + ResponseTypes []string + Scope string + SubjectType string + TOSURI string + TokenEndpointAuthMethod string + type ClientRegistrationResponse struct + ApplicationType string + ClientID string + ClientIDIssuedAt int64 + ClientName string + ClientSecret string + ClientSecretExpiresAt int64 + ClientURI string + Contacts []string + GrantTypes []string + JWKSURI string + LogoURI string + PolicyURI string + RedirectURIs []string + RegistrationAccessToken string + RegistrationClientURI string + ResponseTypes []string + Scope string + SubjectType string + TOSURI string + TokenEndpointAuthMethod string + type Config struct + AllowOpaqueTokens bool + AllowPrivateIPAddresses bool + AllowedClaims []string + AllowedRolesAndGroups []string + AllowedUserDomains []string + AllowedUsers []string + Audience string + BackchannelLogoutURL string + BearerEmitWWWAuthenticate bool + BearerFailurePenaltySeconds int + BearerFailureThreshold int + BearerFailureWindowSeconds int + BearerIdentifierClaim string + BearerOverridesCookie bool + BypassSourceRanges []string + CACertPEM string + CACertPath string + CallbackURL string + ClientAssertionAlg string + ClientAssertionKeyID string + ClientAssertionKeyPath string + ClientAssertionPrivateKey string + ClientAuthMethod string + ClientID string + ClientSecret string + CookieDomain string + CookiePath string + CookiePrefix string + DisableReplayDetection bool + DynamicClientRegistration *DynamicClientRegistrationConfig + EnableBackchannelLogout bool + EnableBearerAuth bool + EnableFrontchannelLogout bool + EnablePKCE bool + ExcludedURLs []string + ExtraAuthParams map[string]string + ForceHTTPS bool + FrontchannelLogoutURL string + GroupClaimName string + HTTPClient *http.Client + Headers []TemplatedHeader + InsecureSkipVerify bool + IntrospectionURL string + LogLevel string + LogoutURL string + MaxIdentifierLength int + MaxRefreshTokenAgeSeconds int + MaxTokenAgeSeconds int64 + MinimalHeaders bool + OIDCEndSessionURL string + OverrideScopes bool + PostLogoutRedirectURI string + ProviderURL string + RateLimit int + Redis *RedisConfig + RefreshGracePeriodSeconds int + RequireTokenIntrospection bool + RevocationURL string + RoleClaimName string + Scopes []string + SecurityHeaders *SecurityHeadersConfig + SessionEncryptionKey string + SessionMaxAge int + StrictAudienceValidation bool + StripAuthCookies bool + StripAuthorizationHeader bool + UserIdentifierClaim string + func CreateConfig() *Config + func (c *Config) GetSecurityHeadersApplier() func(http.ResponseWriter, *http.Request) + func (c *Config) Validate() error + func (c Config) MarshalJSON() ([]byte, error) + func (c Config) MarshalYAML() (interface{}, error) + type DCRCredentialsStore interface + Delete func(ctx context.Context, providerURL string) error + Exists func(ctx context.Context, providerURL string) (bool, error) + Load func(ctx context.Context, providerURL string) (*ClientRegistrationResponse, error) + Save func(ctx context.Context, providerURL string, creds *ClientRegistrationResponse) error + func NewDCRCredentialsStore(config *DynamicClientRegistrationConfig, cacheManager *CacheManager, ...) (DCRCredentialsStore, error) + type DCRStorageBackend = dcrstorage.StorageBackend + const DCRStorageBackendAuto + const DCRStorageBackendFile + const DCRStorageBackendRedis + type DoublyLinkedList struct + func NewDoublyLinkedList() *DoublyLinkedList + func (l *DoublyLinkedList) PopFront() interface{} + type DynamicClientRegistrar struct + func NewDynamicClientRegistrar(httpClient *http.Client, logger *Logger, ...) *DynamicClientRegistrar + func NewDynamicClientRegistrarWithStore(httpClient *http.Client, logger *Logger, ...) *DynamicClientRegistrar + func (r *DynamicClientRegistrar) GetCachedResponse() *ClientRegistrationResponse + func (r *DynamicClientRegistrar) RegisterClient(ctx context.Context, registrationEndpoint string) (*ClientRegistrationResponse, error) + func (r *DynamicClientRegistrar) SetStore(store DCRCredentialsStore) + type DynamicClientRegistrationConfig struct + ClientMetadata *ClientRegistrationMetadata + CredentialsFile string + Enabled bool + InitialAccessToken string + PersistCredentials bool + RedisKeyPrefix string + RegistrationEndpoint string + StorageBackend string + type EdgeCaseGenerator struct + func NewEdgeCaseGenerator() *EdgeCaseGenerator + func (g *EdgeCaseGenerator) GenerateHTTPRequestEdgeCases() []*http.Request + func (g *EdgeCaseGenerator) GenerateIntegerEdgeCases() []int + func (g *EdgeCaseGenerator) GenerateStringEdgeCases() []string + func (g *EdgeCaseGenerator) GenerateTimeEdgeCases() []time.Time + type ErrorRecoveryManager struct + func NewErrorRecoveryManager(logger *Logger) *ErrorRecoveryManager + func (erm *ErrorRecoveryManager) ExecuteWithRecovery(ctx context.Context, serviceName string, fn func() error) error + func (erm *ErrorRecoveryManager) GetCircuitBreaker(serviceName string) *CircuitBreaker + func (erm *ErrorRecoveryManager) GetRecoveryMetrics() map[string]interface{} + type ErrorRecoveryMechanism interface + ExecuteWithContext func(ctx context.Context, fn func() error) error + GetMetrics func() map[string]interface{} + IsAvailable func() bool + Reset func() + type FileCredentialsStore = fileStoreWrapper + func NewFileCredentialsStore(basePath string, logger *Logger) *FileCredentialsStore + type GenericCache struct + func NewGenericCache(ttl time.Duration, logger *Logger) *GenericCache + func (gc *GenericCache) Delete(key string) + func (gc *GenericCache) Get(key string) (interface{}, bool) + func (gc *GenericCache) Set(key string, value interface{}) + func (gc *GenericCache) Stop() + type GlobalTestCleanup struct + func (g *GlobalTestCleanup) CleanupAll() + func (g *GlobalTestCleanup) RegisterCache(cache interface{ ... }) + func (g *GlobalTestCleanup) RegisterServer(server *httptest.Server) + func (g *GlobalTestCleanup) RegisterTask(task *BackgroundTask) + type GoroutineManager struct + func NewGoroutineManager(logger *Logger) *GoroutineManager + func (m *GoroutineManager) GetStatus() map[string]GoroutineStatus + func (m *GoroutineManager) Shutdown(timeout time.Duration) error + func (m *GoroutineManager) StartGoroutine(name string, fn func(context.Context)) + func (m *GoroutineManager) StartPeriodicTask(name string, interval time.Duration, task func()) + func (m *GoroutineManager) StopGoroutine(name string) + type GoroutinePool struct + func NewGoroutinePool(maxWorkers int, logger *Logger) *GoroutinePool + func (p *GoroutinePool) PendingTasks() int64 + func (p *GoroutinePool) Shutdown(ctx context.Context) error + func (p *GoroutinePool) Submit(task func()) error + func (p *GoroutinePool) Wait() + func (p *GoroutinePool) WaitWithTimeout(timeout time.Duration) bool + type GoroutineStatus struct + Name string + Running bool + Runtime time.Duration + StartTime time.Time + type GracefulDegradation struct + func NewGracefulDegradation(config GracefulDegradationConfig, logger *Logger) *GracefulDegradation + func (gd *GracefulDegradation) Close() + func (gd *GracefulDegradation) ExecuteWithContext(ctx context.Context, fn func() error) error + func (gd *GracefulDegradation) ExecuteWithFallback(serviceName string, primary func() (interface{}, error)) (interface{}, error) + func (gd *GracefulDegradation) GetDegradedServices() []string + func (gd *GracefulDegradation) GetMetrics() map[string]interface{} + func (gd *GracefulDegradation) IsAvailable() bool + func (gd *GracefulDegradation) RegisterFallback(serviceName string, fallback func() (interface{}, error)) + func (gd *GracefulDegradation) RegisterHealthCheck(serviceName string, healthCheck func() bool) + func (gd *GracefulDegradation) Reset() + type GracefulDegradationConfig struct + EnableFallbacks bool + HealthCheckInterval time.Duration + RecoveryTimeout time.Duration + func DefaultGracefulDegradationConfig() GracefulDegradationConfig + type GzipReaderPool struct + func NewGzipReaderPool() *GzipReaderPool + func (p *GzipReaderPool) Get() *gzip.Reader + func (p *GzipReaderPool) Put(r *gzip.Reader) + type GzipWriterPool struct + func NewGzipWriterPool() *GzipWriterPool + func (p *GzipWriterPool) Get() *gzip.Writer + func (p *GzipWriterPool) Put(w *gzip.Writer) + type HTTPClientConfig struct + DialTimeout time.Duration + DisableCompression bool + DisableKeepAlives bool + ExpectContinueTimeout time.Duration + ForceHTTP2 bool + IdleConnTimeout time.Duration + InsecureSkipVerify bool + KeepAlive time.Duration + MaxConnsPerHost int + MaxIdleConns int + MaxIdleConnsPerHost int + MaxRedirects int + ReadBufferSize int + ResponseHeaderTimeout time.Duration + RootCAs *x509.CertPool + TLSHandshakeTimeout time.Duration + Timeout time.Duration + UseCookieJar bool + WriteBufferSize int + func DefaultHTTPClientConfig() HTTPClientConfig + func OIDCProviderHTTPClientConfig() HTTPClientConfig + func TokenHTTPClientConfig() HTTPClientConfig + type HTTPClientFactory struct + func NewHTTPClientFactory() *HTTPClientFactory + func (f *HTTPClientFactory) CreateDefaultClient() *http.Client + func (f *HTTPClientFactory) CreateHTTPClient(config HTTPClientConfig) *http.Client + func (f *HTTPClientFactory) CreateTokenClient() *http.Client + func (f *HTTPClientFactory) ValidateHTTPClientConfig(config *HTTPClientConfig) error + type HTTPClientProfiler struct + func NewHTTPClientProfiler(client *http.Client, logger *Logger) *HTTPClientProfiler + func (hcp *HTTPClientProfiler) AnalyzeLeaks(baseline, current *MemorySnapshot) *LeakAnalysis + func (hcp *HTTPClientProfiler) GetCurrentStats() *runtime.MemStats + func (hcp *HTTPClientProfiler) StartProfiling(config ProfilingConfig) error + func (hcp *HTTPClientProfiler) StopProfiling() (*MemorySnapshot, error) + func (hcp *HTTPClientProfiler) TakeSnapshot() (*MemorySnapshot, error) + type HTTPError struct + Message string + StatusCode int + func (e *HTTPError) Error() string + type InputValidationConfig struct + AllowPrivateIPAddresses bool + MaxClaimLength int + MaxEmailLength int + MaxHeaderLength int + MaxTokenLength int + MaxURLLength int + MaxUsernameLength int + StrictMode bool + func DefaultInputValidationConfig() InputValidationConfig + type InputValidator struct + func NewInputValidator(config InputValidationConfig, logger *Logger) (*InputValidator, error) + func (iv *InputValidator) SanitizeInput(input string, maxLength int) string + func (iv *InputValidator) ValidateBoundaryValues(value interface{}, min, max int64) ValidationResult + func (iv *InputValidator) ValidateClaim(claimName, claimValue string) ValidationResult + func (iv *InputValidator) ValidateEmail(email string) ValidationResult + func (iv *InputValidator) ValidateHeader(headerName, headerValue string) ValidationResult + func (iv *InputValidator) ValidateToken(token string) ValidationResult + func (iv *InputValidator) ValidateURL(urlStr string) ValidationResult + func (iv *InputValidator) ValidateUsername(username string) ValidationResult + type IntrospectionResponse struct + Active bool + Aud interface{} + ClientID string + Exp int64 + Iat int64 + Iss string + Jti string + Nbf int64 + Scope string + Sub string + TokenType string + Username string + type JWK struct + Alg string + Crv string + E string + KeyOps []string + Kid string + Kty string + N string + Use string + X string + Y string + func (jwk *JWK) ToECDSAPublicKey() (*ecdsa.PublicKey, error) + func (jwk *JWK) ToRSAPublicKey() (*rsa.PublicKey, error) + type JWKCache struct + func NewJWKCache() *JWKCache + func (c *JWKCache) Cleanup() + func (c *JWKCache) Close() + func (c *JWKCache) GetJWKS(ctx context.Context, jwksURL string, httpClient *http.Client) (*JWKSet, error) + func (c *JWKCache) GetPublicKey(ctx context.Context, jwksURL, kid string, httpClient *http.Client) (crypto.PublicKey, error) + type JWKCacheConfig struct + MaxKeyAge time.Duration + MinRefreshTime time.Duration + RefreshInterval time.Duration + type JWKCacheInterface interface + Cleanup func() + Close func() + GetJWKS func(ctx context.Context, jwksURL string, httpClient *http.Client) (*JWKSet, error) + GetPublicKey func(ctx context.Context, jwksURL, kid string, httpClient *http.Client) (crypto.PublicKey, error) + type JWKSet struct + Keys []JWK + func (jwks *JWKSet) GetKey(kid string) *JWK + type JWT struct + Claims map[string]interface{} + Header map[string]interface{} + Signature []byte + Token string + func (j *JWT) Verify(issuerURL, expectedAudience string, skipReplayCheck ...bool) error + type JWTVerifier interface + VerifyJWTSignatureAndClaims func(jwt *JWT, token string) error + type LRUStrategy struct + func (s *LRUStrategy) EstimateSize(item interface{}) int64 + func (s *LRUStrategy) GetEvictionCandidate() (key string, found bool) + func (s *LRUStrategy) Name() string + func (s *LRUStrategy) OnAccess(key string, item interface{}) + func (s *LRUStrategy) OnRemove(key string) + func (s *LRUStrategy) ShouldEvict(item interface{}, now time.Time) bool + type LazyBackgroundTask struct + func NewLazyBackgroundTask(name string, interval time.Duration, taskFunc func(), logger *Logger, ...) *LazyBackgroundTask + func (lt *LazyBackgroundTask) StartIfNeeded() + func (lt *LazyBackgroundTask) Stop() + type LeakAnalysis struct + GoroutineIncrease int + HasLeak bool + LeakDescription string + MemoryIncrease uint64 + Recommendations []string + SuspectedLeaks []string + type LeakDetectionConfig struct + CacheMemoryThreshold uint64 + EnableLeakDetection bool + GoroutineLeakThreshold int + HTTPClientThreshold int + LeakThresholdMB uint64 + SessionPoolThreshold int + TokenCompressionThreshold uint64 + type ListNode struct + Key string + Next *ListNode + Prev *ListNode + Value interface{} + type Logger struct + func GetSingletonNoOpLogger() *Logger + func NewLogger(logLevel string) *Logger + func (l *Logger) Debug(format string, args ...interface{}) + func (l *Logger) Debugf(format string, args ...interface{}) + func (l *Logger) Error(format string, args ...interface{}) + func (l *Logger) Errorf(format string, args ...interface{}) + func (l *Logger) Info(format string, args ...interface{}) + func (l *Logger) Infof(format string, args ...interface{}) + func (l *Logger) IsDebug() bool + type LogoutTokenClaims struct + Audience interface{} + Events map[string]interface{} + IssuedAt int64 + Issuer string + JTI string + Nonce string + SessionID string + Subject string + type MemoryAlertThresholds struct + GCFrequency float64 + GoroutineCount int + GoroutineGrowthRate float64 + HeapGrowthRateMB float64 + HeapSizeMB uint64 + func DefaultMemoryAlertThresholds() MemoryAlertThresholds + type MemoryLeakTestCase struct + Description string + GCBetweenRuns bool + Iterations int + MaxGoroutineGrowth int + MaxMemoryGrowthMB float64 + Name string + Operation func() error + Setup func() error + Teardown func() error + Timeout time.Duration + type MemoryMonitor struct + func GetGlobalMemoryMonitor() *MemoryMonitor + func NewMemoryMonitor(logger *Logger, thresholds MemoryAlertThresholds) *MemoryMonitor + func NewMemoryMonitorWithConfig(logger *Logger, thresholds MemoryAlertThresholds, config MemoryMonitorConfig) *MemoryMonitor + func (mm *MemoryMonitor) GetCurrentStats() *MemoryStats + func (mm *MemoryMonitor) GetMemoryPressure() MemoryPressureLevel + func (mm *MemoryMonitor) IsMonitoringActive() bool + func (mm *MemoryMonitor) LogMemoryStats(stats *MemoryStats) + func (mm *MemoryMonitor) Refresh() *MemoryStats + func (mm *MemoryMonitor) StartMonitoring(ctx context.Context, interval time.Duration) + func (mm *MemoryMonitor) StopMonitoring() + func (mm *MemoryMonitor) TriggerGC() + type MemoryMonitorConfig struct + Interval time.Duration + func DefaultMemoryMonitorConfig() MemoryMonitorConfig + type MemoryOptimizations struct + func GetMemoryOptimizations() *MemoryOptimizations + func (m *MemoryOptimizations) GetSingletonLogger(level string) *Logger + type MemoryPressureLevel int + const MemoryPressureCritical + const MemoryPressureHigh + const MemoryPressureLow + const MemoryPressureModerate + const MemoryPressureNone + func (mpl MemoryPressureLevel) String() string + type MemoryProfiler interface + AnalyzeLeaks func(baseline, current *MemorySnapshot) *LeakAnalysis + GetCurrentStats func() *runtime.MemStats + StartProfiling func(config ProfilingConfig) error + StopProfiling func() (*MemorySnapshot, error) + TakeSnapshot func() (*MemorySnapshot, error) + type MemorySnapshot struct + CustomMetrics map[string]interface{} + GoroutineProfile []byte + HeapProfile []byte + RuntimeStats runtime.MemStats + Timestamp time.Time + type MemoryStats struct + CacheSize int64 + ConnectionPools int + GCFrequency float64 + GCSysBytes uint64 + HeapAllocBytes uint64 + HeapIdleBytes uint64 + HeapInuseBytes uint64 + HeapObjects uint64 + HeapReleasedBytes uint64 + HeapSysBytes uint64 + LastGCTime time.Time + MemoryPressure MemoryPressureLevel + NumGoroutines int + SessionCount int + StackInuseBytes uint64 + StackSysBytes uint64 + TaskCount int + Timestamp time.Time + type MemoryTestOrchestrator struct + func GetGlobalTestOrchestrator() *MemoryTestOrchestrator + func NewMemoryTestOrchestrator(config LeakDetectionConfig, logger *Logger) *MemoryTestOrchestrator + func (mto *MemoryTestOrchestrator) GetAllLeakAnalyses() map[string]*LeakAnalysis + func (mto *MemoryTestOrchestrator) GetLeakAnalysis(componentName string) (*LeakAnalysis, bool) + func (mto *MemoryTestOrchestrator) RegisterComponent(name string, profiler MemoryProfiler) + func (mto *MemoryTestOrchestrator) StartLeakDetection() error + func (mto *MemoryTestOrchestrator) StopLeakDetection() error + func (mto *MemoryTestOrchestrator) UnregisterComponent(name string) + type MetadataCache struct + func NewFixedMetadataCache(args ...interface{}) *MetadataCache + func NewMetadataCache(wg *sync.WaitGroup) *MetadataCache + func NewMetadataCacheWithLogger(wg *sync.WaitGroup, logger *Logger) *MetadataCache + func (mc *MetadataCache) CleanupExpired() + func (mc *MetadataCache) Clear() + func (mc *MetadataCache) Close() + func (mc *MetadataCache) Delete(key string) + func (mc *MetadataCache) Get(providerURL string) (*ProviderMetadata, bool) + func (mc *MetadataCache) GetMetadata(providerURL string, httpClient *http.Client, logger *Logger) (*ProviderMetadata, error) + func (mc *MetadataCache) GetMetadataWithRecovery(providerURL string, httpClient *http.Client, logger *Logger, ...) (*ProviderMetadata, error) + func (mc *MetadataCache) GetMetrics() map[string]interface{} + func (mc *MetadataCache) GetProviderMetadata(ctx context.Context, providerURL string, httpClient *http.Client) (*ProviderMetadata, error) + func (mc *MetadataCache) GetStats() map[string]interface{} + func (mc *MetadataCache) Mutex() *sync.RWMutex + func (mc *MetadataCache) Set(providerURL string, metadata *ProviderMetadata, ttl time.Duration) error + func (mc *MetadataCache) Size() int + type MetadataCacheConfig struct + ExtendedGracePeriod time.Duration + GracePeriod time.Duration + MaxGracePeriod time.Duration + SecurityCriticalFields []string + SecurityCriticalMaxGracePeriod time.Duration + type MetadataCacheEntry struct + type MetadataCacheResilienceConfig struct + EnableProgressiveGracePeriod bool + ExtendedGracePeriod time.Duration + InitialGracePeriod time.Duration + MaxGracePeriod time.Duration + SecurityCriticalFields []string + SecurityCriticalMaxGracePeriod time.Duration + func DefaultMetadataCacheResilienceConfig() MetadataCacheResilienceConfig + func (config MetadataCacheResilienceConfig) GetEffectiveMaxGracePeriod(fieldName string) time.Duration + func (config MetadataCacheResilienceConfig) IsSecurityCriticalField(fieldName string) bool + type MetadataSnapshot struct + AuthURL string + EndSessionURL string + IntrospectionURL string + IssuerURL string + JWKSURL string + RegistrationURL string + RevocationURL string + TokenURL string + type OIDCError struct + Cause error + Code string + Context map[string]interface{} + Message string + func NewOIDCError(code, message string, cause error) *OIDCError + func (e *OIDCError) Error() string + func (e *OIDCError) Unwrap() error + func (e *OIDCError) WithContext(key string, value interface{}) *OIDCError + type OptimizedCache = CacheInterfaceWrapper + type OptimizedCacheConfig = UniversalCacheConfig + type OptimizedMiddlewareConfig struct + AggressiveConnectionCleanup bool + DelayBackgroundTasks bool + MinimalCacheSize bool + ReducedCleanupIntervals bool + func DefaultOptimizedConfig() *OptimizedMiddlewareConfig + type PerformanceTestHelper struct + func NewPerformanceTestHelper() *PerformanceTestHelper + func (h *PerformanceTestHelper) GetAverageTime() time.Duration + func (h *PerformanceTestHelper) GetPercentile(percentile float64) time.Duration + func (h *PerformanceTestHelper) Measure(fn func()) time.Duration + func (h *PerformanceTestHelper) Reset() + type ProfilingConfig struct + EnableContinuousMonitoring bool + EnableGoroutineProfiling bool + EnableHeapProfiling bool + LeakThresholdMB uint64 + MaxSnapshots int + MonitoringInterval time.Duration + SnapshotInterval time.Duration + type ProfilingManager struct + func GetGlobalProfilingManager() *ProfilingManager + func NewProfilingManager(logger *Logger) *ProfilingManager + func (pm *ProfilingManager) AnalyzeLeaks(baseline, current *MemorySnapshot) *LeakAnalysis + func (pm *ProfilingManager) GetCurrentStats() *runtime.MemStats + func (pm *ProfilingManager) GetRegisteredProfilers() []string + func (pm *ProfilingManager) RegisterProfiler(name string, profiler MemoryProfiler) + func (pm *ProfilingManager) StartProfiling(config ProfilingConfig) error + func (pm *ProfilingManager) StopProfiling() (*MemorySnapshot, error) + func (pm *ProfilingManager) TakeSnapshot() (*MemorySnapshot, error) + func (pm *ProfilingManager) UnregisterProfiler(name string) + type ProviderMetadata struct + AuthURL string + EndSessionURL string + IntrospectionURL string + Issuer string + JWKSURL string + RegistrationURL string + RevokeURL string + ScopesSupported []string + TokenURL string + type RedisConfig struct + Address string + CacheMode string + CircuitBreakerThreshold int + CircuitBreakerTimeout int + ConnectTimeout int + DB int + EnableCircuitBreaker bool + EnableHealthCheck bool + EnableTLS bool + Enabled bool + HealthCheckInterval int + HybridL1MemoryMB int64 + HybridL1Size int + KeyPrefix string + Password string + PoolSize int + ReadTimeout int + TLSSkipVerify bool + WriteTimeout int + func (r RedisConfig) MarshalJSON() ([]byte, error) + func (r RedisConfig) MarshalYAML() (interface{}, error) + func (rc *RedisConfig) ApplyDefaults() + func (rc *RedisConfig) ApplyEnvFallbacks() + func (rc *RedisConfig) Validate() error + type RedisCredentialsStore = redisStoreWrapper + func NewRedisCredentialsStore(cache *UniversalCache, keyPrefix string, logger *Logger) *RedisCredentialsStore + type RefreshCircuitBreaker struct + func (cb *RefreshCircuitBreaker) AllowRequest() bool + func (cb *RefreshCircuitBreaker) GetState() string + func (cb *RefreshCircuitBreaker) RecordFailure() + func (cb *RefreshCircuitBreaker) RecordSuccess() + type RefreshCircuitBreakerConfig struct + HalfOpenRequests int + MaxFailures int + OpenDuration time.Duration + type RefreshCoordinator struct + func NewRefreshCoordinator(config RefreshCoordinatorConfig, logger *Logger) *RefreshCoordinator + func (rc *RefreshCoordinator) CoordinateRefresh(ctx context.Context, sessionID string, refreshToken string, ...) (*TokenResponse, error) + func (rc *RefreshCoordinator) GetMetrics() map[string]interface{} + func (rc *RefreshCoordinator) Shutdown() + type RefreshCoordinatorConfig struct + CleanupInterval time.Duration + DeduplicationCleanupDelay time.Duration + EnableMemoryPressureDetection bool + MaxConcurrentRefreshes int + MaxRefreshAttempts int + MemoryPressureThresholdMB uint64 + RefreshAttemptWindow time.Duration + RefreshCooldownPeriod time.Duration + RefreshTimeout time.Duration + func DefaultRefreshCoordinatorConfig() RefreshCoordinatorConfig + type RefreshMetrics struct + type ResourceManager struct + func GetResourceManager() *ResourceManager + func (rm *ResourceManager) AddReference(instanceID string) + func (rm *ResourceManager) GetCache(key string) interface{} + func (rm *ResourceManager) GetGoroutinePool(key string, maxWorkers int) *GoroutinePool + func (rm *ResourceManager) GetHTTPClient(key string) *http.Client + func (rm *ResourceManager) GetReferenceCount(instanceID string) int32 + func (rm *ResourceManager) IsTaskRunning(name string) bool + func (rm *ResourceManager) RegisterBackgroundTask(name string, interval time.Duration, taskFunc func()) error + func (rm *ResourceManager) RemoveReference(instanceID string) + func (rm *ResourceManager) Shutdown(ctx context.Context) error + func (rm *ResourceManager) StartBackgroundTask(name string) error + func (rm *ResourceManager) StopBackgroundTask(name string) error + type RetryConfig struct + BackoffFactor float64 + EnableJitter bool + InitialDelay time.Duration + MaxAttempts int + MaxDelay time.Duration + RetryableErrors []string + func DefaultRetryConfig() RetryConfig + func MetadataFetchRetryConfig() RetryConfig + type RetryExecutor struct + func NewRetryExecutor(config RetryConfig, logger *Logger) *RetryExecutor + func (re *RetryExecutor) Execute(ctx context.Context, fn func() error) error + func (re *RetryExecutor) ExecuteWithContext(ctx context.Context, fn func() error) error + func (re *RetryExecutor) GetMetrics() map[string]interface{} + func (re *RetryExecutor) IsAvailable() bool + func (re *RetryExecutor) Reset() + type ScopeFilter struct + func NewScopeFilter(logger ScopeFilterLogger) *ScopeFilter + func (sf *ScopeFilter) EnsureOpenIDScope(scopes []string) []string + func (sf *ScopeFilter) FilterSupportedScopes(requestedScopes, supportedScopes []string, providerURL string) []string + type ScopeFilterLogger interface + Debugf func(format string, args ...interface{}) + Errorf func(format string, args ...interface{}) + Infof func(format string, args ...interface{}) + type SecurityHeadersConfig struct + CORSAllowCredentials bool + CORSAllowedHeaders []string + CORSAllowedMethods []string + CORSAllowedOrigins []string + CORSEnabled bool + CORSMaxAge int + ContentSecurityPolicy string + ContentTypeOptions string + CrossOriginEmbedderPolicy string + CrossOriginOpenerPolicy string + CrossOriginResourcePolicy string + CustomHeaders map[string]string + DisablePoweredByHeader bool + DisableServerHeader bool + Enabled bool + FrameOptions string + PermissionsPolicy string + Profile string + ReferrerPolicy string + StrictTransportSecurity bool + StrictTransportSecurityMaxAge int + StrictTransportSecurityPreload bool + StrictTransportSecuritySubdomains bool + XSSProtection string + type SessionChunkManager struct + func NewSessionChunkManager(maxChunks int) *SessionChunkManager + func (m *SessionChunkManager) CleanupChunks(chunks map[int]*sessions.Session, w http.ResponseWriter) + func (m *SessionChunkManager) CompactChunks(chunks map[int]*sessions.Session) map[int]*sessions.Session + func (m *SessionChunkManager) GetChunkCount(chunks map[int]*sessions.Session) int + func (m *SessionChunkManager) SafeSetChunk(chunks map[int]*sessions.Session, index int, session *sessions.Session) bool + func (m *SessionChunkManager) ValidateAndCleanChunks(chunks map[int]*sessions.Session) bool + type SessionData struct + func (sd *SessionData) Clear(r *http.Request, w http.ResponseWriter) error + func (sd *SessionData) GetAccessToken() string + func (sd *SessionData) GetAuthenticated() bool + func (sd *SessionData) GetCSRF() string + func (sd *SessionData) GetCodeVerifier() string + func (sd *SessionData) GetIDToken() string + func (sd *SessionData) GetIDTokenClaims(parser func(string) (map[string]interface{}, error)) (map[string]interface{}, error) + func (sd *SessionData) GetIncomingPath() string + func (sd *SessionData) GetNonce() string + func (sd *SessionData) GetRedirectCount() int + func (sd *SessionData) GetRefreshToken() string + func (sd *SessionData) GetRefreshTokenIssuedAt() time.Time + func (sd *SessionData) GetUserIdentifier() string + func (sd *SessionData) IncrementRedirectCount() + func (sd *SessionData) IsDirty() bool + func (sd *SessionData) MarkDirty() + func (sd *SessionData) Reset() + func (sd *SessionData) ResetRedirectCount() + func (sd *SessionData) ReturnToPool() + func (sd *SessionData) Save(r *http.Request, w http.ResponseWriter) error + func (sd *SessionData) SetAccessToken(token string) + func (sd *SessionData) SetAuthenticated(value bool) error + func (sd *SessionData) SetCSRF(token string) + func (sd *SessionData) SetCodeVerifier(codeVerifier string) + func (sd *SessionData) SetIDToken(token string) + func (sd *SessionData) SetIncomingPath(path string) + func (sd *SessionData) SetNonce(nonce string) + func (sd *SessionData) SetRefreshToken(token string) + func (sd *SessionData) SetUserIdentifier(userIdentifier string) + type SessionEntry struct + ExpiresAt time.Time + LastUsed time.Time + Session *sessions.Session + SizeEstimate int64 + type SessionError struct + Cause error + Message string + Operation string + SessionID string + func NewSessionError(operation, message string, cause error) *SessionError + func (e *SessionError) Error() string + func (e *SessionError) Unwrap() error + func (e *SessionError) WithSessionID(sessionID string) *SessionError + type SessionManager struct + func NewSessionManager(encryptionKey string, forceHTTPS bool, cookieDomain string, ...) (*SessionManager, error) + func (sm *SessionManager) CleanupOldCookies(w http.ResponseWriter, r *http.Request) + func (sm *SessionManager) EnhanceSessionSecurity(options *sessions.Options, r *http.Request) *sessions.Options + func (sm *SessionManager) GetCookiePrefix() string + func (sm *SessionManager) GetSession(r *http.Request) (*SessionData, error) + func (sm *SessionManager) GetSessionMetrics() map[string]interface{} + func (sm *SessionManager) GetSessionStats() map[string]interface{} + func (sm *SessionManager) PeriodicChunkCleanup() + func (sm *SessionManager) Shutdown() error + func (sm *SessionManager) ValidateSessionHealth(sessionData *SessionData) error + type SessionPoolProfiler struct + func NewSessionPoolProfiler(sm *SessionManager, logger *Logger) *SessionPoolProfiler + func (spp *SessionPoolProfiler) AnalyzeLeaks(baseline, current *MemorySnapshot) *LeakAnalysis + func (spp *SessionPoolProfiler) GetCurrentStats() *runtime.MemStats + func (spp *SessionPoolProfiler) StartProfiling(config ProfilingConfig) error + func (spp *SessionPoolProfiler) StopProfiling() (*MemorySnapshot, error) + func (spp *SessionPoolProfiler) TakeSnapshot() (*MemorySnapshot, error) + type ShardedCache struct + func NewShardedCache(numShards int, maxSize int) *ShardedCache + func (c *ShardedCache) Cleanup() + func (c *ShardedCache) Clear() + func (c *ShardedCache) Delete(key string) + func (c *ShardedCache) Exists(key string) bool + func (c *ShardedCache) Get(key string) (interface{}, bool) + func (c *ShardedCache) Set(key string, value interface{}, ttl time.Duration) + func (c *ShardedCache) ShardStats() []int + func (c *ShardedCache) Size() int + type SharedTransportPool struct + func GetGlobalTransportPool() *SharedTransportPool + func (p *SharedTransportPool) Cleanup() + func (p *SharedTransportPool) GetOrCreateTransport(config HTTPClientConfig) *http.Transport + func (p *SharedTransportPool) ReleaseTransport(transport *http.Transport) + type SimplifiedSessionData struct + func NewSimplifiedSessionData() *SimplifiedSessionData + func (s *SimplifiedSessionData) Clear() + func (s *SimplifiedSessionData) GetToken(name string) (string, bool) + func (s *SimplifiedSessionData) SetToken(name, value string) + type TableTestCase struct + Description string + Expected interface{} + ExpectedError error + Input interface{} + Name string + Parallel bool + Setup func(*testing.T) error + SkipReason string + Tags []string + Teardown func(*testing.T) error + Timeout time.Duration + type TaskCircuitBreaker struct + func NewTaskCircuitBreaker(failureThreshold int32, timeout time.Duration, logger *Logger) *TaskCircuitBreaker + func (cb *TaskCircuitBreaker) CanCreateTask(taskName string) error + func (cb *TaskCircuitBreaker) OnTaskComplete(taskName string) + func (cb *TaskCircuitBreaker) OnTaskFailure(taskName string, err error) + func (cb *TaskCircuitBreaker) OnTaskStart(taskName string) + func (cb *TaskCircuitBreaker) OnTaskSuccess(taskName string) + type TaskMemoryMonitor struct + func GetGlobalTaskMemoryMonitor(logger *Logger) *TaskMemoryMonitor + func NewTaskMemoryMonitor(logger *Logger, registry *TaskRegistry) *TaskMemoryMonitor + func (mm *TaskMemoryMonitor) ForceGC() (before, after TaskMemoryStats, err error) + func (mm *TaskMemoryMonitor) GetCurrentStats() (TaskMemoryStats, error) + func (mm *TaskMemoryMonitor) GetStatsHistory() []TaskMemoryStats + func (mm *TaskMemoryMonitor) Start(interval time.Duration) error + func (mm *TaskMemoryMonitor) Stop() + type TaskMemoryStats struct + ActiveTasks int + AllocObjects uint64 + FreeObjects uint64 + Goroutines int + HeapAlloc uint64 + HeapSys uint64 + NumGC uint32 + Timestamp time.Time + type TaskRegistry struct + func GetGlobalTaskRegistry() *TaskRegistry + func (tr *TaskRegistry) CreateSingletonTask(name string, interval time.Duration, taskFunc func(), logger *Logger, ...) (*BackgroundTask, error) + func (tr *TaskRegistry) GetTask(name string) (*BackgroundTask, bool) + func (tr *TaskRegistry) GetTaskCount() int + func (tr *TaskRegistry) RegisterTask(name string, task *BackgroundTask) error + func (tr *TaskRegistry) StopAllTasks() + func (tr *TaskRegistry) UnregisterTask(name string) + type TemplatedHeader struct + Name string + Value string + type TestCacheEntry struct + ExpiresAt time.Time + Metadata map[string]interface{} + Token string + type TestConfig struct + CacheSize int + CleanupInterval time.Duration + ConcurrencyTest bool + DefaultTimeout time.Duration + ExtendedTests bool + GoroutineGrowth int + LeakDetection bool + LongTests bool + MaxConcurrency int + MaxIterations int + MemoryStressTest bool + MemoryThreshold float64 + QuickMode bool + func GetTestConfig() *TestConfig + func NewTestConfig() *TestConfig + func (c *TestConfig) AdjustConcurrencyParams(requested int) int + func (c *TestConfig) AdjustMemoryLeakTestCase(testCase *MemoryLeakTestCase) + func (c *TestConfig) EnableExtendedTests() + func (c *TestConfig) EnableLongTests() + func (c *TestConfig) EnableStressTests() + func (c *TestConfig) GetCacheSize() int + func (c *TestConfig) GetCleanupInterval() time.Duration + func (c *TestConfig) ShouldSkipTest(t *testing.T, testType TestType) bool + type TestDataFactory struct + func NewTestDataFactory() *TestDataFactory + func (f *TestDataFactory) GenerateRandomString(length int) string + func (f *TestDataFactory) GenerateTestHTTPRequest() *http.Request + func (f *TestDataFactory) GenerateTestSession() *UnifiedMockSession + func (f *TestDataFactory) GenerateTestToken() string + type TestSuiteRunner struct + func NewTestSuiteRunner() *TestSuiteRunner + func (r *TestSuiteRunner) RunMemoryLeakTests(t *testing.T, tests []MemoryLeakTestCase) + func (r *TestSuiteRunner) RunTests(t *testing.T, tests []TableTestCase) + func (r *TestSuiteRunner) SetAfterEach(fn func(*testing.T)) + func (r *TestSuiteRunner) SetBeforeEach(fn func(*testing.T)) + func (r *TestSuiteRunner) SetParallel(parallel bool) + func (r *TestSuiteRunner) SetTimeout(timeout time.Duration) + type TestType int + const TestTypeConcurrencyStress + const TestTypeExtended + const TestTypeLeakDetection + const TestTypeLong + const TestTypeMemoryStress + const TestTypeQuick + func (tt TestType) String() string + type TokenCache struct + func NewTokenCache() *TokenCache + func (tc *TokenCache) Cleanup() + func (tc *TokenCache) Clear() + func (tc *TokenCache) Close() + func (tc *TokenCache) Delete(token string) + func (tc *TokenCache) Get(token string) (map[string]interface{}, bool) + func (tc *TokenCache) Set(token string, claims map[string]interface{}, expiration time.Duration) + type TokenCacheConfig struct + BlacklistTTL time.Duration + EnableTokenRotation bool + RefreshTokenTTL time.Duration + type TokenConfig struct + AllowOpaqueTokens bool + MaxChunkSize int + MaxChunks int + MaxLength int + MinLength int + RequireJWTFormat bool + Type string + type TokenError struct + Cause error + Message string + Reason string + TokenType string + func NewTokenError(tokenType, reason, message string, cause error) *TokenError + func (e *TokenError) Error() string + func (e *TokenError) Unwrap() error + type TokenExchanger interface + ExchangeCodeForToken func(ctx context.Context, grantType string, codeOrToken string, redirectURL string, ...) (*TokenResponse, error) + GetNewTokenWithRefreshToken func(refreshToken string) (*TokenResponse, error) + RevokeTokenWithProvider func(token, tokenType string) error + type TokenResilienceConfig struct + CircuitBreakerConfig CircuitBreakerConfig + CircuitBreakerEnabled bool + MetadataCacheConfig MetadataCacheResilienceConfig + RetryConfig RetryConfig + RetryEnabled bool + func DefaultTokenResilienceConfig() TokenResilienceConfig + type TokenResilienceManager struct + func NewTokenResilienceManager(config TokenResilienceConfig, logger *Logger) *TokenResilienceManager + func (trm *TokenResilienceManager) ExecuteTokenExchange(ctx context.Context, t *TraefikOidc, ...) (*TokenResponse, error) + func (trm *TokenResilienceManager) ExecuteTokenOperation(ctx context.Context, operation string, fn func() error) error + func (trm *TokenResilienceManager) ExecuteTokenRefresh(ctx context.Context, t *TraefikOidc, refreshToken string) (*TokenResponse, error) + func (trm *TokenResilienceManager) GetMetrics() map[string]interface{} + func (trm *TokenResilienceManager) Reset() + type TokenResponse struct + AccessToken string + ExpiresIn int + IDToken string + RefreshToken string + TokenType string + type TokenRetrievalResult struct + Error error + Token string + type TokenVerifier interface + VerifyToken func(token string) error + type TraefikOidc struct + func NewWithContext(ctx context.Context, config *Config, next http.Handler, name string) (*TraefikOidc, error) + func (t *TraefikOidc) Close() error + func (t *TraefikOidc) ExchangeCodeForToken(ctx context.Context, grantType string, codeOrToken string, redirectURL string, ...) (*TokenResponse, error) + func (t *TraefikOidc) GetNewTokenWithRefreshToken(refreshToken string) (*TokenResponse, error) + func (t *TraefikOidc) RevokeToken(token string) + func (t *TraefikOidc) RevokeTokenWithProvider(token, tokenType string) error + func (t *TraefikOidc) ServeHTTP(rw http.ResponseWriter, req *http.Request) + func (t *TraefikOidc) VerifyJWTSignatureAndClaims(jwt *JWT, token string) error + func (t *TraefikOidc) VerifyToken(token string) error + type UnifiedCache struct + func NewUnifiedCache(config UniversalCacheConfig) *UnifiedCache + func (c *UnifiedCache) SetMaxSize(size int) + type UnifiedCacheConfig = UniversalCacheConfig + type UnifiedMockSession struct + func NewUnifiedMockSession() *UnifiedMockSession + func (m *UnifiedMockSession) Delete(key string) + func (m *UnifiedMockSession) Destroy() error + func (m *UnifiedMockSession) Get(key string) (interface{}, bool) + func (m *UnifiedMockSession) GetCallCount(method string) int64 + func (m *UnifiedMockSession) GetDestroyCount() int64 + func (m *UnifiedMockSession) IsDestroyed() bool + func (m *UnifiedMockSession) Set(key string, value interface{}) + func (m *UnifiedMockSession) SetDelay(method string, delay time.Duration) + func (m *UnifiedMockSession) SetError(method string, err error) + type UnifiedMockTokenCache struct + func NewUnifiedMockTokenCache() *UnifiedMockTokenCache + func (m *UnifiedMockTokenCache) Clear() + func (m *UnifiedMockTokenCache) Delete(key string) + func (m *UnifiedMockTokenCache) Get(key string) (string, bool) + func (m *UnifiedMockTokenCache) GetCallCount(method string) int64 + func (m *UnifiedMockTokenCache) Set(key, token string, expiry time.Time) + func (m *UnifiedMockTokenCache) SetError(method string, err error) + func (m *UnifiedMockTokenCache) SetHitRate(rate float64) + type UnifiedMockTokenVerifier struct + func NewUnifiedMockTokenVerifier() *UnifiedMockTokenVerifier + func (m *UnifiedMockTokenVerifier) GetCallCount(method string) int64 + func (m *UnifiedMockTokenVerifier) SetError(method string, err error) + func (m *UnifiedMockTokenVerifier) SetTokenMetadata(token string, metadata map[string]interface{}) + func (m *UnifiedMockTokenVerifier) SetTokenValid(token string, valid bool) + func (m *UnifiedMockTokenVerifier) SetVerificationFunc(fn func(string) error) + func (m *UnifiedMockTokenVerifier) VerifyToken(token string) error + type UniversalCache struct + func NewUniversalCache(config UniversalCacheConfig) *UniversalCache + func NewUniversalCacheWithBackend(config UniversalCacheConfig, cacheBackend backends.CacheBackend) *UniversalCache + func (c *UniversalCache) ActivateGracePeriod(key string) + func (c *UniversalCache) BlacklistToken(token string, ttl time.Duration) error + func (c *UniversalCache) Cleanup() + func (c *UniversalCache) Clear() + func (c *UniversalCache) Close() error + func (c *UniversalCache) Delete(key string) bool + func (c *UniversalCache) Get(key string) (interface{}, bool) + func (c *UniversalCache) GetLocal(key string) (interface{}, bool) + func (c *UniversalCache) GetMetrics() map[string]interface{} + func (c *UniversalCache) IsTokenBlacklisted(token string) bool + func (c *UniversalCache) MemoryUsage() int64 + func (c *UniversalCache) Mutex() *sync.RWMutex + func (c *UniversalCache) Set(key string, value interface{}, ttl time.Duration) error + func (c *UniversalCache) SetLocal(key string, value interface{}, ttl time.Duration) error + func (c *UniversalCache) SetMaxSize(newSize int) + func (c *UniversalCache) SetWithMetadata(key string, value interface{}, ttl time.Duration, ...) error + func (c *UniversalCache) Size() int + func (c *UniversalCache) Strategy() CacheStrategy + type UniversalCacheConfig struct + CleanupInterval time.Duration + DefaultTTL time.Duration + EnableAutoCleanup bool + EnableCompression bool + EnableMemoryLimit bool + EnableMetrics bool + JWKConfig *JWKCacheConfig + Logger *Logger + MaxMemoryBytes int64 + MaxSize int + MetadataConfig *MetadataCacheConfig + SkipAutoCleanup bool + Strategy CacheStrategy + TokenConfig *TokenCacheConfig + Type CacheType + func DefaultUnifiedCacheConfig() UniversalCacheConfig + type UniversalCacheManager struct + func GetUniversalCacheManager(logger *Logger) *UniversalCacheManager + func GetUniversalCacheManagerWithConfig(logger *Logger, redisConfig *RedisConfig) *UniversalCacheManager + func (m *UniversalCacheManager) Close() error + func (m *UniversalCacheManager) GetBlacklistCache() *UniversalCache + func (m *UniversalCacheManager) GetDCRCredentialsCache() *UniversalCache + func (m *UniversalCacheManager) GetIntrospectionCache() *UniversalCache + func (m *UniversalCacheManager) GetJWKCache() *UniversalCache + func (m *UniversalCacheManager) GetMetadataCache() *UniversalCache + func (m *UniversalCacheManager) GetRefreshResultCache() *UniversalCache + func (m *UniversalCacheManager) GetSessionInvalidationCache() *UniversalCache + func (m *UniversalCacheManager) GetTokenCache() *UniversalCache + func (m *UniversalCacheManager) GetTokenTypeCache() *UniversalCache + type ValidationResult struct + Errors []string + IsValid bool + SanitizedValue string + SecurityRisk string + Warnings []string