filter

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalFrom

func LocalFrom(ctx context.Context) bool

LocalFrom get the local identity from request context.

func LongRunningRequestCheck

func LongRunningRequestCheck(longRunningVerbs, longRunningSubresources sets.String, longRunningPathPrefixes []string) apirequest.LongRunningRequestCheck

LongRunningRequestCheck returns true if the given request has one of the specified verbs or one of the specified subresources, or is matched path prefix request.

func MakeAllIgnoreAuthPathPrefixes

func MakeAllIgnoreAuthPathPrefixes(pathPrefixes []string) []string

func RequestIDFrom

func RequestIDFrom(ctx context.Context) string

RequestIDFrom get the request id from request context.

func Unauthorized

func Unauthorized(s runtime.NegotiatedSerializer, supportsBasicAuth bool) http.Handler

func WithAuthentication

func WithAuthentication(handler http.Handler, auth authenticator.Request, failed http.Handler, apiAuds authenticator.Audiences, ignorePathPrefixes []string) http.Handler

WithAuthentication creates an http handler that tries to authenticate the given request as a user, and then stores any such user found onto the provided context for the request. If authentication fails or returns an error the failed handler is used. On success, "Authorization" header is removed from the request and handler is invoked to serve the request.

func WithLocal

func WithLocal(handler http.Handler) http.Handler

WithLocal adds the local identify to the context of the http access chain.

func WithRequestID

func WithRequestID(handler http.Handler) http.Handler

WithRequestID adds the unique requestID to the context of the http access chain.

Types

This section is empty.

Jump to

Keyboard shortcuts

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