auth

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken = errors.New("failed to verify token")
)

Provider errors.

View Source
var (
	ErrUnauthorized = errors.New("unauthorized")
)

Middleware errors.

Functions

func Middleware

func Middleware(logger log.Logger, providers ...Provider) endpoint.Middleware

Types

type OktaProvider added in v0.8.0

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

func (*OktaProvider) String added in v0.8.0

func (p *OktaProvider) String() string

func (*OktaProvider) Verify added in v0.8.0

func (p *OktaProvider) Verify(ctx context.Context, token string) error

type Provider added in v0.8.0

type Provider interface {
	Verify(ctx context.Context, token string) error
}

func NewOktaProvider added in v0.8.0

func NewOktaProvider(issuer string, claims ...string) Provider

func NewStaticProvider added in v0.8.0

func NewStaticProvider(tokens ...string) Provider

type StaticProvider added in v0.8.0

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

func (*StaticProvider) String added in v0.8.0

func (p *StaticProvider) String() string

func (*StaticProvider) Verify added in v0.8.0

func (p *StaticProvider) Verify(ctx context.Context, token string) error

Jump to

Keyboard shortcuts

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