middleware

package
Version: v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTEXT_TOKEN_KEY = "TOTOVAL_CONTEXT_TOKEN"
)

Variables

This section is empty.

Functions

func AuthRequired

func AuthRequired(signKey string) request.HandlerFunc

func BasicAuth

func BasicAuth(accounts map[string]string) request.HandlerFunc

func BasicAuthWithRealm

func BasicAuthWithRealm(accounts map[string]string, realm string) request.HandlerFunc

func IUser

func IUser(userModelPtr auth.IUser) request.HandlerFunc

func Locale

func Locale() request.HandlerFunc

func Logger

func Logger() request.HandlerFunc

func Policy

func Policy(_policy policy.Policier, action policy.Action) request.HandlerFunc

func Recovery

func Recovery() request.HandlerFunc

func RequestLogger

func RequestLogger() request.HandlerFunc

func Revoke

func Revoke(c request.Context, signKey string) error

func Throttle

func Throttle(maxAttempts uint, decayMinutes uint) request.HandlerFunc

Types

type TokenRevokeError

type TokenRevokeError struct{}

func (TokenRevokeError) Error

func (e TokenRevokeError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL