Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Add an 'expand' option for oauthFilter #4

@ilaif

Description

@ilaif

Requests are authenticated on any protected routes with the access_token, and an account is attached to 'req' when the authentication is successful. It is vital to add an 'expand' parameter to options in creation of oauthFilter to expand 'customData' for example since I use it almost in any route. Will reduce latency time of api calls in half.

Example:
var stormpathFilters = stormpathRestify.createFilterSet(stormpathConfig);
oauthFilter = stormpathFilters.createOauthFilter({expand: 'customData'});

Then I could do:
oauthFilter(req, res, function (err) {
console.log(req.account.customData);
});

Thanks in advance!
Ilai

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