Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaybeWithUser ¶
func MaybeWithUser(fn UserHandlerFunc, appCtx *appctx.Context) http.Handler
MaybeWithUser retrieves the connected user and calls the provided function with the user. If the user is not connected, user is nil.
func WithUserOr403 ¶
func WithUserOr403(fn UserHandlerFunc, appCtx *appctx.Context) http.Handler
WithUserOr403 promises to call the provided function with a non-nil user. Other requests are responded with a 403
func WithUserOrRedirect ¶
func WithUserOrRedirect(fn UserHandlerFunc, appCtx *appctx.Context) http.Handler
WithUserOrRedirect promises to call the provided function with a non-nil user. Other requests are redirected to the login page
Types ¶
type UserHandlerFunc ¶
UserHandlerFunc is net/http HandlerFunc with an additional User parameter
Click to show internal directories.
Click to hide internal directories.