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

Authenticates a user to the MIRACL Trust platform by generating a JWT authentication token.

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

Authenticates identity on the MIRACL Trust platform.

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

Authenticate identity in the MIRACL platform.

Link copied to clipboard

Authenticates identity in the MIRACL Trust platform.

Authenticate identity in the MIRACL platform.

Link copied to clipboard

Authenticates identity in the MIRACL Trust platform.

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

Generates a QuickCode for a registered user.

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

Generate QuickCode for a registered user.

Link copied to clipboard

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

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
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 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.

Default method to verify user identity against the MIRACL Trust 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
suspend fun sign(message: ByteArray, user: User, pinProvider: PinProvider): MIRACLResult<SigningResult, SigningException>

Creates a cryptographic signature of the given document.

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

Create a cryptographic signature of the given document.

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

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