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

Override headersForRequest (with tests) #1033

Merged

Conversation

f3ndot
Copy link
Contributor

@f3ndot f3ndot commented Jul 28, 2016

Original work completed by @JeroenvdV in #1009, but now with tests and asserting authorizer presence.

This attempts to fix #1003 so Ember Data 2.7 and greater can send authorization header data when using DataAdapterMixin.

@marcoow let me know if this test coverage is sufficient!

Jeroen van de Ven and others added 3 commits July 28, 2016 09:09
Adds request headers containing the authorization data as constructed
by the {{#crossLink "DataAdapterMixin/authorizer:property"}}{{/crossLink}}.

This method will only called in Ember Data 2.7 or greater, older versions
Copy link
Member

@marcoow marcoow Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method will only *be* called in Ember Data 2.7 or greater, older versions ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell I've had 4hrs of sleep today 😉

@marcoow marcoow added this to the 1.2 milestone Jul 28, 2016
@marcoow
Copy link
Member

marcoow commented Jul 28, 2016

Looks good! Left some comments on minor assertion-style things.

@f3ndot
Copy link
Contributor Author

f3ndot commented Jul 29, 2016

@marcoow should be good to go!

@marcoow marcoow merged commit 1ae1e2d into mainmatter:master Jul 29, 2016
@f3ndot f3ndot deleted the support-headersforrequest-with-tests branch July 29, 2016 16:11
bakerac4 pushed a commit to bakerac4/ember-simple-auth that referenced this pull request Sep 8, 2016
* Override headersForRequest, fixes mainmatter#1003

* Test headersForRequest, assert authorizer presence

Also relocates headersForRequest closer to its older equivalent, ajaxOptions

* Test for when Adapter doesn't have headersForRequest

* Better English, remove redundant test assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ember 2.7 and 2.8 seems to be not sending AUTHORIZATION data
2 participants