authstrategy

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeAuthenticationStrategyHookFunc

func DecodeAuthenticationStrategyHookFunc(ctx CreationContext) mapstructure.DecodeHookFunc

Types

type APIKey

type APIKey struct {
	In    string `mapstructure:"in"    validate:"required,oneof=cookie header query"`
	Name  string `mapstructure:"name"  validate:"required"`
	Value string `mapstructure:"value" validate:"required"`
}

func (*APIKey) Apply

func (c *APIKey) Apply(_ context.Context, req *http.Request) error

func (*APIKey) Hash

func (c *APIKey) Hash() []byte

type BasicAuth

type BasicAuth struct {
	User     string `mapstructure:"user"     validate:"required"`
	Password string `mapstructure:"password" validate:"required"`
}

func (*BasicAuth) Apply

func (c *BasicAuth) Apply(_ context.Context, req *http.Request) error

func (*BasicAuth) Hash

func (c *BasicAuth) Hash() []byte

type CreationContext

type CreationContext interface {
	Watcher() watcher.Watcher
	KeyHolderRegistry() keyholder.Registry
	CertificateObserver() certificate.Observer
}

type HTTPMessageSignatures

type HTTPMessageSignatures struct {
	Signer     SignerConfig   `mapstructure:"signer"     validate:"required"`
	Components []string       `mapstructure:"components" validate:"gt=0,dive,required"`
	TTL        *time.Duration `mapstructure:"ttl"`
	Label      string         `mapstructure:"label"`
	// contains filtered or unexported fields
}

func (*HTTPMessageSignatures) Apply

func (s *HTTPMessageSignatures) Apply(ctx context.Context, req *http.Request) error

func (*HTTPMessageSignatures) Certificates

func (s *HTTPMessageSignatures) Certificates() []*x509.Certificate

func (*HTTPMessageSignatures) Hash

func (s *HTTPMessageSignatures) Hash() []byte

func (*HTTPMessageSignatures) Keys

func (s *HTTPMessageSignatures) Keys() []jose.JSONWebKey

func (*HTTPMessageSignatures) Name

func (s *HTTPMessageSignatures) Name() string

func (*HTTPMessageSignatures) OnChanged

func (s *HTTPMessageSignatures) OnChanged(logger zerolog.Logger)

type HeaderConfig

type HeaderConfig struct {
	Name   string `mapstructure:"name"   validate:"required"`
	Scheme string `mapstructure:"scheme"`
}

type KeyStore

type KeyStore struct {
	Path     string `mapstructure:"path"     validate:"required"`
	Password string `mapstructure:"password"`
}

type OAuth2ClientCredentials

type OAuth2ClientCredentials struct {
	clientcredentials.Config `mapstructure:",squash"`

	Header *HeaderConfig `mapstructure:"header"`
}

func (*OAuth2ClientCredentials) Apply

type SignerConfig

type SignerConfig struct {
	Name     string   `mapstructure:"name"`
	KeyStore KeyStore `mapstructure:"key_store" validate:"required"`
	KeyID    string   `mapstructure:"key_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL