Skip to content

Rich Authorization Requests

OAuth 2.0 Rich Authorization Requests#

Rich Authorization Requests introduces new authorization_details parameter that is used to carry fine-grained authorization data in OAuth messages.

While scope is used for coarse-grained access, authorization_details is used for fine-grained access.

authorization_details are associated with authorization and thus with client to limit what authorization can be granted within given client.

authorization_details is JSON array, example:

      "type": "demo_authz_detail",
      "actions": [
      "locations": [
      "ui_representation": "Read balances and list accounts at"

Authorization Details Types#

type - is required element in single authorization detail and specifies the authorization details type as a string. Type defines how single authorization detail is handled by both AS and RS. Because "shape" and structure of single authorization detail can vary a lot, validation and representation logic is externalized to AuthzDetailType custom scripts.

type defines type of authorization detail. Each such type is represented by AS AuthzDetailType custom scripts. It means that for example above administrator must define two AuthzDetailType custom scripts with names: demo_authz_detail and financial-transaction.

If authorization_details parameter is absent in request then AuthzDetailType custom scripts are not invoked.

demo_authz_detail and financial-transaction AuthzDetailType custom scripts must be provided by administrator.

  • demo_authz_detail is called for all authorization details with "type": "demo_authz_detail"
  • financial-transaction is called for all authorization details with "type": "financial-transaction"

Sample Authorization Request

POST /jans-auth/restv1/authorize HTTP/1.1


Request is rejected if request's authorization_details has types which does not have corresponding AuthzDetailType custom script.

Check more details about AuthzDetailType custom scripts

AS Metadata (Discovery)#

Metadata endpoint has authorization_details_types_supported which shows supported authorization details types. Value for authorization_details_types_supported is populated based on valid and enabled AuthzDetailType insterception scripts.

For demo_authz_detail and financial-transaction AuthzDetailType custom scripts enabled discovery response has:

    "authorization_details_types_supported" : [ "demo_authz_detail", "financial-transaction" ],

Client Registration#

Client registration request has new parameter authorization_details_types to limit authorization details types supported by client. If request is made with authorization_details that has types that are not listed in client's authorization_details_types the request will be rejected.

Sample registration request and response

POST /jans-auth/restv1/register HTTP/1.1
Content-Type: application/json
Accept: application/json

  "grant_types" : [ "authorization_code", "implicit" ],
  "subject_type" : "public",
  "application_type" : "web",
  "authorization_details_types" : [ "demo_authz_detail" ],
  "scope" : "openid profile address email phone user_name",
  "minimum_acr_priority_list" : [ ],
  "redirect_uris" : [ "", "", "", "" ],
  "client_name" : "jans test app",
  "additional_audience" : [ ],
  "response_types" : [ "code" ]

HTTP/1.1 201
Cache-Control: no-store
Connection: Keep-Alive
Content-Length: 1653
Content-Type: application/json
Date: Mon, 18 Dec 2023 17:59:13 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Keep-Alive: timeout=5, max=100
Pragma: no-cache
Set-Cookie: X-Correlation-Id=7b231c8f-5b2e-445d-b5ea-0f693c1cd7f2; Secure; HttpOnly;HttpOnly
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block

    "allow_spontaneous_scopes": false,
    "application_type": "web",
    "rpt_as_jwt": false,
    "registration_client_uri": "",
    "tls_client_auth_subject_dn": "",
    "run_introspection_script_before_jwt_creation": false,
    "registration_access_token": "92a40113-b27c-43b9-bf96-a222fcfe1c9c",
    "client_id": "7a29bf35-96ec-4bbd-a05c-15e1ff9f07cc",
    "token_endpoint_auth_method": "client_secret_basic",
    "scope": "openid",
    "client_secret": "1af17da1-57a3-416b-a358-c84bb0ef0fad",
    "client_id_issued_at": 1702922353,
    "backchannel_logout_uri": "",
    "backchannel_logout_session_required": false,
    "client_name": "jans test app",
    "par_lifetime": 600,
    "spontaneous_scopes": [],
    "id_token_signed_response_alg": "RS256",
    "access_token_as_jwt": false,
    "grant_types": [
    "subject_type": "public",
    "authorization_details_types": ["demo_authz_detail"],
    "additional_token_endpoint_auth_methods": [],
    "keep_client_authorization_after_expiration": false,
    "require_par": false,
    "redirect_uris": [
    "redirect_uris_regex": "",
    "additional_audience": [],
    "frontchannel_logout_session_required": false,
    "client_secret_expires_at": 0,
    "access_token_signing_alg": "RS256",
    "response_types": ["code"]

Last update: 2024-02-08
Created: 2023-12-21