Documentation ¶
Index ¶
- func LocalFrom(ctx context.Context) bool
- func LongRunningRequestCheck(longRunningVerbs, longRunningSubresources sets.String, ...) apirequest.LongRunningRequestCheck
- func MakeAllIgnoreAuthPathPrefixes(pathPrefixes []string) []string
- func RequestIDFrom(ctx context.Context) string
- func Unauthorized(s runtime.NegotiatedSerializer, supportsBasicAuth bool) http.Handler
- func WithAuthentication(handler http.Handler, auth authenticator.Request, failed http.Handler, ...) http.Handler
- func WithLocal(handler http.Handler) http.Handler
- func WithRequestID(handler http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 RequestIDFrom ¶
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.