Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

Describing access with authorization details

A scope names a kind of access the service defined in advance, so it cannot say which album Ava chose for her photo book or how much she agreed to pay. Rich Authorization Requests let the printer describe the access it needs as structured data, which the authorization server shows Ava and the API enforces.

One album, not the whole library

Ava's photo book uses the pictures in one album, album 42, from last summer at the lake. When the printer connects to her photo account, it asks for photos.read, and the photo service's consent screen says that Photo Printer wants to view her photos. Ava approves, because she wants the book. The token the printer receives can now read every photo in her library, including albums that have nothing to do with the book. Grants, scopes, and consent asked whether photos.read means every photo, one album, or photos shared with her. The scope name cannot say, and for some requests that missing detail is the whole decision.

A scope is a name for a kind of access that the service defined in advance. photos.read works well for "read my photos" because the photo service can describe it once, show it on a consent screen, and check it at the API. It has no room for the part of the request that changes every time: which album.

The obvious workaround is to build the album into the scope string, as album-42.read or photos.read:42. The Scopes and audiences lesson explained why that breaks the fixed vocabulary that registrations, consent screens, and API checks rely on. The trouble goes further than one album. Every service that tried it would invent its own private format for where the identifier goes and how to handle characters a scope cannot contain, such as spaces and quotation marks, and every client would have to learn each format. When the printer needs a second album, or a different action on one of them, the strings multiply.

A scope parameter is a list of strings separated by spaces. Anything more structured than that has to be squeezed into a string by the client and parsed out again by the server.

One payment, exactly as approved

Now return to the Pay by bank checkout from Building a request object, where the printer asks Lakeside Bank for authorization to make a 42.50 EUR payment for Ava's photo book. At the bank, the printer is registered as the client photo-printer-pay.

Suppose the bank offered a scope called payments. Approving it would let the printer make payments from Ava's account: any amount, to anyone, as many times as it liked while the token lasted. That is not what she agreed to. She agreed to pay 42.50 EUR, once, to Photo Printer, for one order.

Those details matter at both ends. The consent screen has to show them, because the amount and the recipient are what Ava is deciding. The bank's payment API has to enforce them: a payment of 43.00 EUR, a payment to a different account, or a second payment under the same approval must fail. Approval for one transaction with specific values is sometimes called transaction authorization. A scope string could carry it only through a private format such as pay:42.50:EUR:..., with all the problems of the album example and one more: a mistake in parsing an amount costs someone money.

Describing access as data

Rich Authorization Requests, published as RFC 9396 in May 2023, adds a request parameter called authorization_details. Its value is a JSON array. Each object in the array describes one piece of access the client wants, and its type field says what kind of access that is. The rest of the object is structured data whose meaning the type defines.

All domains, identifiers, accounts, and values in these examples are fictional. For the photo book, the printer could ask for this:

[
  {
    "type": "photo_album",
    "actions": ["read"],
    "identifier": "42"
  }
]

photo_album is a type the photo service defines for its own API. This object asks to read one album, the one identified as 42, and nothing else.

The details travel through the same flow as a scope would, and each party has something to do with them:

What each party does with authorization details
PartyWhat it does with the details
ClientDescribes exactly what it needs, in the structure the type defines.
Authorization serverChecks each object against its type, shows it on the consent screen in plain language, and records what Ava approved.
Access tokenCarries the approved details to the API, or lets the API look them up.
APIEnforces them on each request: album 42 can be read, other albums cannot.

photos.read

Albums
Every album
Consent screen
View your photos
Photo API refuses
Nothing in her library

Reads albums the book never uses

photo_album, identifier 42

Albums
Album 42 only
Consent screen
Read album 42
Photo API refuses
Every other album

Exactly what the book needs

payments

Amount
Any
Recipient
Anyone
How often
Until the token expires

Not what Ava agreed to

payment_initiation

Amount
42.50 EUR
Recipient
demo-merchant-account-17
How often
Once

One payment, exactly as approved

Detailed authorization narrows what a token allows; it does not replace the API's own decisions.

The same two requests as a scope and as authorization details. Only the details say which album, how much, to whom and how often, so only they can be shown to Ava and enforced by the API.

The API keeps every check it made before. Album 42 still has to be yours, and the token still has to be valid. Detailed authorization narrows what a token allows; it does not replace the API's own decisions.

Scopes and details together

Rich Authorization Requests does not retire scopes. A request can carry both, and the authorization server must process them together and show Ava the combined request on one consent screen. Scopes remain a good fit for broad, stable kinds of access, such as a calendar application's permission to read the events in someone's calendar. The specification recommends that each API use one form or the other, so that its permissions are described in one place.

Authorization details cost more. The client builds JSON, the server needs a definition for every type and a way to present it, and the API has to understand the structure. They are worth that cost when a request contains values that change each time and that someone needs to see before approving: a particular album, an amount, a recipient, or a document to be signed.

The type and its definition

The printer's developer now has two requests to write: read album 42 at the photo service, and pay 42.50 EUR at Lakeside Bank. Neither service accepts whatever JSON a client sends. Each type comes with a definition, published by the service, that says which fields an object may contain and what they mean.

Every object in the array must have a type, the only field Rich Authorization Requests requires everywhere. The type identifies a kind of access at a particular API. The authorization server controls what each type means and which other fields an object of that type may contain. An array can hold several objects, including several of the same type.

Developers copy type values from documentation, so they should be easy to copy exactly. Plain ASCII avoids characters that look identical but are different. A type used by one service can be a short name such as photo_album. A type meant to be used at many different servers, such as one written into an industry standard, should be a URI controlled by whoever defines it, so that two unrelated definitions cannot choose the same name.

