Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAttributes ¶
func SetAttributes(ctx context.Context, attrs *Attributes) context.Context
SetAttributes stores the given attributes within the provided context
Types ¶
type Attributes ¶
type Attributes struct { APIGroup string APIVersion string Namespace string Resource string ResourceName string User types.User Verb string }
Attributes represents all the information required by an authorizer to make an authorization decision
func GetAttributes ¶
func GetAttributes(ctx context.Context) *Attributes
GetAttributes returns the authorization attributes stored in the given context
type Authorizer ¶
type Authorizer interface {
Authorize(ctx context.Context, attrs *Attributes) (bool, error)
}
Authorizer determines whether a request is authorized using the Attributes passed. It returns true if the request should be authorized, along with any error encountered
Click to show internal directories.
Click to hide internal directories.