Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRequestAuthorized ¶
func IsRequestAuthorized(req *http.Request, a Authorizer, headerName string) error
Types ¶
type Authorizer ¶
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition is used to check whether user with tokenPerms has access.
func AND ¶
AND is an array of conditions with logic AND. If no condition is passed it returns false.
type Config ¶
type Config struct { // OIDC issuer url. Provider string // Expected Audience of the token. For a majority of the cases this is expected to be // the ID of the client that initialized the login flow. It may occasionally differ if // the provider supports the authorizing party (azp) claim. ClientID string // Claim name that contains user permissions (sometimes called 'group') PermsClaim string // Permission condition that will authorize token. PermCondition Condition }
Config is an authorize configuration. TODO(bwplotka): Add proper unmarshaller/marshaller for that data struct.
Click to show internal directories.
Click to hide internal directories.