Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthHeaderExtractor ¶ added in v0.6.9
func AuthorizationHeaderExtractor ¶ added in v0.6.9
func AuthorizationHeaderExtractor(deps Deps) AuthHeaderExtractor
Auth middleware is extracting, parsing and adding user to the request context (see newTokensMiddleware above) Unfortunately the main log is in interceptor, and auth middleware chained several hops after the interceptor handler, where httpRequest is logged. So this function duplicates partly the extraction logic of newTokensMiddleware in order to be applied earlier in chain and log the user passed in the request.
type AuthMiddlewareDecorator ¶
func New ¶
func New(deps Deps) AuthMiddlewareDecorator
type Deps ¶
type Deps struct { fx.In Cfg *Config Sessions authsessions.Store `optional:"true"` Tokens authtokens.Tokens `optional:"true"` }
Click to show internal directories.
Click to hide internal directories.