Skip to main content

Rich Authorization Requests

A scope names a kind of access, such as payments:write. Sometimes an application needs the person's approval for one specific thing: one payment from one account, or read access to one folder. Rich authorization requests describe that access as structured data in the authorization_details parameter (RFC 9396). The consent page shows each request in plain words, and the access token carries what the person approved.

LumoAuth accepts authorization_details in these user sign-in flows:

A CIBA request that an application starts for a user does not read authorization_details; its token is for the requested scopes.

AI agents use authorization_details too, with their own rules: see Just-in-time permissions and agent-initiated CIBA.

Do this​

  1. Define a type for each kind of access: Applications → Authorization details → Add a type, or the Admin API.
  2. Allow the type for the application: Applications → your app → Configuration → Rich authorization requests, or authorizationDetailsTypes in the Admin API.
  3. Send authorization_details with the sign-in request.
  4. Read authorization_details from the token response, the access token or introspection.

Types​

A type is what a request names in type. Your organization defines its own types. Each type has:

SettingRule
Identifier (type)A name or a URI of 1 to 128 characters without spaces, for example payment_initiation or https://api.example.com/payment. It starts with a letter or a digit. It cannot change later, because grants and tokens name it.
Name1 to 100 characters. The consent page shows it as the title of the request.
DescriptionUp to 500 characters. The consent page shows it under the name.
Allowed fieldsThe common fields that a request of this type may carry: actions, locations, datatypes, identifier and privileges. All of them by default.
Allowed actionsThe values that actions may hold. Any value by default. Up to 50 actions of up to 128 characters.

An organization can define up to 50 types. An application may request a type only when the type exists and the application lists it. A new application lists no types, so it cannot send authorization_details until you allow a type for it.

Discovery lists the identifiers of your types as authorization_details_types_supported, in both the OpenID Connect and the OAuth metadata document. The member is left out while your organization has no type.

Types in the Admin API​

GET /orgs/{orgId}/api/v1/admin/authorization-details-types
POST /orgs/{orgId}/api/v1/admin/authorization-details-types
GET /orgs/{orgId}/api/v1/admin/authorization-details-types/{typeId}
PATCH /orgs/{orgId}/api/v1/admin/authorization-details-types/{typeId}
DELETE /orgs/{orgId}/api/v1/admin/authorization-details-types/{typeId}

These endpoints need the scopes and permissions of the client endpoints: admin:clients:read and clients.view to read, admin:clients:write and clients.edit to change.

curl -X POST "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/authorization-details-types" \
-H "X-API-Key: $LUMOAUTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "payment_initiation",
"name": "Payment",
"description": "Send one payment from your account.",
"allowedFields": ["actions", "locations", "identifier"],
"allowedActions": ["initiate", "status", "cancel"]
}'

The answer holds the type in data, with its id, createdAt and updatedAt. allowedFields: null means every common field, and allowedActions: null means any action. A PATCH changes only the fields that it sends; a request that sends another type gets 400. A repeated identifier, or a 51st type, gets 409.

Deleting a type takes it off every application of your organization. Tokens that were issued before keep their details until they expire. A refresh issues tokens without the details of that type. The same holds when you take a type off an application, or narrow a type's fields or actions: a refreshed token leaves out every detail that the application could no longer request.

To allow types for an application, send authorizationDetailsTypes with POST or PATCH /admin/clients:

{ "authorizationDetailsTypes": ["payment_initiation"] }

A value that is not one of your organization's types gets 400. null or [] allows none.

Send a request​

authorization_details is a JSON array of objects. Each object has a type and may carry the common fields that its type allows:

MemberValue
typeRequired. One of the application's types.
actionsA list of strings: what the application wants to do, for example ["initiate"].
identifierA string: the one resource that the access is for, for example an account number.
locationsA list of strings: where the access applies, usually the address of an API.
datatypesA list of strings: the kinds of data, for example ["balance", "transactions"].
privilegesA list of strings: the level of access, for example ["owner"].
[
{
"type": "payment_initiation",
"actions": ["initiate"],
"identifier": "ACC-1234",
"locations": ["https://api.example.com/payments"]
}
]

