authnz

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotAuthenticated loginErrorCode = 1
	NotAuthorized    loginErrorCode = 2
)

Variables

This section is empty.

Functions

func ClaimsMiddleware added in v0.9.0

func ClaimsMiddleware(conf *config.AppConfig) authsession.ClaimsMiddleware

func NewMiddleware

func NewMiddleware(config authconfig.AuthConfig, claimsMiddleware authsession.ClaimsMiddleware) (mux.MiddlewareFunc, error)

func RequireAuthentication

func RequireAuthentication(next http.Handler) http.Handler

Types

type AuthMiddleware

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

func New

func New(config authconfig.AuthConfig, claimsMiddleware authsession.ClaimsMiddleware) (*AuthMiddleware, error)

func (*AuthMiddleware) Middleware

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

type LoginError added in v0.9.0

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

func (*LoginError) Error added in v0.9.0

func (err *LoginError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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