appjwt

package
v0.0.0-...-19c73cf Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppJWT

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

func NewAppJWT

func NewAppJWT() *AppJWT

func (AppJWT) GenWithClaims

func (a AppJWT) GenWithClaims(tokenExpAt time.Time, claims map[string]string, subject string) (token string, err error)

func (AppJWT) VerifyToken

func (a AppJWT) VerifyToken(token, subject string) (*CustomClaims, error)

be carfull the subject shuold match from the signing phase, use "" to skip it

type CustomClaims

type CustomClaims struct {
	Claims map[string]string `json:"claims"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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