Documentation ¶
Index ¶
- Variables
- func GetTokenFromCookie(c echo.Context) (string, error)
- func HandleInvalidToken(c echo.Context, message string) error
- func IsLoggedIn(c echo.Context) bool
- func ParseToken(tokenString string) (jwt.MapClaims, error)
- func SetCookie(signedToken string, expiry time.Time, c echo.Context)
- func SignToken(user models.User) (time.Time, string, error)
- func TokenToUsername(token jwt.MapClaims) string
Constants ¶
This section is empty.
Variables ¶
View Source
var SecretKey = "my_secret"
TODO: Move Secret to ENV https://github.com/hay-i/gooal/issues/35
Functions ¶
func GetTokenFromCookie ¶
func HandleInvalidToken ¶
func IsLoggedIn ¶
func IsLoggedIn(c echo.Context) bool
func TokenToUsername ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.