auth

package
v0.0.0-...-2d7ab85 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(email string, username string) (tokenString string, err error)

func ValidateToken

func ValidateToken(signedToken string) (err error)

Types

type JWTClaim

type JWTClaim struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	jwt.StandardClaims
}

JWTClaim - Специальная структура для ограничения роутов

func ParseToken

func ParseToken(tokenString string) (*JWTClaim, error)

Jump to

Keyboard shortcuts

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