middleware

package
v0.7.9-hotfix-1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLAIM_KEY = "CLAIM"
	TOKEN_KEY = "TOKEN"
)

Variables

This section is empty.

Functions

func AuthClaimsID added in v0.3.0

func AuthClaimsID(c *gin.Context) (ID uint, isAbort bool)

func AuthRequired

func AuthRequired() gin.HandlerFunc

func Locale added in v0.2.0

func Locale() gin.HandlerFunc

func RequestLogger added in v0.2.0

func RequestLogger() gin.HandlerFunc

func Revoke added in v0.3.0

func Revoke(c *gin.Context) error

func Throttle added in v0.3.1

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

Types

type TokenRevokeError added in v0.3.0

type TokenRevokeError struct{}

func (TokenRevokeError) Error added in v0.3.0

func (e TokenRevokeError) Error() string

type UserNotLoginError added in v0.3.0

type UserNotLoginError struct{}

func (UserNotLoginError) Error added in v0.3.0

func (e UserNotLoginError) Error() string

Jump to

Keyboard shortcuts

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