var stubMyService=Ember.Object.extend({
//'authenticator:ooion( OAuth,username, password)
authenticate(OAuth2,username,password)
{
return new Ember.RSVP.Promise(function(reject){
Ember.run(null,reject,obj);
});
}
});
Callback to RSVP.Promise accepts 2 arguments - resolve, and reject.
return new Ember.RSVP.Promise(function(resolve, reject) {
Ember.run(null, reject, obj);
});
Or, in ES2017 syntax:
return new Ember.RSVP.Promise((resolve, reject) => Ember.run(null, reject, obj));