Documentation ¶ Index ¶ func Auth(opts ...account.Option) func(http.Handler) http.Handler func RequireAdmin(rm *roles.Manager, logger log.Logger) func(next http.Handler) http.Handler Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Auth ¶ func Auth(opts ...account.Option) func(http.Handler) http.Handler 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 ¶ func RequireAdmin(rm *roles.Manager, logger log.Logger) func(next http.Handler) http.Handler RequireAdmin middleware is used to require the user in context to be an admin / have account management permissions Types ¶ This section is empty. Source Files ¶ View all Source files auth.go requireadmin.go Click to show internal directories. Click to hide internal directories.