This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-2
lines changed
owncloudComLibrary/src/main/java/com/owncloud/android/lib Expand file tree Collapse file tree 4 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ public class HttpConstants {
56
56
public static final String HEADER_GRANT_TYPE = "grant_type" ;
57
57
public static final String HEADER_REDIRECT_URI = "redirect_uri" ;
58
58
public static final String HEADER_CODE_VERIFIER = "code_verifier" ;
59
+ public static final String HEADER_REFRESH_TOKEN = "refresh_token" ;
59
60
60
61
/***********************************************************************************************************
61
62
************************************************ CONTENT TYPES ********************************************
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import com.owncloud.android.lib.common.http.HttpConstants.HEADER_AUTHORIZATION_C
32
32
import com.owncloud.android.lib.common.http.HttpConstants.HEADER_CODE_VERIFIER
33
33
import com.owncloud.android.lib.common.http.HttpConstants.HEADER_GRANT_TYPE
34
34
import com.owncloud.android.lib.common.http.HttpConstants.HEADER_REDIRECT_URI
35
+ import com.owncloud.android.lib.common.http.HttpConstants.HEADER_REFRESH_TOKEN
35
36
import com.owncloud.android.lib.common.http.HttpConstants.HTTP_OK
36
37
import com.owncloud.android.lib.common.http.methods.nonwebdav.PostMethod
37
38
import com.owncloud.android.lib.common.operations.RemoteOperation
@@ -46,7 +47,7 @@ import timber.log.Timber
46
47
import java.net.URL
47
48
48
49
/* *
49
- * Get OIDC Discovery
50
+ * Perform token request
50
51
*
51
52
* @author Abel García de Prada
52
53
*/
@@ -67,6 +68,7 @@ class TokenRequestRemoteOperation(
67
68
.add(HEADER_GRANT_TYPE , tokenRequestParams.grantType)
68
69
.add(HEADER_REDIRECT_URI , tokenRequestParams.redirectUri)
69
70
.add(HEADER_CODE_VERIFIER , tokenRequestParams.codeVerifier)
71
+ .add(HEADER_REFRESH_TOKEN , tokenRequestParams.refreshToken.orEmpty())
70
72
.build()
71
73
72
74
val postMethod = PostMethod (URL (uriBuilder.toString()), requestBody)
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class TokenRequestParams(
28
28
val authorizationCode : String ,
29
29
val grantType : String ,
30
30
val redirectUri : String ,
31
+ val refreshToken : String? = null ,
31
32
val codeVerifier : String ,
32
33
val clientAuth : String
33
34
)
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ data class TokenResponse(
34
34
@Json(name = " expires_in" )
35
35
val expiresIn : Int ,
36
36
@Json(name = " refresh_token" )
37
- val refreshToken : String ,
37
+ val refreshToken : String? ,
38
38
@Json(name = " token_type" )
39
39
val tokenType : String ,
40
40
@Json(name = " user_id" )
You can’t perform that action at this time.
0 commit comments