cache

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewTestMemoryStore = pkgcache.NewMemoryStore

NewTestMemoryStore returns an in-memory AuthContextStore for use in tests only.

Functions

func NewTestMemoryCache

func NewTestMemoryCache[V any](ttl time.Duration) *pkgcache.MemoryCache[V]

NewTestMemoryCache returns an in-memory Cache for use in tests only.

Types

type AuthContextStore

type AuthContextStore = pkgcache.AuthContextStore

Re-export types from pkg/cache so consumers only need this import.

type AuthorizationContext

type AuthorizationContext = pkgcache.AuthorizationContext

Re-export types from pkg/cache so consumers only need this import.

type Cache

type Cache[V any] = pkgcache.Cache[V]

Re-export types from pkg/cache so consumers only need this import.

type Service

type Service struct {
	AuthContext            AuthContextStore
	EphemeralEncryptionKey Cache[jwk.Key]
	SVGTemplate            Cache[string]
	Document               Cache[map[string]*model.CompleteDocument]
	DPopJTI                Cache[bool]

	// JWKS caches the raw JWKS JSON fetched from an identity provider's JWKS URL.
	// The key is the JWKS URL; the value is the raw JSON response ([]byte).
	JWKS Cache[[]byte]

	// OIDCRPSession stores OIDC RP authentication flow state (state, nonce, PKCE verifier).
	OIDCRPSession Cache[*oidcrp.Session]

	// SAMLSession stores SAML authentication flow state.
	SAMLSession Cache[*samlsp.Session]

	// SessionAuthKey is the HMAC key for session cookies, shared across HA instances.
	SessionAuthKey string
	// SessionEncKey is the AES encryption key for session cookies, shared across HA instances.
	SessionEncKey string
	// contains filtered or unexported fields
}

Service holds all caches used by the apigw service.

func New

func New(ctx context.Context, cfg *model.Cfg, dbService *db.Service, tracer *trace.Tracer, log *logger.Log) (*Service, error)

New creates the apigw cache service and initialises all caches.

type Token

type Token = pkgcache.Token

Re-export types from pkg/cache so consumers only need this import.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL