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

Add accessToken to the current context #743

Closed
bajtos opened this issue Nov 5, 2014 · 2 comments
Closed

Add accessToken to the current context #743

bajtos opened this issue Nov 5, 2014 · 2 comments

Comments

@bajtos
Copy link
Member

bajtos commented Nov 5, 2014

#337 added support for context-propagation. To make it more useful, loopback.token should save the access token in the context, so that it can be accessed by other parts of the system. At the moment, the token is stored on the req object only:

See lib/middleware/token.js#54.

Proposed solution:

req.accessToken = token || null;
var ctx = loopback.getCurrentContext();
if (ctx) ctx.accessToken = req.accessToken;
@leolara
Copy link

leolara commented Nov 13, 2014

👍

@bajtos
Copy link
Member Author

bajtos commented Nov 13, 2014

This was already implemented in #775

@bajtos bajtos closed this as completed Nov 13, 2014
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