auth

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilAuthenticator = errors.New("authenticator cannot be nil")
)

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Authenticate(
		interception gojwtinterception.Interception,
		next http.Handler,
	) http.Handler
}

Authenticator interface

type Middleware

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

Middleware struct

func NewMiddleware

func NewMiddleware(
	validator gojwtvalidator.Validator,
	responseHandler gonethttpresponse.Handler,
	jwtValidatorErrorHandler gonethttpjwtvalidator.ErrorHandler,
) (*Middleware, error)

NewMiddleware creates a new authentication middleware

func (*Middleware) Authenticate

func (m *Middleware) Authenticate(
	interception gojwtinterception.Interception,
	next http.Handler,
) http.Handler

Authenticate return the middleware function that authenticates the request

Jump to

Keyboard shortcuts

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