authentication

package
v0.0.0-...-63952dd Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsUnauthorized

func IsUnauthorized(err error) bool

IsUnauthorized asserts unauthorizedError.

Types

type Config

type Config struct {
	Flags  *flags.Flags
	Models *models.Model
	Logger micrologger.Logger
}

type Middleware

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

func New

func New(c Config) (*Middleware, error)

func (*Middleware) Middleware

func (m *Middleware) Middleware() atreugo.Middleware

Middleware validates if the request has an authorization `Bearer` type token, or if a token is present in the `token` URL parameter.

Jump to

Keyboard shortcuts

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