Since handlers are nested, you should be able to see outer variables in the
inner handlers. For instance something like
scope do:
let user = getUserData()
return someHandler[
someOtherHanderl[
ok(user)
]
]
Run
I guess one could abstract some pattern here: if you find yourself repeating
some logic in such situations, please file a PR with some generic handler for
user authentication.
Another possibility would be to make the context generic (`Context[A]`): this
would allow to attach arbitrary data to the context. I am not sure whether this
is worth the extra complexity, but it is something to consider