MiraclTrust

# MiraclTrust

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

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

class MiraclTrust

# Types

Name Summary
Companion
Content
object Companion


# Functions

Name Summary
authenticate
Brief description


Authenticate a registered user.


Content
fun authenticate(authenticationUser: AuthenticationUser, accessId: String, pinProvider: PinProvider, resultHandler: ResultHandler<Unit, Error>)


deleteSigningUser
Brief description


Delete a signing user.


Content
fun deleteSigningUser(signingUser: SigningUser)


deleteUser
Brief description


Delete a registered user.


Content
fun deleteUser(authenticationUser: AuthenticationUser)


equals
Content
open operator override fun equals(other: Any?): Boolean


generateAuthCode
Brief description


Generate an authentication code for a registered user.


Content
fun generateAuthCode(authenticationUser: AuthenticationUser, pinProvider: PinProvider, resultHandler: ResultHandler<String, Error>)


generateOTP
Brief description


Generate OTP for a registered authentication user.


Content
fun generateOTP(authenticationUser: AuthenticationUser, pinProvider: PinProvider, resultHandler: ResultHandler<OTP, Error>)


generateQuickCode
Brief description


Generate Quick Code for a registered authentication user.


Content
fun generateQuickCode(authenticationUser: AuthenticationUser, pinProvider: PinProvider, resultHandler: ResultHandler<QuickCode, Error>)


getActivationToken
Brief description


Default method to obtain activation token using the URL provided in the verification email.


Content
fun getActivationToken(verificationUrl: String, resultHandler: ResultHandler<ActivationTokenResponse, Error>)


hashCode
Content
open override fun hashCode(): Int


register
Brief description


Provides end-user registration. Registers an end-user for a given MiraclTrust Customer to the MiraclTrust platform.


Content
@JvmOverloads()

fun register(userId: String, activationToken: ActivationToken, pinProvider: PinProvider, resultHandler: ResultHandler<AuthenticationUser, Error>, deviceName: String, pushNotificationsToken: String?)


sign
Brief description


Create a cryptographic signature of the given document.


Content
fun sign(message: ByteArray, timestamp: Date, signingUser: SigningUser, pinProvider: PinProvider, resultHandler: ResultHandler<Signature, Error>)


signingRegister
Brief description


Creates new signing identity in the MIRACL platform.


Content
@JvmOverloads()

fun signingRegister(authenticationUser: AuthenticationUser, authenticationPinProvider: PinProvider, signingPinProvider: PinProvider, resultHandler: ResultHandler<SigningUser, Error>, deviceName: String)


toString
Content
open override fun toString(): String


verify
Brief description


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


Content
@JvmOverloads()

fun verify(userId: String, accessId: String, resultHandler: ResultHandler<Unit, Error>, deviceName: String)


# Properties

Name Summary
authenticationUsers

The registered user identities, stored inside the user storage

var authenticationUsers: List<AuthenticationUser>
signingUsers

The registered signing identities, stored inside the user storage

var signingUsers: List<SigningUser>