Documentation ¶
Index ¶
- func NewAuthenticationMiddleWre() *authenticationMiddleware
- func NewCORSMiddleware(m string, d string) *corsMiddleware
- type JWTHandler
- func (*JWTHandler) CleanTokenCookie(w http.ResponseWriter)
- func (j *JWTHandler) GenerateToken(user internal_user.UserAccount) (string, time.Time, error)
- func (*JWTHandler) RefreshTokenCookie(r *http.Request, user internal_user.UserAccount) (string, time.Time, error)
- func (j *JWTHandler) SetTokenCookie(w http.ResponseWriter, user internal_user.UserAccount) error
- func (*JWTHandler) ValidateTokenCookie(r *http.Request) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthenticationMiddleWre ¶
func NewAuthenticationMiddleWre() *authenticationMiddleware
func NewCORSMiddleware ¶
Types ¶
type JWTHandler ¶
type JWTHandler struct{}
func NewJWTHandler ¶
func NewJWTHandler() *JWTHandler
func (*JWTHandler) CleanTokenCookie ¶
func (*JWTHandler) CleanTokenCookie(w http.ResponseWriter)
func (*JWTHandler) GenerateToken ¶
func (j *JWTHandler) GenerateToken(user internal_user.UserAccount) (string, time.Time, error)
func (*JWTHandler) RefreshTokenCookie ¶
func (*JWTHandler) RefreshTokenCookie(r *http.Request, user internal_user.UserAccount) (string, time.Time, error)
func (*JWTHandler) SetTokenCookie ¶
func (j *JWTHandler) SetTokenCookie(w http.ResponseWriter, user internal_user.UserAccount) error
func (*JWTHandler) ValidateTokenCookie ¶
func (*JWTHandler) ValidateTokenCookie(r *http.Request) (bool, error)
Click to show internal directories.
Click to hide internal directories.