jwt

package
v0.0.0-...-e06d7b7 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Key1   = []byte("ebe3vxIP7sblVvUHXb7ZaiMPuz4oXo0l")
	Key2   = []byte("sadfkhjlkkljKFJDSLAFUDASLFJKLjfj113d2")
	IssUer = "K5mBPBYNQeNWEBvCTE5msog3KSGTdhmI"
)

Functions

This section is empty.

Types

type Handler

type Handler interface {
	SetLoginToken(ctx *gin.Context, uid int64) (string, string, error)
	SetJWTToken(ctx *gin.Context, uid int64, 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  int64
	Ssid string
}

type UserClaims

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

Jump to

Keyboard shortcuts

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