authenticate

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

This method can be used to authenticate within your application.

After the token is generated, it should be sent to the application server for verification.

Return

a MIRACLResult representing the result of the authentication:

Parameters

user

the user to authenticate.

pinProvider

a callback called from the SDK when the identity PIN is required.


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

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

Use this method to authenticate within your application.

After the JWT authentication token is generated, it needs to be sent to the application server for verification.

Parameters

user

the user to authenticate.

pinProvider

a callback called from the SDK, when the identity PIN is required.

resultHandler

a callback to handle the result of the authentication.

  • If successful, the result is MIRACLSuccess.

  • If an error occurs, the result is MIRACLError with exception describing issues with the operation.