union

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 3 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiError

type MultiError []error

MultiError represent multiple errors that occur when attempting to authenticate a request.

func (MultiError) Error

func (errs MultiError) Error() string

type Union

type Union interface {
	auth.Strategy
	// AuthenticateRequest authenticates the request using a chain of strategies.
	// AuthenticateRequest returns user info alongside the successful strategy.
	AuthenticateRequest(r *http.Request) (auth.Strategy, auth.Info, error)
	// Chain returns chain of strategies
	Chain() []auth.Strategy
}

Union implements authentication strategy, and consolidate a chain of strategies.

func New

func New(strategies ...auth.Strategy) Union

New returns new union strategy.

Jump to

Keyboard shortcuts

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