auth

package
v0.0.0-...-314a858 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACCESS_TOKEN_LIFETIME  = time.Minute * 30
	REFRESH_TOKEN_LIFETIME = time.Minute * 120
)

Variables

This section is empty.

Functions

func ForgeAuthPair

func ForgeAuthPair(guid string) (*models.AuthTokenPair, error)

func ParseTokenFromRequest

func ParseTokenFromRequest(c *gin.Context, key string) (*jwt.Token, error)

func ProduceBcrypt

func ProduceBcrypt(tokenStr string) ([]byte, error)

func TakeSignature

func TakeSignature(jwtStr string) string

func VerifyRefreshToken

func VerifyRefreshToken(refToken *jwt.Token, accToken *jwt.Token, rightHash []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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