From e4b65053d4c983ae2832ebb9cc8df4570469f50e Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 20 May 2021 18:41:27 +0200 Subject: [PATCH] Jitsi auth: fix openId API --- .../sdk/internal/session/thirdparty/ThirdPartyAPI.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/ThirdPartyAPI.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/ThirdPartyAPI.kt index c4f17835ba..3e810a1a13 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/ThirdPartyAPI.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/ThirdPartyAPI.kt @@ -19,8 +19,11 @@ package org.matrix.android.sdk.internal.session.thirdparty import org.matrix.android.sdk.api.session.room.model.thirdparty.OpenIdToken import org.matrix.android.sdk.api.session.room.model.thirdparty.ThirdPartyProtocol import org.matrix.android.sdk.api.session.thirdparty.model.ThirdPartyUser +import org.matrix.android.sdk.api.util.JsonDict import org.matrix.android.sdk.internal.network.NetworkConstants +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.POST import retrofit2.http.Path import retrofit2.http.QueryMap @@ -50,8 +53,10 @@ internal interface ThirdPartyAPI { * * Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-user-userid-openid-request-token */ - @GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/openid/request_token") - suspend fun requestOpenIdToken(@Path("userId") userId: String): OpenIdToken + @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/openid/request_token") + suspend fun requestOpenIdToken(@Path("userId") userId: String, + // We should post an empty body + @Body body: JsonDict = HashMap()): OpenIdToken }