Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization Header possible error in token.js #3

Closed
wieseljonas opened this issue Sep 9, 2014 · 1 comment
Closed

Authorization Header possible error in token.js #3

wieseljonas opened this issue Sep 9, 2014 · 1 comment

Comments

@wieseljonas
Copy link

Hi I noticed that there might be an error in the authorize method.

I had to change this.HeaderName to this.authorizationHeaderName

authorize: function(jqXHR, requestOptions) {
    var token = this.get('session.' + this.tokenPropertyName);
    if (this.get('session.isAuthenticated') && !Ember.isEmpty(token)) {
      if (!isSecureUrl(requestOptions.url)) {
        Ember.Logger.warn('Credentials are transmitted via an insecure connection - use HTTPS to keep them secure.');
      }
      jqXHR.setRequestHeader(this.authorizationHeaderName, this.authorizationPrefix + token);
    }
  }
@jpadilla
Copy link
Contributor

jpadilla commented Sep 9, 2014

@wieseljonas for the heads up, just released a new version with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants