mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 07:56:19 +00:00
Support refresh token with any idP
This commit is contained in:
parent
d683da3602
commit
9208af89fe
@ -59,10 +59,6 @@ class TokenRequestRemoteOperation(
|
||||
var result: RemoteOperationResult<TokenResponse>
|
||||
|
||||
try {
|
||||
val uriBuilder = client.baseUri.buildUpon().apply {
|
||||
appendEncodedPath(tokenRequestParams.tokenEndpoint)
|
||||
}.build()
|
||||
|
||||
val requestBody = FormBody.Builder()
|
||||
.add(HEADER_AUTHORIZATION_CODE, tokenRequestParams.authorizationCode)
|
||||
.add(HEADER_GRANT_TYPE, tokenRequestParams.grantType)
|
||||
@ -71,7 +67,7 @@ class TokenRequestRemoteOperation(
|
||||
.add(HEADER_REFRESH_TOKEN, tokenRequestParams.refreshToken.orEmpty())
|
||||
.build()
|
||||
|
||||
val postMethod = PostMethod(URL(uriBuilder.toString()), requestBody)
|
||||
val postMethod = PostMethod(URL(tokenRequestParams.tokenEndpoint), requestBody)
|
||||
|
||||
postMethod.addRequestHeader(AUTHORIZATION_HEADER, tokenRequestParams.clientAuth)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user