Skip to main content

Consumer Authentication: OAuth2 Consumer Auth

Availability
FoundationsNot availableEnterpriseIncluded
Available InPlanned: Orion

OAuth2 Consumer Auth lets Consumers sign in to the Consumer Dashboard with the Data Holder's own OAuth2 identity provider (federated login) instead of a one-time password. HaaS acts as an OAuth2 client of the Data Holder's identity provider, so the Data Holder must register a client for HaaS as outlined below.

Planned for Orion

Dashboard authentication via OAuth2 will be available in a future Orion release. The values on this page mirror the Open Gateway OAuth2 client setup and show the shape of the integration. Speak to your account manager before you configure your identity provider.

HaaS Consumer login​

ItemValue
Realm TypeConsumer
Redirect URI{HAAS_DASHBOARD_URI}/api/auth/callback/rbac_oauth
ID Token Claim - Permissions RequiredNone
ID Token Claims - Consumer Identifiersbiza-au:auth:user_id and biza-au:auth:principal_id

The following example shows how to add custom claims to an ID token using the Auth0 Dashboard. If you have not customised Auth0 before, this background is useful:

Use this code in the Auth0 Actions Library:

Example values

The claim names and values in this example mirror Open Gateway.

exports.onExecutePostLogin = async (event, api) => {
if (event.authorization) {
// Set claims
api.idToken.setCustomClaim('biza-au:auth:roles', []);
api.idToken.setCustomClaim('biza-au:auth:user_id', event.user.user_id);
api.idToken.setCustomClaim('biza-au:auth:principal_id', event.user.user_id);
}
};