authentication - Ember.js REST Auth Headers -


i've been struggling long now. have expressjs server provides endpoint login. response has jwt token, expiring in hour. good.

on emberjs side, can authenticate , token (using ember-simple-auth , ember-simple-auth-token). works protecting routes. can't life of me update restadapter headers include new authorization token.

i've tried:

  • using $.ajaxprefilter set authorization header. didn't work
  • accessing "this.get('session.secure.token')" restadapter. thats undefined.

please, if point me in right direction, i'd eternally grateful. need attach value in "session.secure.token" header restadapter requests.

thanks

you should able set simple-auth config property authorizer simple-auth-authorizer:token - in simple-auth code looks config property, looks simple-auth-authorizer:token , uses in combination ajaxprefilter.

// config/environment.js env['simple-auth'] = {   authorizer: 'simple-auth-authorizer:token' }; 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -