security

package
v0.0.0-...-99a799c Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JWTSecret  = "d7830ad5791dsdsds"
	JwtExpHour = 1
	JwtExpMin  = 0
	JwtExpSec  = 30
)

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(password, newPassword string) bool

func CreatePassword

func CreatePassword(password string) string

func GetClaims

func GetClaims(token *jwt.Token) (jwt.MapClaims, error)

GetClaims get claims information

func NewToken

func NewToken(email string) (string, error)

NewToken create a new token

func ParseToken

func ParseToken(tokenString string) (*jwt.Token, error)

ParseToken parse a token

Types

This section is empty.

Jump to

Keyboard shortcuts

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