services

package
v0.0.0-...-b0a4e96 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEY                    string = "JWT-ARY-STARK"
	DEFAULT_EXPIRE_SECONDS int    = 600 // default 10 minutes
)
View Source
const (
	LOGIN_EXPIRED = 86400
)

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(user *Users.User, expiredSeconds int) (tokenString string, err error)

func RefreshToken

func RefreshToken(tokenString string) (string, error)

func UserLoginByEmail

func UserLoginByEmail(email, password string) (rul *defs.ResUserLogin, err error)

func ValidateToken

func ValidateToken(tokenString string) (*Users.User, error)

Types

type MyCustomClaims

type MyCustomClaims struct {
	*Users.User
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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