XmBindIdSdk

class XmBindIdSdk

Entry point interface to the BindID Client SDK.

This interface declares all top level services supported by the SDK. An instance of this interface is available to client applications as window.XmBindId.

Before the BindID SDK can be used, the XmBindIdSdk.initialize call must be invoked, with proper configuration for the client application using BindID.

Members

public abstract PromiseFuture< Boolean, XmBindIdError > initialize(@NonNull XmBindIdConfig config)

Initialize the BindID Client SDK and set application-wide configuration.

All BindID Client SDK calls must be invoked only after succesful completion of this asynchornous initialization call.

The returned promise will either be resolved with a boolean 'true' value, or rejected with an error.

Returns

public abstract PromiseFuture< XmBindIdResponse, XmBindIdError > authenticate(@NonNull XmBindIdAuthenticationRequest bindIdRequestParams)

Invoke a BindID authentication flow.

This call will start a user login flow using BindID. The browser will be redirected to BindID's login page, where user identity will be established. Once complete, BindID will redirect the user back to the invoking web/mobile application based on the URL provided in the authentication request parameters, sending back authentication result information.

If invoked by a web application, the web application should invoke #processRedirectResponse to extract the information returned in the response and complete the authentication process.

The returned Promise will either be rejected with an error, or never complete (since this call may redirect the user agent to another page).

Returns

public abstract PromiseFuture< XmBindIdResponse, XmBindIdError > authenticateBoundUser(@NonNull XmBindIdBoundUserAuthenticationRequest bindIdRequestParams)

Invoke a BindID authentication flow using native mobile biometrics.

This call will start a user login flow using BindID only if native biometric authentication can be performed; otherwise, an error will be returned.

The native flow comprises only of providing a biometric sample (e.g., fingerprint), and is not available when other actions are required to process the authentication request (e.g., for new device registration using FIDO2 biometrics).

Once complete, BindID will redirect the user back to the invoking mobile application based on the URL provided in the authentication request parameters, sending back authentication result information.

Returns

public abstract PromiseFuture< XmBindIdResponse, XmBindIdError > signTransaction(@NonNull XmBindIdTransactionSigningRequest bindIdTransactionRequest)

Invoke BindID authentication flow for transaction signing.

This request will behave similarly to an authentication request, with the following additions:

OIDC claims parameter will be added to the request to indicate the BindID server that this is a transaction signing request. By default the request will be sent as an encrypted JWT. BindID server will show the transaction details to the user. BindID server will include the transaction claim in the id_token upon successful authentication and token exchange.

Returns

public abstract PromiseFuture< XmBindIdExchangeTokenResponse, XmBindIdError > exchangeToken(@NonNull XmBindIdExchangeTokenRequest exchangeRequest)

Invoke a PKCE token exchange using the BindID SDK.

The response will include the ID and access tokens.

Returns