Skip to content

Commit

Permalink
MXIdentityServerRestClient: Match registration endpoint to the IS r0.…
Browse files Browse the repository at this point in the history
  • Loading branch information
manuroe committed Nov 12, 2019
1 parent ac4aff6 commit a1336f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changes in Matrix iOS SDK in 0.15.1 (2019-xx-xx)
Improvements:
* Well-known: Expose "m.integrations" according to [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957) (vector-im/riot-ios#2815).
* MXSession: Expose and store homeserverWellknown.

Bug fix:
* MXIdentityServerRestClient: Match registration endpoint to the IS r0.3.0 spec (vector-im/riot-ios#2824).

Changes in Matrix iOS SDK in 0.15.0 (2019-11-06)
===============================================
Expand Down
9 changes: 8 additions & 1 deletion MatrixSDK/IdentityServer/MXIdentityServerRestClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,14 @@ - (MXHTTPOperation*)registerWithOpenIdToken:(MXOpenIdToken*)openIdToken
{
__block NSString *token;
[self dispatchProcessing:^{
MXJSONModelSetString(token, JSONResponse[@"access_token"]);
NSString *token;
MXJSONModelSetString(token, JSONResponse[@"token"]);

// The spec is `token`, but we used `access_token` for a Sydent release :/
if (!token)
{
MXJSONModelSetString(token, JSONResponse[@"access_token"]);
}
} andCompletion:^{
success(token);
}];
Expand Down

0 comments on commit a1336f1

Please sign in to comment.