auth

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(mail string, username string, userId uint, userRole string) (tokenString string, err error)

Types

type JWTClaim

type JWTClaim struct {
	ID       uint   `json:"id"`
	Mail     string `json:"mail"`
	Username string `json:"username"`
	Role     string `json:"role"`
	jwt.StandardClaims
}

func ValidateToken

func ValidateToken(signedToken string) (jwtClaims *JWTClaim, err error)

Jump to

Keyboard shortcuts

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