PasskeyStorage

Handles Passkey-based cloud storage operations including encryption, decryption, and authentication.

Constructors

Link copied to clipboard
constructor(apiKey: String, encryption: PortalEncryption = PortalEncryption(PortalMobileMpc()), requests: PortalRequests = PortalRequests(), webAuthnHost: String = "https://backup.web.portalhq.io", preferImmediatelyAvailableCredentials: Boolean = false)

Constructs a new PasskeyStorage instance.

constructor(relyingPartyId: String, relyingPartyOrigins: List<String>, webAuthnHost: String = "https://backup.web.portalhq.io", preferImmediatelyAvailableCredentials: Boolean = false)

Properties

Link copied to clipboard
open override var api: Api?
Link copied to clipboard
Link copied to clipboard
open override var method: BackupMethods

Functions

Link copied to clipboard
suspend fun canUsePasskeys(): Boolean

Checks if the device supports Passkeys.

Link copied to clipboard
fun configurePasskey(relyingPartyId: String, relyingPartyOrigins: List<String>, webAuthnHost: String)

Configures Passkey authentication settings.

Link copied to clipboard
open override fun decrypt(value: String, key: String): String

Decrypts an encrypted value using the provided key.

Link copied to clipboard
open suspend override fun delete(): Boolean

Deletes stored data. This function currently returns true as a placeholder.

Link copied to clipboard
open override fun encrypt(value: String): EncryptedData

Encrypts a given value.

Link copied to clipboard
open suspend override fun read(): String

Reads the encrypted key from Passkey storage.

Link copied to clipboard
open suspend override fun validateOperations(): Boolean

Validates if Passkey-based operations can be performed.

Link copied to clipboard
@RequiresApi(value = 26)
open suspend override fun write(content: String): String

Writes an encryption key to Passkey storage.