lib

package
v0.0.0-...-6559d9f Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SignKey = "webblog"

Functions

func CheckEmail

func CheckEmail(email string) bool

CheckEmail check if the email is valid

func CheckToken

func CheckToken(token string) (bool, error)

CheckToken 检查用户token是否有效

func CheckUsername

func CheckUsername(username string) bool

CheckUsername check username

func GenerateToken

func GenerateToken(useremail string) (string, error)

GenerateToken 为用户生成Token

func GetUniqueID

func GetUniqueID() string

GetUniqueID 返回唯一哈希值

func GetUserEmailFromToken

func GetUserEmailFromToken(jwtString string, JWTKey string) (bool, string)

GetUserEmailFromToken get useremail 'sub' from token

Types

This section is empty.

Jump to

Keyboard shortcuts

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