Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendRequestID ¶
func AppendRequestID(w http.ResponseWriter, r *http.Request)
AppendRequestID Inserts a new UUID request id to the request context, and adds it to request and response headers.
func ConfigureRoot ¶
func ConfigureRoot(app interfaces.App)
func JWTAuth ¶
JWTAuth A middleware function for extracting, parsing, and validating JWT auth data from request headers.
This middleware sets `authenticated` to either `true` or `false`, depending on whether the token exists, is valid, and is not expired. The next most interesting field is `user_role`, which dictates the permission level of the current user. JWT tokens and claims are attached as well, in addition to the user's ID and email.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.