Interface: 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.

Hierarchy

  • XmBindIdSdk

Methods

authenticate

authenticate(bindIdRequestParams: XmBindIdAuthenticationRequest): Promise<XmBindIdResponse>

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

Parameters:

NameType
bindIdRequestParamsXmBindIdAuthenticationRequest

Returns: Promise<XmBindIdResponse>


initialize

initialize(config: XmBindIdConfig): Promise<boolean>

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.

Parameters:

NameType
configXmBindIdConfig

Returns: Promise<boolean>


processRedirectResponse

processRedirectResponse(): Promise<XmBindIdResponse>

Process a BindID redirect response.

BindID reports results back to the service provider by redirecting the user agent to a service-provider provided redirect URL, attaching the authentication response.

This function should be invoked by the BindID client application in response to this redirect. It processes the redirect URL, parses and extracts the BindID response from it.

The returned Promise will either be rejected with an error, or complete with an object providing access

Returns: Promise<XmBindIdResponse>


signTransaction

signTransaction(bindIdTransactionRequest: XmBindIdTransactionSigningRequest): Promise<XmBindIdResponse>

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.

Parameters:

NameType
bindIdTransactionRequestXmBindIdTransactionSigningRequest

Returns: Promise<XmBindIdResponse>