Skip to content

Add accessToken to the current context #743

Closed

Description

@bajtos

#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;

Activity

  1. leolara commented on Nov 13, 2014

    @leolara

    👍

  2. bajtos commented on Nov 13, 2014

    @bajtos
    MemberAuthor

    This was already implemented in #775

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions