Documentation
¶
Overview ¶
Package metadata caches identity provider metadata documents (issuer and endpoint URLs, supported algorithms and scopes) in a cache Cache.
The cache is an optimisation only: a cache miss, a cache error or an invalid cached document falls back to the Loader, and cache writes are best effort. Every document, cached or loaded, must name exactly the requested issuer and use https endpoints before it is returned.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache serves validated metadata documents from a backing cache with a loader fallback. It is safe for concurrent use when the backing cache and loader are.
func NewCache ¶
NewCache returns a Cache. backing may be nil to disable caching; ttl <= 0 disables cache writes.
type Document ¶
type Document struct {
Issuer string
AuthURL string
TokenURL string
JWKSURL string
LoadedAt time.Time
ExpiresAt time.Time
SigningAlgs []string
SupportedScopes []string
}
Document is the subset of provider metadata this module uses.