auth

package
v0.0.0-...-32ffdae Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GenerateJWT

func GenerateJWT(username string) (string, error)

GenerateJWT creates a new JWT for a given username

func IsAuthenticated

func IsAuthenticated() gin.HandlerFunc

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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