auth

package
v0.0.0-...-4f58271 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(id uint, username string) (tokenString string, err error)

func Init

func Init()

Types

type JWTClaim

type JWTClaim struct {
	ID         uint   `json:"id"`
	Username   string `json:"username"`
	Email      string `json:"email"`
	AppVersion string `json:"app_version"`
	jwt.StandardClaims
}

func ValidateAppToken

func ValidateAppToken(signedToken string) (claims *JWTClaim, err error)

func ValidateToken

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

Jump to

Keyboard shortcuts

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