Consumer Authentication: OAuth2 Consumer Auth
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.
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β
| Item | Value |
|---|---|
| Realm Type | Consumer |
| Redirect URI | {HAAS_DASHBOARD_URI}/api/auth/callback/rbac_oauth |
| ID Token Claim - Permissions Required | None |
| ID Token Claims - Consumer Identifiers | biza-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:
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);
}
};