auth

package
v0.0.0-...-a436832 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JwtKey = []byte("Surprise MotherFucker")

JwtKey as a secret Key var JwtKey = []byte(os.Getenv("Secret-Key"))

Functions

func ExtractClaims

func ExtractClaims(tokenStr string) (database.Member, bool)

ExtractClaims func

func GenerateToken

func GenerateToken(user database.Member) (string, error)

GenerateToken func

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	Fname    string `json:"fname"`
	Lname    string `json:"lname"`
	Email    string `json:"email"`
	College  string `json:"college"`
	Password string `json:"password"`

	jwt.StandardClaims
}

Claims for JWT token

Jump to

Keyboard shortcuts

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