In a query string or a form, send the array as a JSON string. A JSON request body (device authorization) may carry the array itself. A signed request object carries it as a JSON array claim.

GET /orgs/acme-corp/api/v1/oauth/authorize
?response_type=code
&client_id=your-client-id
&redirect_uri=https://app.example.com/callback
&scope=openid
&state=af0ifjsldkj
&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
&code_challenge_method=S256
&authorization_details=%5B%7B%22type%22%3A%22payment_initiation%22%2C%22actions%22%3A%5B%22initiate%22%5D%2C%22identifier%22%3A%22ACC-1234%22%7D%5D

Limits:

  • at most 10 objects and 8,192 bytes. A long request belongs in a pushed authorization request;
  • at most 20 entries in each list;
  • type, actions and privileges up to 128 characters each; identifier, locations and data types up to 512;
  • no control characters, invisible characters or bidirectional overrides, and no white space at the start, at the end or twice in a row. A value with them is refused, never changed, so the token carries exactly what the person saw.

An empty array [] means no details. Only the common fields are accepted. A member that is not one of them, such as an amount, is refused, because the consent page could not show it.

Errors​

An invalid value is refused with invalid_authorization_details. The description names the position and the member, for example authorization_details[0].type is not a type that this application may request. It never repeats the value that you sent.

EndpointAnswer
Authorization endpointA redirect to the application's redirect_uri with error=invalid_authorization_details, state and iss. It comes before the sign-in page, so nobody signs in for a request that would fail.
Pushed authorization requests, device authorization, token endpoint400 with a JSON error.

The value is refused when:

  • it is not a JSON array of objects, or it is over a limit;
  • an object has no type, or has a member that is not a common field;
  • the type is not one of your organization's types, or the application does not list it;
  • a field is not allowed for the type, or an action is not one of the type's actions;
  • a value has characters that are not allowed.

What the person sees​

The consent page lists every requested detail under It asks for this specific access. For each one it shows the type's name and description, the identifier of the type, and the actions, resource (identifier), locations, data types and privileges. The device approval page shows the same list. Every value is shown as text.

The person approves or declines the whole request. LumoAuth remembers the approval with the application's consent. A later request skips the consent page only when it asks for the same scopes and for details that the person approved exactly as they are asked now. Any other detail, or another value in one, shows the consent page again. With prompt=none, such a request gets consent_required.

Authorized apps in the person's account lists the specific access that they approved for each application, under Specific access. Removing the application there ends the approval, and the next request asks again.

Tokens​

The authorization code or device code carries the details that the person approved. The token endpoint returns them:

{
"access_token": "eyJ...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "openid",
"refresh_token": "8f2c...",
"authorization_details": [
{
"type": "payment_initiation",
"actions": ["initiate"],
"identifier": "ACC-1234",
"locations": ["https://api.example.com/payments"]
}
]
}
  • A JWT access token carries the same list in its authorization_details claim.
  • Introspection returns authorization_details for JWT and opaque tokens.
  • A response without details has no authorization_details member.

Ask for less at the token endpoint​

The token request of the authorization_code, refresh_token and urn:ietf:params:oauth:grant-type:device_code grants may send authorization_details too. The access token then carries what the request names, and the refresh token keeps the whole grant. Each requested object must be within one approved object:

  • the same type and the same members;
  • the same identifier;
  • list entries that the approved object holds.

A request that leaves out a member of the approved object, adds a member, or names another value is refused with invalid_authorization_details. A refresh can never widen the grant. Without the parameter, the access token carries every approved detail. [] asks for none.

How it fits with agents​

The agent flows keep their own rules. A just-in-time permission request and an agent-initiated CIBA request carry one authorization_details object, which LumoAuth judges against the agent's capabilities, your policies and the approval rules. They do not use the types on this page. See Just-in-time permissions.

Standard

RFC 9396 defines authorization_details, the error invalid_authorization_details, the token response member, the introspection member and the metadata authorization_details_types_supported and authorization_details_types. LumoAuth accepts the common fields of section 2.2 only.