RoomTokenStorage

class RoomTokenStorage(tokenDatabase: TokenDatabase, tokenEncryptionHandler: TokenEncryptionHandler) : TokenStorage

Deprecated

RoomTokenStorage is deprecated in favor of com.okta.authfoundation.credential.kmp.storage.RoomTokenStorage, used by the KMP TokenCredentialManager. On Android, back it with AndroidTokenEncryptionHandler for Keystore/biometric-backed encryption. This class will be removed in a future major release.

Constructors

Link copied to clipboard
constructor(tokenDatabase: TokenDatabase, tokenEncryptionHandler: TokenEncryptionHandler)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun add(token: Token, metadata: Token.Metadata, security: Credential.Security = Credential.Security.standard)

Add Token and its Token.Metadata to storage. Encrypt Token with specified security.

Link copied to clipboard
open suspend override fun allIds(): List<String>
Link copied to clipboard
open suspend override fun getToken(id: String, promptInfo: BiometricPrompt.PromptInfo? = Credential.Security.promptInfo): Token

Get Token from storage with associated id.

Link copied to clipboard
open suspend override fun metadata(id: String): Token.Metadata?
Link copied to clipboard
open suspend override fun remove(id: String)

Remove Token with given id from the storage. Does nothing if the provided id does not exist in storage.

Link copied to clipboard
open suspend override fun replace(token: Token)

Replace Token with Token.id with the given token. If no such Token with the given Token.id exists, NoSuchElementException is thrown.

Link copied to clipboard
open suspend override fun setMetadata(metadata: Token.Metadata)

Set Token.Metadata for the token with Token.Metadata.id