Documentation
¶
Index ¶
- func AuthMiddleware(fetch gobwebs.UserFetch) echo.MiddlewareFunc
- func AuthRequired() echo.MiddlewareFunc
- func Context(ctx context.Context, user gobwebs.User) context.Context
- func ForContext(ctx context.Context) gobwebs.User
- func UserLogin(c echo.Context, uid uint) error
- func UserLogout(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
AuthMiddleware checks for an authenticated user, if present, sets it on the context
func AuthRequired ¶
func AuthRequired() echo.MiddlewareFunc
AuthRequired will require an authenticated user to continue. This requires that the AuthMiddleware be called BEFORE AuthRequired
func Context ¶
Context adds user object to context for immediate use
func ForContext ¶
ForContext pulls user value for context
func UserLogin ¶
UserLogin logs a user in by setting the session value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.