Documentation ¶
Index ¶
- func Authorize(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func DisplayAppError(w http.ResponseWriter, handlerError error, message string, code int)
- func GenerateJWT(username, accessToken string) (string, error)
- func GetJWTFromStore(w http.ResponseWriter, r *http.Request) (token string)
- func IsAuthenticated(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func NewContext(ctx context.Context, appClaims *AppClaims) context.Context
- func StartUp()
- func StoreJWT(w http.ResponseWriter, r *http.Request, token string)
- type AppClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authorize ¶
func Authorize(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Middleware for validating JWT tokens
func DisplayAppError ¶
func DisplayAppError( w http.ResponseWriter, handlerError error, message string, code int, )
func GenerateJWT ¶
Generate JWT token
func GetJWTFromStore ¶
func GetJWTFromStore(w http.ResponseWriter, r *http.Request) (token string)
func IsAuthenticated ¶
func IsAuthenticated(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Types ¶
Click to show internal directories.
Click to hide internal directories.