tokens

package
v0.0.0-...-5abcb53 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminTokenMiddleware

func AdminTokenMiddleware(token string) echo.MiddlewareFunc

func GenerateAccessToken

func GenerateAccessToken(secret []byte, expiryInSeconds int, u *models.User) (string, error)

GenerateAccessToken : Generate Access Token

func GenerateRefreshToken

func GenerateRefreshToken(secret []byte, expiryInSeconds int, u *models.User) (string, error)

GenerateRefreshToken : Generate Refresh Token

func GetUserIdFromToken

func GetUserIdFromToken(secret []byte, token string) (int64, error)

func Middleware

func Middleware(secret []byte) echo.MiddlewareFunc

func ParseToken

func ParseToken(secret []byte, token string, mustBeRefresh bool) (int64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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