Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOIDCProviderAndClient ¶
CreateOIDCProviderAndClient builds an OIDC provider and HTTP client from config. Returns (nil, nil, nil) when AuthorizationURL is empty (OAuth not configured).
Types ¶
type Snapshot ¶
type Snapshot struct {
OIDCProvider *oidc.Provider
HTTPClient *http.Client
AuthorizationURL string
CertificateAuthority string
OAuthScopes []string
DisableDynamicClientRegistration bool
}
Snapshot is an immutable point-in-time capture of OAuth-related state. It is swapped atomically via State so all consumers see a consistent view.
func SnapshotFromConfig ¶
func SnapshotFromConfig(cfg *config.StaticConfig, provider *oidc.Provider, httpClient *http.Client) *Snapshot
SnapshotFromConfig extracts OAuth-relevant fields from a StaticConfig and pairs them with the corresponding OIDC provider and HTTP client.
func (*Snapshot) HasProviderConfigChanged ¶
HasProviderConfigChanged reports whether the fields that require OIDC provider and HTTP client recreation have changed between two snapshots.
func (*Snapshot) HasWellKnownConfigChanged ¶
HasWellKnownConfigChanged reports whether any WellKnown-serving fields changed.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State holds the current OAuth snapshot and allows atomic, lock-free reads.