authenticate

# authenticate


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. When received, the application server should verify the token signature using the MIRACL Trust JWKS endpoint and the audience claim which in this case is the application project ID.

# 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 a message. On exception, the exception object is also passed.