Setting "global" variables from middleware
somecallmemike opened this issue · 1 comments
somecallmemike commented
Is it possible to pass an object for use in controllers from a middleware? I created an authorization middleware for protected routes which calls AccessToken.verify, and I would like to pass the accessToken/user data from it's output to the next controller.
keithwhor commented
You should have access to the controller
object, and we suggest appending user
and accessToken
to controller.params
:).