jwthelper

package
v0.0.0-...-7de9431 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(signingKey []byte, userID uint, userAgent string) (string, error)

func ParseWithClaims

func ParseWithClaims(signingKey, tokenString string, claims *Claims) (*jwt.Token, error)

Types

type Claims

type Claims struct {
	jwt.RegisteredClaims

	UserID    uint
	UserAgent string
}

func RetrieveClaimsFromContext

func RetrieveClaimsFromContext(ctx *gin.Context) (*Claims, error)

Jump to

Keyboard shortcuts

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