vendredi 17 juin 2016

Accessing ember-simple-auth-token authorizer in NodeJS endpoint

I am trying to figure out where the authorizer:application' gets set in the request. Should it be somewhere in the headers? I am unable to find it in the request in the nodejs endpoint when making requests from the app.

The code I have in ember (adapter/application.js) is:

import DS from "ember-data";
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';

export default DS.RESTAdapter.extend(DataAdapterMixin, {
  authorizer: 'authorizer:application',

And the endpoint is a simple:

exports.getAuthorizer = function(req, res) {
  console.log(req);
}

I have logged req hoping I can find the authorizer inside but can't find it.

If you require more information please let me know, thanks

ember-simple-auth-token: http://ift.tt/22XE0pU




Aucun commentaire:

Enregistrer un commentaire