Documentation ¶
Index ¶
- Constants
- Variables
- func NewErrMutatorMisconfigured(a Mutator, err error) *herodot.DefaultError
- func NewErrMutatorNotEnabled(a Mutator) *herodot.DefaultError
- type BasicAuth
- type CredentialsCookiesConfig
- type CredentialsIDTokenConfig
- type Mutator
- type MutatorBroken
- type MutatorCookie
- type MutatorHeader
- type MutatorHeaderConfig
- type MutatorHydrator
- func (a *MutatorHydrator) Config(config json.RawMessage) (*MutatorHydratorConfig, error)
- func (a *MutatorHydrator) GetID() string
- func (a *MutatorHydrator) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, ...) error
- func (a *MutatorHydrator) Validate(config json.RawMessage) error
- type MutatorHydratorConfig
- type MutatorIDToken
- func (a *MutatorIDToken) Config(config json.RawMessage) (*CredentialsIDTokenConfig, error)
- func (a *MutatorIDToken) GetID() string
- func (a *MutatorIDToken) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, ...) error
- func (a *MutatorIDToken) Validate(config json.RawMessage) error
- func (a *MutatorIDToken) WithCache(t *template.Template)
- type MutatorIDTokenRegistry
- type MutatorNoop
- type Registry
Constants ¶
View Source
const ( ErrMalformedResponseFromUpstreamAPI = "The call to an external API returned an invalid JSON object" ErrMissingAPIURL = "Missing URL in mutator configuration" ErrInvalidAPIURL = "Invalid URL in mutator configuration" ErrNon200ResponseFromAPI = "The call to an external API returned a non-200 HTTP response" ErrInvalidCredentials = "Invalid credentials were provided in mutator configuration" ErrNoCredentialsProvided = "No credentials were provided in mutator configuration" )
Variables ¶
View Source
var ErrMutatorNotEnabled = herodot.DefaultError{ ErrorField: "mutator matching this route is misconfigured or disabled", CodeField: http.StatusInternalServerError, StatusField: http.StatusText(http.StatusInternalServerError), }
Functions ¶
func NewErrMutatorMisconfigured ¶
func NewErrMutatorMisconfigured(a Mutator, err error) *herodot.DefaultError
func NewErrMutatorNotEnabled ¶
func NewErrMutatorNotEnabled(a Mutator) *herodot.DefaultError
Types ¶
type CredentialsIDTokenConfig ¶
type CredentialsIDTokenConfig struct { Claims string `json:"claims"` IssuerURL string `json:"issuer_url"` JWKSURL string `json:"jwks_url"` TTL string `json:"ttl"` }
func (*CredentialsIDTokenConfig) ClaimsTemplateID ¶
func (c *CredentialsIDTokenConfig) ClaimsTemplateID() string
type Mutator ¶
type Mutator interface { Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error GetID() string Validate(config json.RawMessage) error }
type MutatorBroken ¶
type MutatorBroken struct {
// contains filtered or unexported fields
}
func NewMutatorBroken ¶
func NewMutatorBroken(enabled bool) *MutatorBroken
func (*MutatorBroken) GetID ¶
func (a *MutatorBroken) GetID() string
func (*MutatorBroken) Mutate ¶
func (a *MutatorBroken) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error
func (*MutatorBroken) Validate ¶
func (a *MutatorBroken) Validate(_ json.RawMessage) error
type MutatorCookie ¶
type MutatorCookie struct {
// contains filtered or unexported fields
}
func NewMutatorCookie ¶
func NewMutatorCookie(c configuration.Provider) *MutatorCookie
func (*MutatorCookie) GetID ¶
func (a *MutatorCookie) GetID() string
func (*MutatorCookie) Mutate ¶
func (a *MutatorCookie) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rl pipeline.Rule) error
func (*MutatorCookie) Validate ¶
func (a *MutatorCookie) Validate(config json.RawMessage) error
func (*MutatorCookie) WithCache ¶
func (a *MutatorCookie) WithCache(t *template.Template)
type MutatorHeader ¶
type MutatorHeader struct {
// contains filtered or unexported fields
}
func NewMutatorHeader ¶
func NewMutatorHeader(c configuration.Provider) *MutatorHeader
func (*MutatorHeader) GetID ¶
func (a *MutatorHeader) GetID() string
func (*MutatorHeader) Mutate ¶
func (a *MutatorHeader) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rl pipeline.Rule) error
func (*MutatorHeader) Validate ¶
func (a *MutatorHeader) Validate(config json.RawMessage) error
func (*MutatorHeader) WithCache ¶
func (a *MutatorHeader) WithCache(t *template.Template)
type MutatorHeaderConfig ¶
type MutatorHydrator ¶
type MutatorHydrator struct {
// contains filtered or unexported fields
}
func NewMutatorHydrator ¶
func NewMutatorHydrator(c configuration.Provider, d mutatorHydratorDependencies) *MutatorHydrator
func (*MutatorHydrator) Config ¶
func (a *MutatorHydrator) Config(config json.RawMessage) (*MutatorHydratorConfig, error)
func (*MutatorHydrator) GetID ¶
func (a *MutatorHydrator) GetID() string
func (*MutatorHydrator) Mutate ¶
func (a *MutatorHydrator) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error
func (*MutatorHydrator) Validate ¶
func (a *MutatorHydrator) Validate(config json.RawMessage) error
type MutatorHydratorConfig ¶
type MutatorHydratorConfig struct {
Api externalAPIConfig `json:"api"`
}
type MutatorIDToken ¶
type MutatorIDToken struct {
// contains filtered or unexported fields
}
func NewMutatorIDToken ¶
func NewMutatorIDToken(c configuration.Provider, r MutatorIDTokenRegistry) *MutatorIDToken
func (*MutatorIDToken) Config ¶
func (a *MutatorIDToken) Config(config json.RawMessage) (*CredentialsIDTokenConfig, error)
func (*MutatorIDToken) GetID ¶
func (a *MutatorIDToken) GetID() string
func (*MutatorIDToken) Mutate ¶
func (a *MutatorIDToken) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rl pipeline.Rule) error
func (*MutatorIDToken) Validate ¶
func (a *MutatorIDToken) Validate(config json.RawMessage) error
func (*MutatorIDToken) WithCache ¶
func (a *MutatorIDToken) WithCache(t *template.Template)
type MutatorIDTokenRegistry ¶
type MutatorIDTokenRegistry interface { credentials.SignerRegistry }
type MutatorNoop ¶
type MutatorNoop struct {
// contains filtered or unexported fields
}
func NewMutatorNoop ¶
func NewMutatorNoop(c configuration.Provider) *MutatorNoop
func (*MutatorNoop) GetID ¶
func (a *MutatorNoop) GetID() string
func (*MutatorNoop) Mutate ¶
func (a *MutatorNoop) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error
func (*MutatorNoop) Validate ¶
func (a *MutatorNoop) Validate(config json.RawMessage) error
Click to show internal directories.
Click to hide internal directories.