manager

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager can manage multiple active OIDC providers. It acts as a request router for them.

It is thread-safe.

func NewManager

func NewManager(
	nextHandler http.Handler,
	dynamicJWKSProvider jwks.DynamicJWKSProvider,
	upstreamIDPs oidc.UpstreamIdentityProvidersLister,
	secretCache *secret.Cache,
	secretsClient corev1client.SecretInterface,
) *Manager

NewManager returns an empty Manager. nextHandler will be invoked for any requests that could not be handled by this manager's providers. dynamicJWKSProvider will be used as an in-memory cache for per-issuer JWKS data. upstreamIDPs will be used as an in-memory cache of currently configured upstream IDPs.

func (*Manager) ServeHTTP

func (m *Manager) ServeHTTP(resp http.ResponseWriter, req *http.Request)

ServeHTTP implements the http.Handler interface.

func (*Manager) SetProviders

func (m *Manager) SetProviders(federationDomains ...*provider.FederationDomainIssuer)

SetProviders adds or updates all the given providerHandlers using each provider's issuer string as the name of the provider to decide if it is an add or update operation.

It also removes any providerHandlers that were previously added but were not passed in to the current invocation.

This method assumes that all of the FederationDomainIssuer arguments have already been validated by someone else before they are passed to this method.

Jump to

Keyboard shortcuts

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