Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting "global" variables from middleware #326

Closed
somecallmemike opened this issue Mar 13, 2017 · 1 comment
Closed

Setting "global" variables from middleware #326

somecallmemike opened this issue Mar 13, 2017 · 1 comment

Comments

@somecallmemike
Copy link

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
Copy link
Owner

You should have access to the controller object, and we suggest appending user and accessToken to controller.params :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants