MIRACLTrust

The entry point of the MIRACL Trust SDK. It is configured and establishes a connection with the MIRACL Trust platform during initialisation.

This is done through configure(context,configuration). Once initialised, 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 the MIRACL Trust platform.

Functions

Link copied to clipboard

Cancels the authentication session.

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

Authenticates an end user 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>)

Authenticates an end user on the MIRACL Trust platform.

Link copied to clipboard

Authenticates an end user on the MIRACL Trust platform.

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

Authenticates an end user on the MIRACL Trust platform.

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

Deletes a registered user.

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

Generates a QuickCode for a registered user.

Link copied to clipboard

Confirms user verification and obtains an activation token that is used in the registration process.

Gets authentication session details for a project in the MIRACL Trust platform based on the authentication session identifier.

Gets authentication session details for a project in the MIRACL Trust platform based on the authentication session identifier.

Gets authentication session details for a project in the MIRACL Trust platform based on the authentication session identifier.

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

Gets a registered user.

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

Gets the registered users.

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

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

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 MIRACL Trust project on the MIRACL Trust platform.

Link copied to clipboard

Default method for verifying user identity against the MIRACL Trust platform. In the current implementation, verification is done by sending an email message.

Link copied to clipboard
fun setProjectId(projectId: String)

Configures a new Project ID when the SDK has to work with a different project.

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

Creates a cryptographic signature of the given document.

Link copied to clipboard
fun updateProjectSettings(projectId: String, projectUrl: String)

Configures new project settings when the SDK has to work with a different project.