Currently, authentication is done through a function inside each Handler. This is ugly, and does not correspond to the way Handlers are currently utilized throughout the rest of the (local) http package. The authentication function's type signature is exactly the same as the HandlerFunc, so this may be implemented as some sort of Middleware field inside a Handler.
Edit: authenticate's type signature is nearly the same as HandlerFunc, with the exception of an added model.User in the return. This may require some different Middleware type.
Currently, authentication is done through a function inside each
Handler
. This is ugly, and does not correspond to the wayHandler
s are currently utilized throughout the rest of the (local) http package. The authentication function's type signature is exactly the same as theHandlerFunc
, so this may be implemented as some sort ofMiddleware
field inside a Handler.