auth

package
v0.0.0-...-858496e Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GenerateToken

func GenerateToken(userID string) (string, error)

GenerateToken generates a JWT token

Types

type Claims

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

Claims defines the JWT claims structure

Jump to

Keyboard shortcuts

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