middleware

package
v0.0.0-...-6ed9fbc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticationMiddleWre

func NewAuthenticationMiddleWre() *authenticationMiddleware

func NewCORSMiddleware

func NewCORSMiddleware(m string, d string) *corsMiddleware

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL