jwt

package
v0.0.0-...-5a269ca Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	SetLoginToken(ctx *gin.Context, uid int) (string, string, error)
	SetJWTToken(ctx *gin.Context, uid int, ssid string) (string, error)
	ExtractToken(ctx *gin.Context) string
	CheckSession(ctx *gin.Context, ssid string) error
	ClearToken(ctx *gin.Context) error
	// contains filtered or unexported methods
}

func NewJWTHandler

func NewJWTHandler(c redis.Cmdable) Handler

type RefreshClaims

type RefreshClaims struct {
	jwt.RegisteredClaims
	Uid  int
	Ssid string
}

type UserClaims

type UserClaims struct {
	jwt.RegisteredClaims
	Uid         int
	Ssid        string
	UserAgent   string
	ContentType string
}

Jump to

Keyboard shortcuts

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