middleware

package
v0.0.0-...-5ab17cb Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendRouteHandlerFunc

type BackendRouteHandlerFunc = func(http.ResponseWriter, *http.Request, config.Backend, config.Route)

type BasicAuth

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

func NewBasicAuth

func NewBasicAuth(basicAuthService BasicAuthService) BasicAuth

func (BasicAuth) GetAllScopes

func (BasicAuth) GetAllScopes(backend config.Backend, route config.Route) []string

func (BasicAuth) Guard

func (a BasicAuth) Guard(w http.ResponseWriter, r *http.Request, scopes []string, next http.HandlerFunc)

func (BasicAuth) GuardBackendRoute

func (a BasicAuth) GuardBackendRoute(w http.ResponseWriter, r *http.Request, backend config.Backend, route config.Route, next BackendRouteHandlerFunc)

type BasicAuthService

type BasicAuthService interface {
	AuthenticateToken(string) (model.User, error)

	Authorize(model.User, []string) error
}

Jump to

Keyboard shortcuts

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