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

Push Device Update Registration: fix request authentication #867

Merged
merged 9 commits into from
Jul 4, 2019

Conversation

ricardopereira
Copy link
Contributor

@ricardopereira ricardopereira commented Jul 1, 2019

  • deviceUpdateRegistration method was setting a wrong Authorization header and was trying to read an updated deviceIdentityToken from the response body. Since that field doesn't exist, the local deviceIdentityTokenDetails was updated with a token=nil.

@ricardopereira
Copy link
Contributor Author

I'll clean this mess and rebase.

@ricardopereira ricardopereira force-pushed the fix-push-auth-update-registration branch from 2b74677 to 7f112d3 Compare July 3, 2019 13:45
@ricardopereira ricardopereira requested a review from paddybyers July 3, 2019 16:08
let authorization = request.allHTTPHeaderFields?["X-Ably-DeviceIdentityToken"]
expect(authorization).to(equal(testIdentityTokenDetails.token.base64Encoded()))
expect(request.allHTTPHeaderFields?["Authorization"]).toNot(beNil())
let deviceAuthorization = request.allHTTPHeaderFields?["X-Ably-DeviceIdentityToken"]
Copy link
Member

Choose a reason for hiding this comment

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

Still lots of references to this header. These should all be updated to X-Ably-DeviceToken. (That's not what the spec says, but that's what's implemented in the system, so we will update those as a separate piece of work.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 256c1e5. Thanks

Copy link
Member

@paddybyers paddybyers left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@ricardopereira ricardopereira merged commit 34b9f15 into develop Jul 4, 2019
@ricardopereira ricardopereira deleted the fix-push-auth-update-registration branch July 4, 2019 00:38
@ricardopereira ricardopereira mentioned this pull request Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants