createEncryptedTokenStorage
Creates a RoomTokenStorage for Android applications, encrypting the access token via AndroidTokenEncryptionHandler (Android Keystore, with optional biometric gating).
Return
a configured RoomTokenStorage instance with encryption enabled.
Parameters
the Android application context.
the OAuth2ClientConfiguration used to reconstruct tokens.
the Android Keystore alias for the encryption key. Defaults to AndroidTokenEncryptionHandler.DEFAULT_KEY_ALIAS.
when true, decrypting a stored token requires a biometric (or device credential) challenge. See AndroidTokenEncryptionHandler.
seconds after a successful biometric challenge during which decryption may proceed without re-prompting; 0 means "auth-per-use". Ignored when requireBiometric is false.
the BiometricPrompt.PromptInfo to display for biometric challenges. Required (non-null) when requireBiometric is true — see AndroidTokenEncryptionHandler.
the Room database file name. Defaults to TokenDatabase.DB_NAME.
Creates a RoomTokenStorage for JVM applications with AES-256-GCM encryption.
The encryption handler uses JceTokenEncryptionHandler by default, which manages encryption keys at ~/.okta/.encryption_key (Base64 encoded). Custom key providers can be supplied via encryptionKeyProvider.
Return
a configured RoomTokenStorage instance with encryption enabled.
Parameters
the OAuth2ClientConfiguration used to reconstruct tokens.
the file system path for the database. Defaults to ~/.okta/common_token_database.
optional lambda to provide a custom SecretKey. Defaults to JCE key management.