MIRACLTrust

MIRACL Trust is the entry point of the MIRACL Trust SDK. It is configured and connects with the MIRACL Trust Platform on its initialization.

Initialization is done through configure(context,configuration). After initialization, the SDK can be accessed through getInstance().

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Project ID setting for the application in MIRACL Trust platform.

Functions

Link copied to clipboard

Cancel the authentication session.

Link copied to clipboard

Cancel the signing session.

Link copied to clipboard
fun authenticate(user: User, pinProvider: PinProvider, resultHandler: ResultHandler<String, AuthenticationException>)

Authenticate identity to the MIRACL Trust platform by generating a JWT authentication token.

Link copied to clipboard
fun authenticateWithAppLink(user: User, appLink: Uri, pinProvider: PinProvider, resultHandler: ResultHandler<Unit, AuthenticationException>)

Authenticate identity in the MIRACL platform.

Link copied to clipboard

Authenticate identity in the MIRACL platform.

Link copied to clipboard
fun authenticateWithQRCode(user: User, qrCode: String, pinProvider: PinProvider, resultHandler: ResultHandler<Unit, AuthenticationException>)

Authenticate identity in the MIRACL platform.

Link copied to clipboard
suspend fun delete(user: User)
fun delete(user: User, resultHandler: ResultHandler<Unit, UserStorageException>)

Delete a registered user.

Link copied to clipboard
fun generateQuickCode(user: User, pinProvider: PinProvider, resultHandler: ResultHandler<QuickCode, QuickCodeException>)

Generate QuickCode for a registered user.

Link copied to clipboard

The method confirms user verification and as a result, an activation token is obtained. This activation token should be used in the registration process.

Get authentication session details for project in MIRACL platform based on authentication session identifier.

Get authentication session details for project in MIRACL platform based on authentication session identifier.

Get authentication session details for project in MIRACL platform based on authentication session identifier.

Link copied to clipboard

Get signing session details from MIRACL platform based on session identifier.

Link copied to clipboard

Get signing session details from MIRACL platform based on session identifier.

Link copied to clipboard
suspend fun getUser(userId: String): User?
fun getUser(userId: String, resultHandler: ResultHandler<User?, UserStorageException>)

Get a registered user.

Link copied to clipboard
suspend fun getUsers(): List<User>

Get the registered users.

Link copied to clipboard
fun register(userId: String, activationToken: String, pinProvider: PinProvider, pushNotificationsToken: String? = null, resultHandler: ResultHandler<User, RegistrationException>)

Provides end-user registration. Registers an end-user for a given MIRACLTrust Project to the MIRACLTrust platform.

Link copied to clipboard

Default method to verify user identity against the MIRACL platform. In the current implementation it is done by sending an email message.

Link copied to clipboard
fun setProjectId(projectId: String)

Configure a new project ID when the SDK have to work with a different project.

Link copied to clipboard
fun sign(message: ByteArray, user: User, pinProvider: PinProvider, resultHandler: ResultHandler<SigningResult, SigningException>)

Create a cryptographic signature of the given document.