MIRACLTrust

MIRACLTrust


class 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().

Types

Name Summary
Companion
object Companion

Functions

Name Summary
abortSession
fun abortSession(sessionDetails: SessionDetails, resultHandler: ResultHandler<Unit, MIRACLException>)
Cancel the authentication session.
authenticate
fun authenticate(user: User, pinProvider: PinProvider, resultHandler: ResultHandler<String, MIRACLException>)
Generate an authentication code for a registered user.
authenticateWithAppLink
fun authenticateWithAppLink(user: User, appLink: Uri, pinProvider: PinProvider, resultHandler: ResultHandler<Unit, MIRACLException>)
Authenticate identity in the MIRACL platform.
authenticateWithNotificationPayload
fun authenticateWithNotificationPayload(payload: Map<String, String>, pinProvider: PinProvider, resultHandler: ResultHandler<Unit, MIRACLException>)
Authenticate identity in the MIRACL platform.
authenticateWithQRCode
fun authenticateWithQRCode(user: User, qrCode: String, pinProvider: PinProvider, resultHandler: ResultHandler<Unit, MIRACLException>)
Authenticate identity in the MIRACL platform.
delete
fun delete(user: User)
Delete a registered user.
generateOTP
fun generateOTP(user: User, pinProvider: PinProvider, resultHandler: ResultHandler<OTP, MIRACLException>)
Generate OTP for a registered authentication user.
generateQuickCode
fun generateQuickCode(user: User, pinProvider: PinProvider, resultHandler: ResultHandler<QuickCode, MIRACLException>)
Generate Quick Code for a registered authentication user.
getActivationToken
fun getActivationToken(verificationUri: Uri, resultHandler: ResultHandler<ActivationTokenResponse, MIRACLException>)
Default method to obtain activation token using the URL provided in the verification email.
getSessionDetailsFromAppLink
fun getSessionDetailsFromAppLink(appLink: Uri, resultHandler: ResultHandler<SessionDetails, MIRACLException>)
Get session details for project in MIRACL platform based on session identifier.
getSessionDetailsFromNotificationPayload
fun getSessionDetailsFromNotificationPayload(payload: Map<String, String>, resultHandler: ResultHandler<SessionDetails, MIRACLException>)
Get session details for project in MIRACL platform based on session identifier.
getSessionDetailsFromQRCode
fun getSessionDetailsFromQRCode(qrCode: String, resultHandler: ResultHandler<SessionDetails, MIRACLException>)
Get session details for project in MIRACL platform based on session identifier.
getUser
fun getUser(userId: String): User?
Get a registered user.
register
@JvmOverloads
fun register(userId: String, activationToken: ActivationToken, pinProvider: PinProvider, pushNotificationsToken: String? = null, resultHandler: ResultHandler<User, MIRACLException>)
Provides end-user registration. Registers an end-user for a given MIRACLTrust Customer to the MIRACLTrust platform.
sendVerificationEmail
fun sendVerificationEmail(userId: String, resultHandler: ResultHandler<Unit, MIRACLException>)
Default method to verify user identity against the MIRACL platform. In the current implementation it is done by sending an email message.
sign
fun sign(message: ByteArray, timestamp: Date, user: User, pinProvider: PinProvider, resultHandler: ResultHandler<Signature, MIRACLException>)
Create a cryptographic signature of the given document.
signingRegister
fun signingRegister(user: User, authenticationPinProvider: PinProvider, signingPinProvider: PinProvider, resultHandler: ResultHandler<User, MIRACLException>)
Creates new signing identity in the MIRACL platform.
updateProjectSettings
fun updateProjectSettings(projectId: String, clientId: String, redirectUri: String)
Set SDK project settings when they need to be updated after new session is established.

Properties

Name Summary
users
var users: List<User>
The registered user identities, stored inside the user storage