auth

package
v0.0.0-...-5222202 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthType ctxKeyType = "AUTH_TYPE"
	Username ctxKeyType = "USERNAME"

	AuthTypeWebSession AuthTypeValue = "WEB_SESSION"
	AuthTypeBearer     AuthTypeValue = "BEARER"
)

Variables

This section is empty.

Functions

func GetMiddleware

func GetMiddleware(sessionManager session.Manager, apiKeyChecker KChecker) []mux.MiddlewareFunc

Types

type AuthTypeValue

type AuthTypeValue string

type KChecker

type KChecker interface {
	Check(k string) bool
}

func NewConstKChecker

func NewConstKChecker(k string) KChecker

type UPChecker

type UPChecker interface {
	Check(username, password string) bool
}

func NewConstUPChecker

func NewConstUPChecker(username, password string) UPChecker

Jump to

Keyboard shortcuts

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