Skip to content

Commit 97fd1b1

Browse files
committed
Moved the token type key to BaseCredentialsManager class
1 parent 5875c0c commit 97fd1b1

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

auth0/src/main/java/com/auth0/android/authentication/storage/BaseCredentialsManager.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ public abstract class BaseCredentialsManager internal constructor(
2525

2626
internal companion object {
2727
internal const val KEY_DPOP_THUMBPRINT = "com.auth0.dpop_key_thumbprint"
28+
29+
@VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
30+
internal const val KEY_TOKEN_TYPE = "com.auth0.token_type"
2831
}
32+
2933
private var _clock: Clock = ClockImpl()
3034

3135
/**
@@ -169,7 +173,7 @@ public abstract class BaseCredentialsManager internal constructor(
169173
*/
170174
protected fun saveDPoPThumbprint(credentials: Credentials) {
171175
val dpopUsed = credentials.type.equals("DPoP", ignoreCase = true)
172-
|| authenticationClient.isDPoPEnabled
176+
|| authenticationClient.isDPoPEnabled
173177

174178
if (!dpopUsed) {
175179
storage.remove(KEY_DPOP_THUMBPRINT)

auth0/src/main/java/com/auth0/android/authentication/storage/CredentialsManager.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,6 @@ public class CredentialsManager @VisibleForTesting(otherwise = VisibleForTesting
763763
private const val KEY_ACCESS_TOKEN = "com.auth0.access_token"
764764
private const val KEY_REFRESH_TOKEN = "com.auth0.refresh_token"
765765
private const val KEY_ID_TOKEN = "com.auth0.id_token"
766-
private const val KEY_TOKEN_TYPE = "com.auth0.token_type"
767766
private const val KEY_EXPIRES_AT = "com.auth0.expires_at"
768767
private const val KEY_SCOPE = "com.auth0.scope"
769768

auth0/src/main/java/com/auth0/android/authentication/storage/SecureCredentialsManager.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,8 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
897897
callback.onFailure(
898898
CredentialsManagerException(
899899
CredentialsManagerException.Code.MFA_REQUIRED,
900-
error.message ?: "Multi-factor authentication is required to complete the credential renewal.",
900+
error.message
901+
?: "Multi-factor authentication is required to complete the credential renewal.",
901902
error,
902903
error.mfaRequiredErrorPayload
903904
)
@@ -1055,7 +1056,8 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
10551056
callback.onFailure(
10561057
CredentialsManagerException(
10571058
CredentialsManagerException.Code.MFA_REQUIRED,
1058-
error.message ?: "Multi-factor authentication is required to complete the credential renewal.",
1059+
error.message
1060+
?: "Multi-factor authentication is required to complete the credential renewal.",
10591061
error,
10601062
error.mfaRequiredErrorPayload
10611063
)
@@ -1255,8 +1257,6 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
12551257
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
12561258
internal const val KEY_ALIAS = "com.auth0.key"
12571259

1258-
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
1259-
internal const val KEY_TOKEN_TYPE = "com.auth0.token_type"
12601260

12611261
// Using NO_SESSION to represent "no session" (uninitialized state)
12621262
private const val NO_SESSION = -1L

0 commit comments

Comments
 (0)