common

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CookieLoginHandler

func CookieLoginHandler(mw *jwt.GinJWTMiddleware, c *gin.Context)

CookieLoginHandler handles a cookie based JWT token

func DebugMode

func DebugMode() bool

DebugMode returns if gin is running in debug mode

func GetAuthMiddleware

func GetAuthMiddleware() *jwt.GinJWTMiddleware

GetAuthMiddleware returns a gin middleware for JWT with cookie based auth

func GetUserName

func GetUserName(c *gin.Context) string

GetUserName returns the username based of the gin.Context

func ValidateIntInput

func ValidateIntInput(maxValue string, input string) error

ValidateIntInput checks if a the value is bigger than the specified maxValue

Types

This section is empty.

Jump to

Keyboard shortcuts

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