handlers

package
v3.6.99-1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationHandlerFilter

func AuthenticationHandlerFilter(handler http.Handler, authenticator authenticator.Request, contextMapper apirequest.RequestContextMapper) http.Handler

AuthenticationHandlerFilter creates a filter object that will enforce authentication directly

func AuthorizationFilter

func AuthorizationFilter(handler http.Handler, authorizer kauthorizer.Authorizer, authorizationAttributeBuilder authorizer.AuthorizationAttributeBuilder, contextMapper apirequest.RequestContextMapper) http.Handler

AuthorizationFilter imposes normal authorization rules

func Forbidden

func Forbidden(reason string, attributes kauthorizer.Attributes, w http.ResponseWriter, req *http.Request)

Forbidden renders a simple forbidden error to the response

func ImpersonationFilter

func ImpersonationFilter(handler http.Handler, a kauthorizer.Authorizer, groupCache GroupCache, contextMapper apirequest.RequestContextMapper) http.Handler

ImpersonationFilter checks for impersonation rules against the current user.

func NewBypassAuthorizer

func NewBypassAuthorizer(auth kauthorizer.Authorizer, paths ...string) kauthorizer.Authorizer

NewBypassAuthorizer creates an Authorizer that always allows the exact paths described, and delegates to the nested authorizer for everything else.

Types

type GroupCache

type GroupCache interface {
	GroupsFor(string) ([]*userapi.Group, error)
}

Jump to

Keyboard shortcuts

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