auth

package
v1.7.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IdentityHeaderMissingError = util.NewUnauthenticatedError(
	errors.New("Request header error: there is no user identity header."),
	"Request header error: there is no user identity header.",
)

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	GetUserIdentity(ctx context.Context) (string, error)
}

func GetAuthenticators

func GetAuthenticators(tokenReviewClient client.TokenReviewInterface) []Authenticator

type HTTPHeaderAuthenticator

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

func NewHTTPHeaderAuthenticator

func NewHTTPHeaderAuthenticator(header, prefix string) *HTTPHeaderAuthenticator

func (*HTTPHeaderAuthenticator) GetUserIdentity

func (ha *HTTPHeaderAuthenticator) GetUserIdentity(ctx context.Context) (string, error)

type TokenReviewAuthenticator

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

func NewTokenReviewAuthenticator

func NewTokenReviewAuthenticator(tokenHeader, tokenPrefix string, audiences []string, tokenReviewClient client.TokenReviewInterface) *TokenReviewAuthenticator

func (*TokenReviewAuthenticator) GetUserIdentity

func (tra *TokenReviewAuthenticator) GetUserIdentity(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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