authn

package
v0.0.0-...-a52e8f6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(a authenticator.Request) func(http.Handler) http.Handler

func NewOIDCAuthenticator

func NewOIDCAuthenticator(config *OIDCConfig) (authenticator.Request, error)

NewOIDCAuthenticator returns OIDC authenticator

func UserInfoForContext

func UserInfoForContext(ctx context.Context) (user.Info, error)

func WithUserInfoContext

func WithUserInfoContext(ctx context.Context, userInfo user.Info) context.Context

Types

type OIDCConfig

type OIDCConfig struct {
	IssuerURL            string
	ClientID             string
	CAFile               string   `envconfig:"optional"`
	UsernameClaim        string   `envconfig:"default=email"`
	UsernamePrefix       string   `envconfig:"optional"`
	GroupsClaim          string   `envconfig:"default=groups"`
	GroupsPrefix         string   `envconfig:"optional"`
	SupportedSigningAlgs []string `envconfig:"default=RS256"`
}

OIDCConfig represents configuration used for JWT request authentication

Jump to

Keyboard shortcuts

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