middleware

package
v0.0.0-...-e8918d0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TokenExpireDuration = time.Hour * 24

Variables

This section is empty.

Functions

func AuthSession

func AuthSession() gin.HandlerFunc

func GenToken

func GenToken(id int64, username string) (string, error)

Types

type Claims

type Claims struct {
	ID       int64  `json:"id"`
	Username string `json:"username"`
	jwt.StandardClaims
}

func ParseToken

func ParseToken(tokenString string) (*Claims, error)

Jump to

Keyboard shortcuts

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