-
Notifications
You must be signed in to change notification settings - Fork 169
Store the Dpop thumbprint to local storage #940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
e2c65d4
7145784
ec2c6ed
dac4dce
3283ad2
5875c0c
97fd1b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,6 +189,8 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT | |
| ) | ||
| storage.store(LEGACY_KEY_CACHE_EXPIRES_AT, credentials.expiresAt.time) | ||
| storage.store(KEY_CAN_REFRESH, canRefresh) | ||
| storage.store(KEY_TOKEN_TYPE, credentials.type) | ||
| saveDPoPThumbprint(credentials) | ||
| } catch (e: IncompatibleDeviceException) { | ||
| throw CredentialsManagerException( | ||
| CredentialsManagerException.Code.INCOMPATIBLE_DEVICE, e | ||
|
|
@@ -735,6 +737,8 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT | |
| storage.remove(KEY_EXPIRES_AT) | ||
| storage.remove(LEGACY_KEY_CACHE_EXPIRES_AT) | ||
| storage.remove(KEY_CAN_REFRESH) | ||
| storage.remove(KEY_TOKEN_TYPE) | ||
| storage.remove(KEY_DPOP_THUMBPRINT) | ||
| clearBiometricSession() | ||
| Log.d(TAG, "Credentials were just removed from the storage") | ||
| } | ||
|
|
@@ -1251,6 +1255,9 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT | |
| @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) | ||
| internal const val KEY_ALIAS = "com.auth0.key" | ||
|
|
||
| @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) | ||
| internal const val KEY_TOKEN_TYPE = "com.auth0.token_type" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: KEY_TOKEN_TYPE with the same value "com.auth0.token_type" already exists as a private const in CredentialsManager (line 764). Now we have it in two places — might drift. Since KEY_DPOP_THUMBPRINT was placed in BaseCredentialsManager for sharing, can we do the same for KEY_TOKEN_TYPE?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
|
||
| // Using NO_SESSION to represent "no session" (uninitialized state) | ||
| private const val NO_SESSION = -1L | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.