auth

package
v2.0.0-...-76fd7a6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMiddleware

func ToMiddleware(auth Authenticator) func(rw http.ResponseWriter, req *http.Request, next http.Handler)

func WebhookConfigForURL

func WebhookConfigForURL(url string) (string, error)

Types

type Authenticator

type Authenticator interface {
	Authenticate(req *http.Request) (user.Info, bool, error)
}

func NewWebhookAuthenticator

func NewWebhookAuthenticator(cacheTTL time.Duration, kubeConfigFile string) (Authenticator, error)

type AuthenticatorFunc

type AuthenticatorFunc func(req *http.Request) (user.Info, bool, error)

func (AuthenticatorFunc) Authenticate

func (a AuthenticatorFunc) Authenticate(req *http.Request) (user.Info, bool, error)

type Middleware

type Middleware func(http.ResponseWriter, *http.Request, http.Handler)

func NewWebhookMiddleware

func NewWebhookMiddleware(cacheTTL time.Duration, kubeConfigFile string) (Middleware, error)

func (Middleware) Wrap

func (m Middleware) Wrap(handler http.Handler) http.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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