jwtAuth

package
v0.0.0-...-dfc549c Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type JWTManager

type JWTManager struct {
	// contains filtered or unexported fields
}

func NewJWTManager

func NewJWTManager(config *config.Config) *JWTManager

func (*JWTManager) Generate

func (j *JWTManager) Generate(userId uint) (JWTToken, error)

func (*JWTManager) Verify

func (j *JWTManager) Verify(rawToken JWTToken) (*UserClaims, error)

type JWTToken

type JWTToken string

type UserClaims

type UserClaims struct {
	UserId uint `json:"userId"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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