White label integration allows you to use TrustBuilder to secure your applications without showing the TrustBuilder brand. Users only see your company’s branding, your logos and your colors. TrustBuilder runs in the background as the authentication engine.
A white-label integration can include:
-
Mobile authentication
Integrate TrustBuilder authentication features into your mobile application using Trustbuilder Android or iOS SDK. -
Web authentication page
Integrate TrustBuilder authentication features into a web application using Trustbuilder Web SDK. -
Custom login portal
Provide your users with a portal that handles the web authentication experience. -
User management
-
Self-care → users manage their authentication methods
Admin management → administrators manage users authentication methods
-
The authentication logic and API interactions are handled by TrustBuilder, while your applications control the look and feel.
Main phases
|
# |
Phase |
Description |
|---|---|---|
|
1 |
Get API credentials (Client ID / Client Secret) to communicate with TrustBuilder. |
|
|
2 |
In the TrustBuilder Admin portal, declare your custom applications and create a custom internal authentication method, define registration policies and authorization rules, then connect your business application. |
|
|
3 |
Provision your users via SCIM, API or JIT. |
|
|
4 |
Embed TrustBuilder SDKs into your mobile and/or web apps.
|
|
|
5 |
Manage authentication flows, transaction confirmations, user self-care and administrative operations. |
1. API credentials
Create OAuth M2M application
To generate access tokens and access APIs, log in to Trustbuilder Admin portal and first create an OAuth application with the following settings:
-
Application type: Machine to machine
-
API & Scopes: Internal API --> Click Open and then Select all
-
Authentication methods: Select the client authentication method that best fits your security requirements.
-
Access token: RS256
Once the application is created, you will obtain: Client ID and the Client Secret.
⚠️ Make sure to securely save the Client Secret as it will not be displayed again after creation.
These credentials (Client ID and Client Secret) are then used to generate access tokens, which allow your application to call the TrustBuilder APIs.
Generate an access token
The OAuth application you have previously created has a unique token endpoint. This must be used to generate an access token:
-
In TrustBuilder Admin portal, click on the OAuth application created.
-
Go to the Endpoints tab.
-
Copy the OAuth Token endpoint.
-
To request an access token, make a POST call to the token endpoint.
Include the scopes required by the APIs you want to call in thescopeparameter, separated by spaces:grant_type=client_credentials client_id=YOUR_CLIENT_ID client_secret=YOUR_CLIENT_SECRET scope=SCOPE_1 SCOPE_2This example uses Client secret POST.
⚠️ If you don’t request the scopes, the access token is still issued, but calls to the API endpoints will fail. The required scopes for each endpoint are listed in the API documentation. Click the lock icon next to an endpoint to see them.
The response includes:-
access_token→ to be used in API requests to Trustbuilder -
expires_in→ token lifetime in seconds -
token_type→Bearer
-
-
The successful response includes
access_token,token_typeandexpires_invalues. -
The access token value should be included in API requests:
Authorization: Bearer ACCESS_TOKEN
By default, the access token is valid for 900 seconds. You can adjust the lifetime in the TrustBuilder Admin Portal, under the Security Settings tab of the OAuth application.
2. Application and Policies configuration
In Trustbuilder admin portal:
-
-
Once created, an appID will be generated. It will be needed for the SDK app integration.
-
-
-
For white label integration, set the distribution mode to None and disable Send at creation to prevent users from receiving Trustbuilder registration emails.
-
-
Connect a Service Provider (OIDC only)
3. User provisioning
-
SCIM: use the SCIM protocol to synchronize your identity directory with the platform in real time.
See SCIM provisioning -
API: call the REST user management endpoints
-
Just-In-Time provisioning
See OIDC IdP integration
4. Technical integration
The technical integration phase consists in embedding TrustBuilder authentication capabilities into your applications using SDKs and APIs.
Trustbuilder SDKs
Integrate TrustBuilder authentication directly into your application:
Custom login portal
The custom login portal is the authentication page displayed to your users. It must be developed and hosted on your side. It acts as a bridge with the TrustBuilder backend: it drives the authentication flow, then redirects the user to the Service Provider.
The flow depends on the authentication method used. The two options below are complementary, and you can implement both in the custom login portal.
Option 1: Out-of-Band authentication (mobile app)
The user receives an authentication request on a mobile app to approve a login or transaction.
-
The portal triggers an authentication notification to the user’s device.
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/outofband-request -
The portal polls the authentication session until it is validated.
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/status -
The user approves the request in the mobile app.
-
Once the user is authenticated, the portal retrieves the redirection information and redirects the user to the Service Provider.
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/get-auth-code
Option 2: Browser-based authentication (Web SDK)
The user authenticates directly in the portal through TrustBuilder Web SDK.
-
The portal embeds the TrustBuilder Authenticator Web SDK.
-
The Web SDK handles the authentication in the browser.
-
Once the user is authenticated, the portal retrieves the redirection information and redirects the user to the Service Provider.
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/get-auth-code
A complete sample implementation of a custom login portal, including both the Out-of-Band endpoints and the embedded Web SDK, is available on the Resource Downloads page.
The interactions between the custom login portal and TrustBuilder are described in the Operations section below.
Authentication Method selection
The Service Provider backend should retrieve authentication methods available for users:
API endpoints:
-
Retrieve authentication methods for a user
/api/v1/sso/registration/enroll/users/{user_id}/method-selection -
Send to Trustbuilder the selected authentication method for a user
/api/v1/sso/registration/enroll/users/{user_id}/select-method
5. Operations
Authentication with SDK mobile app (OOB)
This flow describes an out-of-band (OOB) authentication scenario where a user accesses a web application (Service Provider) from a browser and validates the authentication request using a mobile application embedding the TrustBuilder SDK.
The authentication process relies on OpenID Connect (OIDC) and uses a custom login portal to provide a white-label authentication experience and orchestrate the communication with TrustBuilder during the authentication flow.
The following diagram illustrates a specific OOB authentication scenario. The flow may need to be adapted according to the project requirements and architecture.
|
Participant |
Description |
|---|---|
|
SDK mobile application |
The mobile application integrating the TrustBuilder SDK. It is used to receive authentication requests and perform strong authentication. |
|
User |
The end user attempting to authenticate and access the application. |
|
Service Provider Web app |
The client application that initiates the OIDC authentication flow and grants access after successful authentication. It should be declared in TrustBuilder as an OIDC Regular Web App. |
|
Service Provider Backend |
The backend service responsible for securely calling TrustBuilder APIs, such as retrieving the user's registered authentication methods, and providing the required data to the Web Application. It should be declared in TrustBuilder as an OAuth Machine-to-Machine application. |
|
Custom Login Portal |
Frontend application used to customize the user authentication experience and manage the out-of-band authentication workflow. |
|
TrustBuilder Server |
Server handling authorization and authentication. |
-
The user initiates a sign-in request from the Service Provider web application using a browser.
-
The Service Provider web application requests the list of authentication methods available for the user from the Service Provider backend.
-
The Service Provider backend calls the TrustBuilder API to retrieve the authentication methods registered for the user account.
-
Trustbuilder retrieves the user then their registered authentication method. It sends it back to the Service Provider backend.
registered type (TB_MFA_MOBILE, TB_MFA_BROWSER, TB_MFA_DESKTOP) id osName appId appVersion isBlocked lastAuthDate -
The Service Provider Backend retrieves the user's registered authentication methods and matches them with the ACR. It then sends the list of available authentication methods to the Service Provider Web Application.
-
The web application displays the available authentication methods to the user, allowing them to select the preferred authentication option.
-
The user selects the authentication method linked to the mobile SDK app.
-
The Service Provider web application initiates the OIDC authentication flow by calling the /authorize endpoint.
-
TrustBuilder redirects the browser to the Custom Login Portal to continue the authentication journey using the white-label interface.
-
The Custom Login Portal creates an out-of-band authentication request by calling
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/outofband-request. This triggers the authentication request. -
TrustBuilder sends a push notification to the mobile application embedding the TrustBuilder SDK.
-
While waiting for the user authentication, the Custom Login Portal periodically polls the TrustBuilder authentication session status endpoint
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/status. -
Initially, the session status is returned as
pending. -
The mobile application prompts the user to validate the authentication request using the required authentication factor.
-
The user provides the requested authentication factor, such as biometric or secret code.
-
The SDK application sends the successful authentication result to TrustBuilder.
-
The custom login portal keep polling the authentication session status endpoint.
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/status -
Once authentication succeeds, TrustBuilder returns a
donestatus. -
The custom login portal request the authentication result by calling
/api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/get-auth-code. -
TrustBuilder finalizes the OIDC
/authorizeflow and redirects the browser back to the Service Provider web application using the redirect URI and an authorization code. -
The Service Provider webapp securely exchanges the authorization code for OIDC tokens by calling the
/tokenendpoint on TrustBuilder. -
TrustBuilder validates the authorization code and returns the OIDC tokens, including the access token and ID token.
-
Access to the Service Provider is granted to the user.
Authentication with transaction confirmation
This flow describes how a mobile transaction confirmation process works. It uses OpenID Connect CIBA protocol.
The purpose is to confirm a specific business transaction (such as payment, bank transfer, purchase validation, sensitive operation). The user receives a push notification on their mobile app and explicitly approve or reject the transaction after authenticating.
Transaction confirmation is available only with the mobile applications (iOS and Android). It is not supported by the desktop application or the web application.
|
Participant |
Description |
|---|---|
|
Service Provider |
The business application that initiates the transaction (for example: banking application). |
|
Client backend Application |
The server-side application declared as a CIBA client in TrustBuilder. It initiates the backchannel authentication request by calling the TrustBuilder CIBA endpoints. |
|
TrustBuilder |
Manages the authentication. |
|
SDK mobile application |
The user’s registered mobile application embedding the TrustBuilder SDK. It receives push notifications, authenticates the user and displays transaction details for approval. |
|
User |
The end user who authenticates and approves or rejects the transaction. |
-
The user initiates a sensitive transaction from the Service Provider.
-
The Service Provider sends the transaction request to the client back end application.
-
The client backend application sends a backchannel authentication request to the TrustBuilder
/bc-authorizeendpoint. This request must be authenticated using the client credentials (ID and secret) of the CIBA application in TrustBuilder admin portal.-
Example → body parameters of a
/bc-authorizerequest:{ "scope": "openid", "client_notification_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.exampleNotificationToken123456789", "binding_message": "Confirme transaction of $1,200", "login_hint": "42c9a46a-7f84-492c-854f-8f43e76979a", "requested_expiry": "900" }-
scope: must containopenid. -
client_notification_token: a valid Bearer token. -
binding_message: should contain the business data displayed to the user during the transaction approval process. -
login_hint: the user identifier for whom the authentication request is initiated.
Its value must match the subject type configured in the CIBA application. -
requested_expiry: Optional. Defines the request timeout in seconds. After this delay, the transaction confirmation request expires automatically. -
allow_biometrics: Optional. Biometrics are allowed by default. If set tofalse, the user will not be allowed to authenticate using biometrics and must use their secret code instead.
-
-
-
TrustBuilder validates the CIBA request, creates the authentication request and associates the business data with the request.
-
TrustBuilder returns an
auth_req_idto the client backend application. This uniquely identifies the pending transaction confirmation request. -
TrustBuilder sends a push notification to the user’s SDK mobile application.
-
The SDK mobile app displays the transaction details and asks the user to approve or reject the transaction.
-
The user approves the transaction.
-
The SDK mobile application asks the user to authenticate.
-
The user authenticates.
-
The SDK mobile application sends the approval decision to TrustBuilder.
-
TrustBuilder validates the authentication result and the transaction approval.
-
TrustBuilder sends the authentication result to the configured backchannel notification endpoint.
-
The client backend application receives the confirmation result and completes the business transaction.
-
The Service Provider displays the final transaction status to the user.
TRANSACTION PROOF
The ID token sent at step 13 is the proof that the user approved the transaction.
When decoded, the ID token contains:
-
sub: the identifier of the user who approved the transaction; -
binding_message_hash: a SHA-256 hash, Base64-encoded, of thebinding_messagesent at step 3; -
urn:openid:params:jwt:claim:auth_req_id: the identifier of the transaction confirmation request; -
at_hash: a hash of the access token; -
urn:openid:params:jwt:claim:rt_hash: a hash of the refresh token (if refresh tokens are enabled in the CIBA application).
Store the proof: TrustBuilder sends the proof once, at the end of the flow. The client backend application must store the ID token and the original binding_message (the ID token contains only its hash, so the original message is required to prove what the user approved).
Verify the proof:
-
Verify the ID token signature to make sure the token has not been modified.
-
Compute the SHA-256 hash of the original
binding_message, encoded in Base64, and compare it withbinding_message_hash. -
Check that
urn:openid:params:jwt:claim:auth_req_idmatches theauth_req_idreturned at step 5.
Web authentication
This flow describes a web authentication scenario where a user accesses a protected web application (Service Provider) and validates the authentication request using a web application embedding the TrustBuilder SDK. The authentication process relies on OpenID Connect (OIDC).
The following diagram illustrates a specific web authentication scenario. The flow may need to be adapted according to the project requirements and architecture.
-
The user initiates a sign-in request from the Service Provider web application using a browser.
-
The Service Provider web application requests the list of authentication methods available for the user from the Service Provider backend.
-
The Service Provider backend calls the TrustBuilder API to retrieve the authentication methods registered for the user account.
-
Trustbuilder retrieves the user then their registered authentication method. It sends it back to the Service Provider backend.
registered type (TB_MFA_MOBILE, TB_MFA_BROWSER, TB_MFA_DESKTOP) id osName appId appVersion isBlocked lastAuthDate -
The Service Provider Backend retrieves the user's registered authentication methods and matches them with the ACR. It then sends the list of available authentication methods to the Service Provider Web Application.
-
The web application displays the available authentication methods to the user, allowing them to select the preferred authentication option.
-
The user selects the authentication method linked to the Web SDK app.
-
The Service Provider web application initiates the OIDC authentication flow by calling the
/authorizeendpoint. -
TrustBuilder redirects the browser to the SDK web app, part of the Custom Login Portal. The redirect URL includes the
session_id,tnt_aliasandlogin_hintparameters. -
The SDK web app calls
startSecureTokensListing()to retrieve the secure tokens stored in the browser. -
The SDK web app starts the authentication by calling
startAuthentication({ host, tknAlias, sessionId }).setup()on TrustBuilder. -
TrustBuilder confirms the setup is OK.
-
The SDK web app asks the user for their secret code.
-
The user enters their secret code.
-
The SDK web app sends the credential to TrustBuilder by calling
execute({ cred, credType: 'SECRET_CODE' }). -
TrustBuilder validates the credential and returns an authentication success.
-
The Custom login portal requests the authentication result by calling
POST /api/v1/mfa/login/tenants/{tntAlias}/auth-sessions/{authSessionId}/get-auth-code. -
TrustBuilder finalizes the OIDC /authorize flow and returns the redirect URI with an authorization code.
-
The Custom login portal redirects the browser back to the Service Provider web application using the redirect URI and an authorization code.
-
The Service Provider web app securely exchanges the authorization code for OIDC tokens by calling the /token endpoint on TrustBuilder.
-
TrustBuilder validates the authorization code and returns the OIDC tokens, including the access token and ID token.
-
Access to the Service Provider is granted to the user.