jwt

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Secret = []byte("your-secret")

Functions

func Generate

func Generate(userID string) (string, error)

Types

type Claims

type Claims struct {
	UserID string `json:"user_id"`
	jwt.RegisteredClaims
}

func Parse

func Parse(tokenStr string) (*Claims, error)

Jump to

Keyboard shortcuts

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