Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
Authorizer uses Cerbos to authorize resource requests.
func NewAuthorizer ¶
func NewAuthorizer(client *cerbos.GRPCClient, defaultRoles []string) Authorizer
NewAuthorizer returns a new Authorizer.
type Config ¶
type Config struct { Address string `mapstructure:"address"` Options OptionsConfig `mapstructure:"options"` DefaultRoles []string `mapstructure:"defaultRoles"` }
Config implements the AuthorizerFactory interface defined by Portward.
func (Config) New ¶
func (c Config) New() (auth.Authorizer, error)
New returns a new Authorizer from the configuration.
type OptionsConfig ¶
type OptionsConfig struct {
Plaintext bool `mapstructure:"plaintext"`
}
OptionsConfig implements options for the Cerbos client connection.
Click to show internal directories.
Click to hide internal directories.