Merge branch 'client-fix-openid-method' into 'master'
[Client] Fix openid method See merge request famedly/famedlysdk!161
This commit is contained in:
commit
3eced168a6
|
@ -1056,7 +1056,7 @@ class Client {
|
|||
/// The generated token is only valid for exchanging for user information from the federation API for OpenID.
|
||||
Future<OpenIdCredentials> requestOpenIdCredentials() async {
|
||||
final Map<String, dynamic> response = await jsonRequest(
|
||||
type: HTTPType.GET,
|
||||
type: HTTPType.POST,
|
||||
action: "/client/r0/user/$userID/openid/request_token");
|
||||
return OpenIdCredentials.fromJson(response);
|
||||
}
|
||||
|
|
|
@ -522,13 +522,6 @@ class FakeMatrixApi extends MockClient {
|
|||
|
||||
static final Map<String, Map<String, dynamic>> api = {
|
||||
"GET": {
|
||||
"/client/r0/user/@test:fakeServer.notExisting/openid/request_token":
|
||||
(var req) => {
|
||||
"access_token": "SomeT0kenHere",
|
||||
"token_type": "Bearer",
|
||||
"matrix_server_name": "example.com",
|
||||
"expires_in": 3600
|
||||
},
|
||||
"/client/r0/rooms/1/state/m.room.member/@alice:example.com": (var req) =>
|
||||
{"displayname": "Alice"},
|
||||
"/client/r0/profile/@getme:example.com": (var req) => {
|
||||
|
@ -761,6 +754,13 @@ class FakeMatrixApi extends MockClient {
|
|||
(var req) => syncResponse,
|
||||
},
|
||||
"POST": {
|
||||
"/client/r0/user/@test:fakeServer.notExisting/openid/request_token":
|
||||
(var req) => {
|
||||
"access_token": "SomeT0kenHere",
|
||||
"token_type": "Bearer",
|
||||
"matrix_server_name": "example.com",
|
||||
"expires_in": 3600
|
||||
},
|
||||
"/client/r0/login": (var req) => {
|
||||
"user_id": "@test:fakeServer.notExisting",
|
||||
"access_token": "abc123",
|
||||
|
|
Loading…
Reference in a new issue