Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// ErrInvalidToken is returned when the request token is invalid.
ErrInvalidToken = "invalid or missing token"
)
Functions ¶
func Auth ¶
Auth provides a middleware to authenticate requests using the x-access-token header value and write it to the context. If there is no x-access-token the middleware prevents access and renders a json document.
func RequireAdmin ¶
RequireAdmin middleware is used to require the user in context to be an admin / have account management permissions
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.