-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
…ted when there's a deviceIdentityToken in the response. - The respond body from PATCH /push/deviceRegistrations/{deviceId} has not 'deviceIdentityToken' field.
…no 'deviceIdentityToken' field.
I'll clean this mess and rebase. |
2b74677
to
7f112d3
Compare
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"] |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 256c1e5. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
deviceUpdateRegistration
method was setting a wrong Authorization header and was trying to read an updateddeviceIdentityToken
from the response body. Since that field doesn't exist, the localdeviceIdentityTokenDetails
was updated with atoken=nil
.