Companion

object Companion

Properties

Link copied to clipboard

Returns IDs of all available Credential objects in storage.

Link copied to clipboard

The default Credential. This is null if no default Credential exists, and it can be set to null to unset the default Credential.

Functions

Link copied to clipboard
suspend fun allIdsAsync(): List<String>

Returns IDs of all available Credential objects in storage.

Link copied to clipboard
fun find(promptInfo: BiometricPrompt.PromptInfo? = Security.promptInfo, where: (Token.Metadata) -> Boolean): List<Credential>

Return all Credential objects matching the given where expression. The where expression is supplied with Token.Metadata and should return true for cases where the user wants to fetch Credential with given Token.Metadata.

Link copied to clipboard
suspend fun findAsync(promptInfo: BiometricPrompt.PromptInfo? = Security.promptInfo, where: (Token.Metadata) -> Boolean): List<Credential>

Return all Credential objects matching the given where expression. The where expression is supplied with Token.Metadata and should return true for cases where the user wants to fetch Credential with given Token.Metadata.

Link copied to clipboard
suspend fun getDefaultAsync(): Credential?

Returns the default Credential, or null if no default Credential exists.

Link copied to clipboard

Returns Token.Metadata of Credential with specified id.

Link copied to clipboard

Returns Token.Metadata of Credential with specified id.

Link copied to clipboard
suspend fun setDefaultAsync(credential: Credential?)

Sets the default Credential to provided credential. Unsets the default Credential if credential is null.

Link copied to clipboard

Sets the Token.Metadata of Token with specified Token.Metadata.id.

Link copied to clipboard
suspend fun setMetadataAsync(metadata: Token.Metadata)

Sets the Token.Metadata of Token with specified Token.Metadata.id.

Link copied to clipboard
fun store(token: Token, tags: Map<String, String> = emptyMap(), security: Credential.Security = Security.standard): Credential

Store a Token with optional tags and security options. Return the Credential object associated with the stored Token

Link copied to clipboard
suspend fun storeAsync(token: Token, tags: Map<String, String> = emptyMap(), security: Credential.Security = Security.standard): Credential

Store a Token with optional tags and security options. Return the Credential object associated with the stored Token

Link copied to clipboard
fun with(id: String, promptInfo: BiometricPrompt.PromptInfo? = Security.promptInfo): Credential?

Return the Credential associated with the given id.

Link copied to clipboard
suspend fun withAsync(id: String, promptInfo: BiometricPrompt.PromptInfo? = Security.promptInfo): Credential?

Return the Credential associated with the given id.