Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 9208af8

Browse files
committed
Support refresh token with any idP
1 parent d683da3 commit 9208af8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/oauth/TokenRequestRemoteOperation.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ class TokenRequestRemoteOperation(
5959
var result: RemoteOperationResult<TokenResponse>
6060

6161
try {
62-
val uriBuilder = client.baseUri.buildUpon().apply {
63-
appendEncodedPath(tokenRequestParams.tokenEndpoint)
64-
}.build()
65-
6662
val requestBody = FormBody.Builder()
6763
.add(HEADER_AUTHORIZATION_CODE, tokenRequestParams.authorizationCode)
6864
.add(HEADER_GRANT_TYPE, tokenRequestParams.grantType)
@@ -71,7 +67,7 @@ class TokenRequestRemoteOperation(
7167
.add(HEADER_REFRESH_TOKEN, tokenRequestParams.refreshToken.orEmpty())
7268
.build()
7369

74-
val postMethod = PostMethod(URL(uriBuilder.toString()), requestBody)
70+
val postMethod = PostMethod(URL(tokenRequestParams.tokenEndpoint), requestBody)
7571

7672
postMethod.addRequestHeader(AUTHORIZATION_HEADER, tokenRequestParams.clientAuth)
7773

0 commit comments

Comments
 (0)