Common fields

The specification also defines five common fields that a type can reuse. None of them is required. A type definition decides which ones it uses and which values each one may hold.

The five common fields and how the album request uses them
FieldMeaningIn the album request
locationsWhere the access will be used, usually the URI of an API.The photo API.
actionsWhat the client wants to do.Read.
datatypesWhich kinds of data it wants.Images and captions, but not where each photo was taken.
identifierOne specific resource at the API.Album 42.
privilegesA type or level of privilege, such as a role.Not used by this type.

Put together, the printer's request for the photo book grows from the first sketch to this:

[
  {
    "type": "photo_album",
    "locations": ["https://api.photos.example"],
    "actions": ["read"],
    "datatypes": ["images", "captions"],
    "identifier": "42"
  }
]

When an object lists several values, it asks for every combination of them: each action, at each location, for each datatype. This object asks to read images and to read captions. To ask for one combination without the others, a client sends separate objects. If Ava chose two albums for the book, the printer would send two photo_album objects, one with the identifier 42 and one with 57, because identifier holds a single value.

Fields that belong to one type

Most of what a payment needs has no common field. A type definition can add fields of its own, and Lakeside Bank's payment type adds the amount, the recipient, and a reference:

[
  {
    "type": "payment_initiation",
    "locations": ["https://api.lakeside-bank.example/payments"],
    "actions": ["initiate", "status"],
    "instructedAmount": { "currency": "EUR", "amount": "42.50" },
    "creditorName": "Photo Printer",
    "creditorAccount": { "accountId": "demo-merchant-account-17" },
    "remittanceInformationUnstructured": "Photo book order book-5561"
  }
]

The field names come from the bank's definition, which borrows the vocabulary of banking payment standards. The creditor is the party receiving the money, and the remittance information is the reference that appears on both sides' statements. The two actions let the printer start the payment and later check its status. Lakeside Bank's definition also says that one approval covers one payment, so nothing in the object needs to say "once".

The amount is a string. Values in authorization details are compared exactly as written, without normalizing them, so "42.50" and "42.5" are different values. The bank's definition says which form to use, and the client writes the amount that way. Notice also that creditorName is text the printer chose. The account identifier says where the money goes, and the name is only how the printer describes itself.

Sending the details

Authorization details can appear wherever a scope would carry the same kind of request, including the authorization request and the device authorization request. In an authorization request, the array is serialized as JSON and URL-encoded as one more parameter. The album request becomes:

https://auth.photos.example/authorize
  ?response_type=code
  &client_id=photo-printer
  &redirect_uri=https%3A%2F%2Fprinter.example%2Foauth%2Fcallback
  &authorization_details=%5B%7B%22type%22%3A%22photo_album%22%2C%22locations%22%3A%5B%22https%3A%2F%2Fapi.photos.example%22%5D%2C%22actions%22%3A%5B%22read%22%5D%2C%22datatypes%22%3A%5B%22images%22%2C%22captions%22%5D%2C%22identifier%22%3A%2242%22%7D%5D
  &state=demo-attempt-12
  &code_challenge=ySTBkLMnXWUiL2an2t3T9j9a9GgE6O651oR_30KaWF0
  &code_challenge_method=S256

There is no scope parameter this time. The details describe all the access the printer wants.

The album request is long, but nothing in it is sensitive. The payment request runs to more than 700 characters once encoded, and it would carry an amount, an account, and an order reference through the browser's address bar, its history, and any logs or Referer headers that record the address. Anything in that address can also be changed before it reaches the bank, by the person using the browser or by malicious software running there. When the integrity of the details matters, and for a payment it does, the specification requires the client to protect them, either by signing the request as JWT-Secured Authorization Requests describes or by sending it directly to the server.

Pushed Authorization Requests suits this well. The printer sends the whole request, details included, to the bank's PAR endpoint over a direct connection, and authenticates as it would at the bank's token endpoint. Lakeside Bank accepts only key-based client authentication, so the photo-printer-pay registration uses private_key_jwt with the printer's key printer-2026-10, the method the Secrets and signed assertions lesson described:

POST /par HTTP/1.1
Host: auth.lakeside-bank.example
Content-Type: application/x-www-form-urlencoded

response_type=code
&client_id=photo-printer-pay
&redirect_uri=https%3A%2F%2Fprinter.example%2Fpay%2Fcallback
&authorization_details=%5B%7B%22type%22%3A%22payment_initiation%22%2C...
&state=demo-attempt-14
&code_challenge=0AO-1LrNoVHelP9ShWySwBTeUtdaRAk371ho0dMw3MI
&code_challenge_method=S256
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion=eyJhbGciOiJFUzI1NiIsImtpZCI6InByaW50ZXItMjAyNi0xMCIsInR5cCI6IkpXVCJ9...

The details and the client assertion are shortened here for display. As the Pushed Authorization Requests lessons showed, the bank answers with a request URI, and Ava's browser carries only the client ID and that reference to the authorization endpoint. The amount and the account never appear in an address bar, and the bank can check the whole request before Ava sees a consent screen.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

The printer needs photos from album 42 only. Why is a scope such as photos.read:42 a poor way to ask for that? 1 of 3

Choose one answer.

A photo_album object lists the actions read and delete, and the datatypes images and captions. What does it ask for? 2 of 3

Choose one answer.

The printer is about to send Lakeside Bank a payment_initiation object, with the amount and the creditor account, in an ordinary authorization URL. Why does the specification require more? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity