Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(sessions sessionParser, repo *repository.Repository) echo.MiddlewareFunc
AuthMiddleware loads the user from the session cookie and sets it in the context.
func RequireAuth ¶
func RequireAuth() echo.MiddlewareFunc
RequireAuth returns middleware that redirects to login if not authenticated. The original request URI is preserved as a ?next= query parameter.
Types ¶
Click to show internal directories.
Click to hide internal directories.