saveIdentityAsync
suspend fun saveIdentityAsync(sessionId: String, authFactor: AuthFactor, rawTMRSymKey: ByteArray, identity: ByteArray, challenge: String? = null): SaveIdentityResponse
Save the Seald account to SSKS.
Return
A SaveIdentityResponse instance, containing the SSSKS ID of the stored identity, which can be used by your backend to manage it, and if a challenge was passed authenticatedSessionId
, a new authenticated sessionId, that you can use to perform further SSKS TMR operations without challenge.
Parameters
sessionId | Session ID given by SSKS to your app's server. |
authFactor | Authentication method of this user, to which SSKS has sent a challenge at the request of your app's server. |
rawTMRSymKey | The raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be a cryptographically random buffer of 64 bytes. |
identity | The identity to save. |
challenge | Optional. The challenge sent by SSKS to the user's authentication method, if any. |
Throws
SealdException |