package
Version:
v0.0.0-...-4a8c6e9
Opens a new window with list of versions in this module.
Published: Aug 12, 2023
License: GPL-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func GenerateTokensAndSetCookies(user *user.User, c echo.Context) error
GenerateTokensAndSetCookies generates jwt token and saves it to the http-only cookie.
func JWTErrorChecker(err error, c echo.Context) error
JWTErrorChecker will be executed when user try to access a protected path.
type Claims struct {
Name string `json:"name"`
jwt.StandardClaims
}
Create a struct that will be encoded to a JWT.
We add jwt.StandardClaims as an embedded type, to provide fields like expiry time.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.