oathkeeper: github.com/ory/oathkeeper/pipeline/mutate Index | Files

package mutate

import "github.com/ory/oathkeeper/pipeline/mutate"

Index

Package Files

mutator.go mutator_broken.go mutator_cookie.go mutator_header.go mutator_hydrator.go mutator_id_token.go mutator_noop.go registry.go template.go

Constants

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

var ErrMutatorNotEnabled = herodot.DefaultError{
    ErrorField:  "mutator matching this route is misconfigured or disabled",
    CodeField:   http.StatusInternalServerError,
    StatusField: http.StatusText(http.StatusInternalServerError),
}

func NewErrMutatorMisconfigured Uses

func NewErrMutatorMisconfigured(a Mutator, err error) *herodot.DefaultError

func NewErrMutatorNotEnabled Uses

func NewErrMutatorNotEnabled(a Mutator) *herodot.DefaultError

type BasicAuth Uses

type BasicAuth struct {
    Username string `json:"username"`
    Password string `json:"password"`
}

type CredentialsCookiesConfig Uses

type CredentialsCookiesConfig struct {
    Cookies map[string]string `json:"cookies"`
}

type CredentialsIDTokenConfig Uses

type CredentialsIDTokenConfig struct {
    Claims    string `json:"claims"`
    IssuerURL string `json:"issuer_url"`
    JWKSURL   string `json:"jwks_url"`
    TTL       string `json:"ttl"`
}

func (*CredentialsIDTokenConfig) ClaimsTemplateID Uses

func (c *CredentialsIDTokenConfig) ClaimsTemplateID() string

type Mutator Uses

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 Uses

type MutatorBroken struct {
    // contains filtered or unexported fields
}

func NewMutatorBroken Uses

func NewMutatorBroken(enabled bool) *MutatorBroken

func (*MutatorBroken) GetID Uses

func (a *MutatorBroken) GetID() string

func (*MutatorBroken) Mutate Uses

func (a *MutatorBroken) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error

func (*MutatorBroken) Validate Uses

func (a *MutatorBroken) Validate(_ json.RawMessage) error

type MutatorCookie Uses

type MutatorCookie struct {
    // contains filtered or unexported fields
}

func NewMutatorCookie Uses

func NewMutatorCookie(c configuration.Provider) *MutatorCookie

func (*MutatorCookie) GetID Uses

func (a *MutatorCookie) GetID() string

func (*MutatorCookie) Mutate Uses

func (a *MutatorCookie) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rl pipeline.Rule) error

func (*MutatorCookie) Validate Uses

func (a *MutatorCookie) Validate(config json.RawMessage) error

func (*MutatorCookie) WithCache Uses

func (a *MutatorCookie) WithCache(t *template.Template)

type MutatorHeader Uses

type MutatorHeader struct {
    // contains filtered or unexported fields
}

func NewMutatorHeader Uses

func NewMutatorHeader(c configuration.Provider) *MutatorHeader

func (*MutatorHeader) GetID Uses

func (a *MutatorHeader) GetID() string

func (*MutatorHeader) Mutate Uses

func (a *MutatorHeader) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rl pipeline.Rule) error

func (*MutatorHeader) Validate Uses

func (a *MutatorHeader) Validate(config json.RawMessage) error

func (*MutatorHeader) WithCache Uses

func (a *MutatorHeader) WithCache(t *template.Template)

type MutatorHeaderConfig Uses

type MutatorHeaderConfig struct {
    Headers map[string]string `json:"headers"`
}

type MutatorHydrator Uses

type MutatorHydrator struct {
    // contains filtered or unexported fields
}

func NewMutatorHydrator Uses

func NewMutatorHydrator(c configuration.Provider) *MutatorHydrator

func (*MutatorHydrator) Config Uses

func (a *MutatorHydrator) Config(config json.RawMessage) (*MutatorHydratorConfig, error)

func (*MutatorHydrator) GetID Uses

func (a *MutatorHydrator) GetID() string

func (*MutatorHydrator) Mutate Uses

func (a *MutatorHydrator) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error

func (*MutatorHydrator) Validate Uses

func (a *MutatorHydrator) Validate(config json.RawMessage) error

type MutatorHydratorConfig Uses

type MutatorHydratorConfig struct {
    Api externalAPIConfig `json:"api"`
}

type MutatorIDToken Uses

type MutatorIDToken struct {
    // contains filtered or unexported fields
}

func NewMutatorIDToken Uses

func NewMutatorIDToken(c configuration.Provider, r MutatorIDTokenRegistry) *MutatorIDToken

func (*MutatorIDToken) Config Uses

func (a *MutatorIDToken) Config(config json.RawMessage) (*CredentialsIDTokenConfig, error)

func (*MutatorIDToken) GetID Uses

func (a *MutatorIDToken) GetID() string

func (*MutatorIDToken) Mutate Uses

func (a *MutatorIDToken) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rl pipeline.Rule) error

func (*MutatorIDToken) Validate Uses

func (a *MutatorIDToken) Validate(config json.RawMessage) error

func (*MutatorIDToken) WithCache Uses

func (a *MutatorIDToken) WithCache(t *template.Template)

type MutatorIDTokenRegistry Uses

type MutatorIDTokenRegistry interface {
    credentials.SignerRegistry
}

type MutatorNoop Uses

type MutatorNoop struct {
    // contains filtered or unexported fields
}

func NewMutatorNoop Uses

func NewMutatorNoop(c configuration.Provider) *MutatorNoop

func (*MutatorNoop) GetID Uses

func (a *MutatorNoop) GetID() string

func (*MutatorNoop) Mutate Uses

func (a *MutatorNoop) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error

func (*MutatorNoop) Validate Uses

func (a *MutatorNoop) Validate(config json.RawMessage) error

type Registry Uses

type Registry interface {
    AvailablePipelineMutators() []string
    PipelineMutator(string) (Mutator, error)
}

Package mutate imports 19 packages (graph) and is imported by 4 packages. Updated 2019-10-25. Refresh now. Tools for package owners.