lundi 28 novembre 2016

Ember JS with remote auth backend (XML response)

Using Ember-Simple-Auth (custom authenticator) and Ember.$.ajax()

Authentication procedure:

  1. Link to authsite.com/login, and log in there
  2. If OK, external website redirects to http://ift.tt/2fJO3NU
  3. I retrieve those parameters
  4. I can get a big XML file with a lot of info by making a request to http://ift.tt/2gpnDQ9 if user is authenticated. Auth backend constraint: this request must come from the same IP as step 2.

I have a problem making this request because:

  1. Not allowed by Access-Control-Allow-Origin
  2. Not JSONP
  3. Cannot enable CORS
  4. Setting crossDomain: true and xhr credentials to true doesn't work either when doing Ember.$.ajax()

What are my options if I want to do everything in the front-end?




Aucun commentaire:

Enregistrer un commentaire