clientid

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FromContext = models.FromContext

Functions

This section is empty.

Types

type ClientID

type ClientID = models.ClientID

type Middleware

type Middleware struct {
	Tracer middleware.Tracer
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Middleware

New returns a new Client ID middleware which embedds an valid client ID if provided in the request. Without providing any Options the client id is extracted from the request header "X-Client-ID", is optional and, using an empty in-memory store.

func (*Middleware) IgnoreRoute added in v0.7.0

func (m *Middleware) IgnoreRoute(route *mux.Route) *Middleware

func (*Middleware) Middleware

func (m *Middleware) Middleware() func(http.Handler) http.Handler

type Option

type Option func(*Middleware)

func WithEnforcmentPolicy

func WithEnforcmentPolicy(p enforcement.Policy) Option

func WithExtractor

func WithExtractor(e extractor.Extractor) Option

func WithHeaderExtractor

func WithHeaderExtractor(headers ...string) Option

func WithRequired

func WithRequired() Option

func WithS3Store

func WithS3Store(session aws_client.ConfigProvider, arn string) Option

func WithStage

func WithStage(stages ...string) Option

func WithStore

func WithStore(s Store) Option

func WithStoreCache

func WithStoreCache() Option

type Store

type Store = store.Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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