Skip to content

Commit 3ce8c78

Browse files
committed
test: add useAuthorizationHeader field to test objects
1 parent 34d4ea2 commit 3ce8c78

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

owncloudData/src/test/java/com/owncloud/android/data/oauth/RemoteOAuthUtils.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
* ownCloud Android client application
33
*
44
* @author Abel García de Prada
5-
* Copyright (C) 2021 ownCloud GmbH.
5+
* @author Jorge Aguado Recio
6+
*
7+
* Copyright (C) 2025 ownCloud GmbH.
68
*
79
* This program is free software: you can redistribute it and/or modify
810
* it under the terms of the GNU General Public License version 2,
@@ -52,7 +54,8 @@ val OC_REMOTE_TOKEN_REQUEST_PARAMS_ACCESS = TokenRequestParams.Authorization(
5254
clientSecret = null,
5355
authorizationCode = OC_TOKEN_REQUEST_ACCESS.authorizationCode,
5456
redirectUri = OC_TOKEN_REQUEST_ACCESS.redirectUri,
55-
codeVerifier = OC_TOKEN_REQUEST_ACCESS.codeVerifier
57+
codeVerifier = OC_TOKEN_REQUEST_ACCESS.codeVerifier,
58+
useAuthorizationHeader = true
5659
)
5760

5861
val OC_REMOTE_TOKEN_REQUEST_PARAMS_REFRESH = TokenRequestParams.RefreshToken(
@@ -62,7 +65,8 @@ val OC_REMOTE_TOKEN_REQUEST_PARAMS_REFRESH = TokenRequestParams.RefreshToken(
6265
scope = OC_TOKEN_REQUEST_REFRESH.scope,
6366
clientId = null,
6467
clientSecret = null,
65-
refreshToken = OC_TOKEN_REQUEST_REFRESH.refreshToken
68+
refreshToken = OC_TOKEN_REQUEST_REFRESH.refreshToken,
69+
useAuthorizationHeader = true
6670
)
6771

6872
val OC_REMOTE_TOKEN_RESPONSE = TokenResponse(

owncloudTestUtil/src/main/java/com/owncloud/android/testutil/oauth/TokenRequest.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
* ownCloud Android client application
33
*
44
* @author Abel García de Prada
5-
* Copyright (C) 2021 ownCloud GmbH.
5+
* @author Jorge Aguado Recio
6+
*
7+
* Copyright (C) 2025 ownCloud GmbH.
68
*
79
* This program is free software: you can redistribute it and/or modify
810
* it under the terms of the GNU General Public License version 2,
@@ -31,7 +33,8 @@ val OC_TOKEN_REQUEST_REFRESH = TokenRequest.RefreshToken(
3133
tokenEndpoint = OC_TOKEN_ENDPOINT,
3234
clientAuth = OC_CLIENT_AUTH,
3335
scope = OC_SCOPE,
34-
refreshToken = OC_REFRESH_TOKEN
36+
refreshToken = OC_REFRESH_TOKEN,
37+
useAuthorizationHeader = true
3538
)
3639

3740
val OC_TOKEN_REQUEST_ACCESS = TokenRequest.AccessToken(
@@ -41,5 +44,6 @@ val OC_TOKEN_REQUEST_ACCESS = TokenRequest.AccessToken(
4144
scope = OC_SCOPE,
4245
authorizationCode = "4uth0r1z4t10nC0d3",
4346
redirectUri = OC_REDIRECT_URI,
44-
codeVerifier = "A high-entropy cryptographic random STRING using the unreserved characters"
47+
codeVerifier = "A high-entropy cryptographic random STRING using the unreserved characters",
48+
useAuthorizationHeader = true
4549
)

0 commit comments

Comments
 (0)