Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Web.MiddlewareSourceval user :
?key:string ->
(string -> Sihl__.Contract_user.t option Lwt.t) ->
Rock.Middleware.tuser ?key find_user returns a middleware that sets the current user based on the Bearer Token in the Authorization header.
key is the user id that has been used to store a user id in the session. Be default, the value is user_id.
find_user is a function that returns a user given a user id.