Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BetterAuthClient ¶
type BetterAuthClient struct {
// contains filtered or unexported fields
}
BetterAuthClient fetches OAuth tokens from BetterAuth
func NewBetterAuthClient ¶
func NewBetterAuthClient(authServerURL string) *BetterAuthClient
NewBetterAuthClient creates client to fetch tokens from BetterAuth
type JWTVerifier ¶
type JWTVerifier struct {
// contains filtered or unexported fields
}
JWTVerifier handles JWT token verification with cached JWKS
func NewJWTVerifier ¶
func NewJWTVerifier(jwksURL string) (*JWTVerifier, error)
NewJWTVerifier creates a new JWT verifier with JWKS caching This implementation is optimized for extremely low latency: - JWKS keys are cached with automatic background refresh - No network call on most token verifications - Minimal memory allocations
func (*JWTVerifier) GetCacheStats ¶
func (v *JWTVerifier) GetCacheStats() map[string]interface{}
GetCacheStats returns statistics about the JWKS cache
func (*JWTVerifier) UserFromRequest ¶
func (v *JWTVerifier) UserFromRequest(r *http.Request) (*User, error)
UserFromRequest extracts and validates the JWT token from the request This is the hot path - optimized for minimal allocations and latency
Click to show internal directories.
Click to hide internal directories.