Requesting granular authorization with Rich Authorization Requests (RAR)
PingOne Advanced Identity Cloud PingAM Android iOS JavaScript
The Orchestration SDK supports Rich Authorization Requests (RAR, RFC 9396) when signing on with PingOne Advanced Identity Cloud or PingAM.
RAR versus OAuth 2.0 scopes
Standard OAuth 2.0 authorization is scope-based. The app asks for scopes such as profile, and the user approves a general-purpose grant on a consent page.
That works well for signing in, but scopes are too coarse to describe a specific transaction.
Consider a payments app. A scope named payments tells the user nothing about which account the payment debits, how much money moves, or who receives it. The user is approving an open-ended permission when what they actually mean to do is approve one specific payment.
You can use RAR to help close this gap. Instead of asking for a broad scope, your app describes exactly what it wants to do, by sending the server an authorization_details request parameter. The parameter is a JSON array in which each object carries a type and the fields that type defines.
The following example authorization_details parameter asks whether the user consents to initiating a payment of 123.50 EUR to Merchant A:
authorization_details parameter requesting a payment[
{
"type": "payment_initiation",
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"iban": "GB29MRCH60161331926819"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}
]
The consent page presents this request in full, so the user approves the transaction itself, not a blanket permission.
On PingOne Advanced Identity Cloud and PingAM, this consent page is provided by a hosted Remote Consent Service (RCS).
After the user approves, the authorization server echoes the granted details back in the token response, and embeds them inside the access token.
A resource server can then verify that the token it is given permits this exact payment, and nothing more.
How RAR works
The numbered steps below describe the arrows in the diagram, and call out where RAR differs from a standard OAuth 2.0 flow:
-
The user initiates a payment in the app.
-
The SDK sends the authorization request with the requested
authorization_details.The details travel in the PAR request body when PAR is enabled, so they never appear in a browser URL.
-
The authorization server redirects the browser to the RCS with a signed consent request JWT containing the requested details.
Unlike a standard OAuth 2.0 flow, the server’s own consent page never displays
authorization_details; the details always route through the RCS. -
The browser passes the consent request to the RCS.
-
The RCS returns the consent page, showing the requested details, to the browser.
-
The user reviews the details on the consent page and approves the transaction.
-
The browser submits the consent decision to the RCS.
-
The RCS signs the decision and returns a consent response JWT to the authorization server.
Unlike a standard OAuth 2.0 flow, the decision travels back as a signed JWT, not as a form post.
-
The authorization server completes the authorization and issues the tokens carrying the granted
authorization_details.Unlike a standard OAuth 2.0 flow, the token response echoes the granted
authorization_details, and the access token itself contains them, so a resource server can enforce them. -
The SDK gives the app the token, and the payment can proceed.
How the Orchestration SDK helps
The Orchestration SDK gives RAR first-class support, so you work with typed objects in your app code instead of hand-serialized JSON:
-
Describe what the user is approving with an
AuthorizationDetailmodel, carrying the common fields such astypeandlocations, plus any type-specific fields such as payment amounts. -
Attach the details to every authorization request from your configuration, or per transaction when each payment needs its own consent.
-
The SDK sends the details in the PAR request body when PAR is enabled, keeping them out of browser URLs.
-
Read the details the server actually granted back from the token, ready to display or pass to a resource server.
|
RAR works only with the browser-based OIDC sign-on flow, because it is the only one that displays a rich consent page. Native journeys and device authorization flows cannot carry |