Documentation ¶
Index ¶
- func GenerateToken(userID uint) (string, error)
- func GenerateTokenAndSetCookies(user *domain.User, c echo.Context) error
- func GetJWTSecret() string
- func GetRefreshJWTSecret() string
- func JWTErrorChecker(err error, c echo.Context) error
- func TokenRefresherMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func VerifyToken(tokenString string) (jwt.MapClaims, error)
- type Claims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
GenerateToken generates a JWT token with the user ID as part of the claims
func GetJWTSecret ¶
func GetJWTSecret() string
func GetRefreshJWTSecret ¶
func GetRefreshJWTSecret() string
func TokenRefresherMiddleware ¶
func TokenRefresherMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func VerifyToken ¶
VerifyToken verifies a token JWT validate
Types ¶
Click to show internal directories.
Click to hide internal directories.