Documentation
¶
Index ¶
- Variables
- type OIDC
- func (handler *OIDC) ParseAndValidate(ctx context.Context, rawToken, tenantID string, userclaims any, useCache bool) error
- func (handler *OIDC) ProviderFor(ctx context.Context, issuer, jwksURI, tenantID string) (*oidc.Provider, error)
- func (handler *OIDC) RegisterStaticProvider(provider *oidc.Provider)
- type OIDCOption
- func WithFeatureGates(fg *commoncfg.FeatureGates) OIDCOption
- func WithIssuerClaimKeys(issuerClaimKeys ...string) OIDCOption
- func WithProviderCacheExpiration(expiration, cleanup time.Duration) OIDCOption
- func WithSessionManager(sm *session.Manager) OIDCOption
- func WithStaticProvider(provider *oidc.Provider) OIDCOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidToken = errors.New("invalid token") ErrNoProvider = errors.New("no provider") )
Functions ¶
This section is empty.
Types ¶
type OIDC ¶
type OIDC struct {
// contains filtered or unexported fields
}
OIDC tracks the set of identity providers to support multi tenancy.
func NewOIDC ¶
func NewOIDC(opts ...OIDCOption) (*OIDC, error)
NewOIDC creates a new handler and applies the given options.
func (*OIDC) ParseAndValidate ¶
func (*OIDC) ProviderFor ¶
func (handler *OIDC) ProviderFor(ctx context.Context, issuer, jwksURI, tenantID string) (*oidc.Provider, error)
ProviderFor returns the provider for the given issuer/jwksURI.
func (*OIDC) RegisterStaticProvider ¶
RegisterStaticProvider registers a provider with the handler.
type OIDCOption ¶
OIDCOption is used to configure a handler.
func WithFeatureGates ¶
func WithFeatureGates(fg *commoncfg.FeatureGates) OIDCOption
func WithIssuerClaimKeys ¶
func WithIssuerClaimKeys(issuerClaimKeys ...string) OIDCOption
WithIssuerClaimKeys configures the behavior of a certain provider.
func WithProviderCacheExpiration ¶
func WithProviderCacheExpiration(expiration, cleanup time.Duration) OIDCOption
WithProviderCacheExpiration configures the expiration of cached providers.
func WithSessionManager ¶
func WithSessionManager(sm *session.Manager) OIDCOption
func WithStaticProvider ¶
func WithStaticProvider(provider *oidc.Provider) OIDCOption
WithStaticProvider registers the given provider.
Click to show internal directories.
Click to hide internal directories.