Documentation
¶
Index ¶
- func CreateToken(user types.CookieUser) string
- func GetCookieHandler(r *http.Request) (bool, error)
- func Middleware(path string, next http.HandlerFunc) http.HandlerFunc
- func SetCookieHandler(w http.ResponseWriter, user types.CookieUser, path string) http.ResponseWriter
- func ValidateToken(tokenString string) (types.CookieUser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
func CreateToken(user types.CookieUser) string
func Middleware ¶
func Middleware(path string, next http.HandlerFunc) http.HandlerFunc
func SetCookieHandler ¶
func SetCookieHandler(w http.ResponseWriter, user types.CookieUser, path string) http.ResponseWriter
func ValidateToken ¶
func ValidateToken(tokenString string) (types.CookieUser, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.