Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetchStrategy ¶ added in v0.6.0
type FetchStrategy int64
const ( Lazy FetchStrategy = iota // Fetch new Okta JWT set inline with requests (when not cached) // Background Fetch new Okta JWT set in the background regardless of requests being made. This option was designed // for eliminating in-line Okta JWK set calls and minimizing latency in production use. Warning: this option will // attempt to seed Okta JWT sets on initialization and block. Background DefaultCacheTtl = 5 * time.Minute )
type KeyfuncProvider ¶
type KeyfuncProvider struct {
// contains filtered or unexported fields
}
KeyfuncProvider implements the keyfunc.KeyfuncProvider and generates JWT validating functions for Okta tokens.
func NewKeyfuncProvider ¶
func NewKeyfuncProvider(mp metadata.Provider, options ...Option) (*KeyfuncProvider, error)
NewKeyfuncProvider creates a new KeyfuncProvider.
func (*KeyfuncProvider) GetKeyfunc ¶
func (kp *KeyfuncProvider) GetKeyfunc(ctx context.Context) (jwt.Keyfunc, error)
GetKeyfunc gets a jwt.Keyfunc based on the OIDC metadata.
type Option ¶
type Option func(*Options)
Option for the KeyfuncProvider
func WithBackgroundCtx ¶ added in v0.6.0
WithBackgroundCtx specified the context to use in order to control the lifecycle of the background fetching goroutine.
func WithCacheTtl ¶
WithCacheTtl specifies the TTL on the Okta JWK set.
func WithFetchStrategy ¶ added in v0.6.0
func WithFetchStrategy(fetchStrategy FetchStrategy) Option
WithFetchStrategy specifies a strategy for fetching new Okta JWK sets.
func WithHttpClient ¶
WithHttpClient allows for a configurable http client.
Click to show internal directories.
Click to hide internal directories.