Skip to main content
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

Authorization Detail Type Management API

Download OpenAPI (YAML)Version 1.0

Base URL: https://localhost:8090

Authorization detail types in ThunderID register the RFC 9396 type values clients may request through the authorization_details parameter, each with the JSON Schema its details conform to, the consent summary shown to the user, and an optional processor that authorizes and enriches the details. Types are not bound to a resource server, so a request may ask for any registered type; the access token audience comes from the resource parameter, or the default resource server when there is none, as for permission scopes.

Download the OpenAPI definition (YAML)

Security schemes​

OAuth2: oauth2

authorizationCode flow, token URL https://localhost:8090/oauth2/token, authorization URL https://localhost:8090/oauth2/authorize

1 scopes
ScopeDescription
systemAccess to system management APIs

clientCredentials flow, token URL https://localhost:8090/oauth2/token

1 scopes
ScopeDescription
systemAccess to system management APIs

Authorization Detail Types​

Register RFC 9396 authorization details types that clients request through the authorization_details parameter.

List authorization details types​

GET /authorization-detail-types

Returns the registered RFC 9396 authorization details types, a page at a time, ordered by type value.

Scopes: system

Parameters

NameInTypeRequiredDescription
limitqueryinteger

Maximum number of records to return. Must be between 1 and 100 inclusive.

Default: 30

offsetqueryinteger

Number of records to skip for pagination

Default: 0

Responses

CodeDescriptionSchema
200

List of authorization details types

AuthorizationDetailTypeListResponse
400

Invalid limit or offset, or too many types to list in composite mode

Error
500

Internal server error

Error

Register an authorization details type​

POST /authorization-detail-types

Registers an RFC 9396 authorization details type. The new type starts at version 1. Any client can request it through the authorization_details parameter. A type is not bound to a resource server: the access token audience comes from the request's resource parameter, or the default resource server when there is none, as for permission scopes.

Validation rules:

  • type is required, at most 512 characters of printable ASCII without spaces, and unique across the deployment.
  • name is required and at most 100 characters.
  • schema is required, at most 64 KiB, and must be a JSON Schema 2020-12 schema that describes an object. $schema, when present, must be https://json-schema.org/draft/2020-12/schema. Keywords must be well typed and patterns must compile; $ref and $defs are refused. Limits must be satisfiable: a lower bound cannot exceed its upper bound, lengths and item counts cannot be negative, and multipleOf must be greater than 0. A const or enum on the type member must include the registered type value.
  • Property names must not contain a dot, since field paths and consent template placeholders separate names with one.
  • consentTemplate is at most 1000 bytes, and each {{...}} in it must be a placeholder naming a property the schema declares, or type.
  • A property's policy must use the settings described on the schema field, spelled exactly. A policy that is not valid makes the schema invalid. A schema error says what is wrong in its description.
  • processor.endpoint must be an absolute HTTPS URL with a valid host and port and no user information (HTTP is accepted only on a loopback host). A processor call times out after oauth.authorization_details.processor_timeout seconds (5 by default, at most 30).
  • A type without a processor can be requested only with a signed-in user who consents. A client_credentials token request for it is refused with invalid_authorization_details.
  • The request body is at most 1 MiB.

Scopes: system

Request body (required): application/json

Schema: AuthorizationDetailTypeRequest

10 properties
NameTypeRequiredDescription
idstring

Ignored; a create generates the id and an update takes it from the path.

versioninteger

Ignored; the server sets the version.

isReadOnlyboolean

Ignored; a type declared in a file is read-only.

typestringYes

RFC 9396 type value clients send in authorization_details, such as a URI. Printable ASCII without spaces, unique across the deployment, and immutable after creation.

namestringYes

Display name of the type, shown in the Console

descriptionstring

Optional description of the type

schemaobjectYes

JSON Schema 2020-12 schema that every requested detail of this type must conform to. It must describe an object. type, the only member RFC 9396 defines for every detail, is required and accepted as a string when the schema does not declare it. Every other member, the RFC 9396 common fields (locations, actions, datatypes, privileges, identifier) included, is accepted only when the schema declares it, so a type defines which common fields it uses and any limits on them, such as an enum or pattern on locations. Every object in the schema is closed, so undeclared fields are rejected; additionalProperties, patternProperties and unevaluatedProperties are refused. The schema is a supported subset of JSON Schema 2020-12: type, title, description, enum and const on every schema, policy on properties outside a list's items, $schema at the root, properties and required on objects, minLength, maxLength, pattern and format (date or date-time, checked by the server) on strings, minimum, maximum, exclusiveMinimum, exclusiveMaximum and multipleOf on numbers, and items (required), minItems, maxItems and uniqueItems on arrays. Any other keyword is refused, and every property and list item schema constrains its value with type, const or enum. type names one of string, number, boolean, object or array; integer and null are refused, so a whole number is a number with multipleOf: 1. A property's title labels that field on the consent prompt; a field without one is labeled by its path. A property's policy says who supplies the field and how it may change after the request. A property without one is supplied by the client and cannot change. Settings: suppliedBy (client, the default, or processor: the client must not send the field and only the processor sets it); modification (none, the default, decrease, increase, removeItems or addItems, the last for a list whose items take permission away, such as excluded merchants; a list with removeItems may be emptied but not left out, since a missing list can read as unrestricted; text and other unordered values cannot change); modifiableBy (any of processor, user, client, required with a modification); and minimum and maximum, limits for a string with format date or date-time, checked on every request and after every change. A number is limited with the schema's own minimum and maximum keywords instead, which are checked at the same points. There is no value type setting: the property's schema decides how values compare. type: number compares as a number, exactly, and string with format date or date-time as a date or an instant; nothing else is ordered, so numbers written as text cannot be lowered, raised or limited by a policy. decrease and increase need one of these. suppliedBy: processor cannot be combined with a modification or set on type. A type whose fields the processor supplies or may change must have a processor. A required field the processor supplies is not required in the client's request, only once the processor has answered. A modification by the user is made on the consent prompt and checked before it is granted. Property names must not contain a dot. The client's values are shown on the consent prompt, so limit free text with maxLength. A number in a detail with more precision than a 64-bit floating-point number holds, such as 100.0000000000000001, is refused, since the schema checks numbers at that precision while the token carries them as sent.

consentTemplatestring

Summary shown on the consent prompt, at most 1000 bytes. Each {{path}} placeholder is replaced with the value at that dot-separated path in the detail, and must name a property the schema declares or type. When a placeholder has no value in a detail, such as an optional field the client left out, the summary is not shown for that detail rather than shown with a gap; the detail's fields are still listed.

processorAuthorizationDetailProcessor

Endpoint that authorizes and enriches the details of this type. ThunderID posts every detail served by the same endpoint in one batched call. The call is specified in api/extensions/authorization-details-processor.yaml, authenticated with authentication; details are batched per endpoint and credential, so a type's credential is never sent with another type's details. Redirects are not followed. Only a false decision refuses a detail. A processor that cannot be reached, times out, answers with a status other than 200 (a redirect included) or a body that cannot be decoded, leaves a detail without a decision, answers one twice, or patches a field its policy does not let it change, fails the request; details are never let through unchecked.

reuseboolean

Whether an earlier approval may stand in for the consent prompt. false, the default, prompts on every request and leaves the detail out of the refresh token, so it is granted for the authorization code's access token only, which suits one-off authorizations such as a single payment. With true, a detail the user already approved for the client is not prompted again while that approval is within the client's login consent validity period, on the same type version, and the new request is no wider than the approval, and the refresh token keeps the detail while the type stays on the version it was granted on. A refresh after the version moves leaves the detail out, so the user approves it again on the new version. An approval is a standing permission rather than a count: it covers every requested detail no wider than it, including several in one request; use false for authorizations that must be approved each time.

Default: false

Responses

CodeDescriptionSchema
201

Authorization details type created

AuthorizationDetailTypeResponse
400

Bad request

Error
409

Conflict

Error
500

Internal server error

Error

Get an authorization details type​

GET /authorization-detail-types/{id}

Returns a registered authorization details type.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

Authorization details type ID

Responses

CodeDescriptionSchema
200

Authorization details type

AuthorizationDetailTypeResponse
404

Authorization details type not found

Error
500

Internal server error

Error

Update an authorization details type​

PUT /authorization-detail-types/{id}

Replaces the definition of an authorization details type. The type value is immutable and must match the registered value. version increments when the update changes the schema, the consent template or reuse, or adds or removes the processor, since earlier approvals only count for the version they were given on; other changes keep it, and an update that changes nothing is not saved. The same validation rules as registration apply.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

Authorization details type ID

Request body (required): application/json

Schema: AuthorizationDetailTypeRequest

10 properties
NameTypeRequiredDescription
idstring

Ignored; a create generates the id and an update takes it from the path.

versioninteger

Ignored; the server sets the version.

isReadOnlyboolean

Ignored; a type declared in a file is read-only.

typestringYes

RFC 9396 type value clients send in authorization_details, such as a URI. Printable ASCII without spaces, unique across the deployment, and immutable after creation.

namestringYes

Display name of the type, shown in the Console

descriptionstring

Optional description of the type

schemaobjectYes

JSON Schema 2020-12 schema that every requested detail of this type must conform to. It must describe an object. type, the only member RFC 9396 defines for every detail, is required and accepted as a string when the schema does not declare it. Every other member, the RFC 9396 common fields (locations, actions, datatypes, privileges, identifier) included, is accepted only when the schema declares it, so a type defines which common fields it uses and any limits on them, such as an enum or pattern on locations. Every object in the schema is closed, so undeclared fields are rejected; additionalProperties, patternProperties and unevaluatedProperties are refused. The schema is a supported subset of JSON Schema 2020-12: type, title, description, enum and const on every schema, policy on properties outside a list's items, $schema at the root, properties and required on objects, minLength, maxLength, pattern and format (date or date-time, checked by the server) on strings, minimum, maximum, exclusiveMinimum, exclusiveMaximum and multipleOf on numbers, and items (required), minItems, maxItems and uniqueItems on arrays. Any other keyword is refused, and every property and list item schema constrains its value with type, const or enum. type names one of string, number, boolean, object or array; integer and null are refused, so a whole number is a number with multipleOf: 1. A property's title labels that field on the consent prompt; a field without one is labeled by its path. A property's policy says who supplies the field and how it may change after the request. A property without one is supplied by the client and cannot change. Settings: suppliedBy (client, the default, or processor: the client must not send the field and only the processor sets it); modification (none, the default, decrease, increase, removeItems or addItems, the last for a list whose items take permission away, such as excluded merchants; a list with removeItems may be emptied but not left out, since a missing list can read as unrestricted; text and other unordered values cannot change); modifiableBy (any of processor, user, client, required with a modification); and minimum and maximum, limits for a string with format date or date-time, checked on every request and after every change. A number is limited with the schema's own minimum and maximum keywords instead, which are checked at the same points. There is no value type setting: the property's schema decides how values compare. type: number compares as a number, exactly, and string with format date or date-time as a date or an instant; nothing else is ordered, so numbers written as text cannot be lowered, raised or limited by a policy. decrease and increase need one of these. suppliedBy: processor cannot be combined with a modification or set on type. A type whose fields the processor supplies or may change must have a processor. A required field the processor supplies is not required in the client's request, only once the processor has answered. A modification by the user is made on the consent prompt and checked before it is granted. Property names must not contain a dot. The client's values are shown on the consent prompt, so limit free text with maxLength. A number in a detail with more precision than a 64-bit floating-point number holds, such as 100.0000000000000001, is refused, since the schema checks numbers at that precision while the token carries them as sent.

consentTemplatestring

Summary shown on the consent prompt, at most 1000 bytes. Each {{path}} placeholder is replaced with the value at that dot-separated path in the detail, and must name a property the schema declares or type. When a placeholder has no value in a detail, such as an optional field the client left out, the summary is not shown for that detail rather than shown with a gap; the detail's fields are still listed.

processorAuthorizationDetailProcessor

Endpoint that authorizes and enriches the details of this type. ThunderID posts every detail served by the same endpoint in one batched call. The call is specified in api/extensions/authorization-details-processor.yaml, authenticated with authentication; details are batched per endpoint and credential, so a type's credential is never sent with another type's details. Redirects are not followed. Only a false decision refuses a detail. A processor that cannot be reached, times out, answers with a status other than 200 (a redirect included) or a body that cannot be decoded, leaves a detail without a decision, answers one twice, or patches a field its policy does not let it change, fails the request; details are never let through unchecked.

reuseboolean

Whether an earlier approval may stand in for the consent prompt. false, the default, prompts on every request and leaves the detail out of the refresh token, so it is granted for the authorization code's access token only, which suits one-off authorizations such as a single payment. With true, a detail the user already approved for the client is not prompted again while that approval is within the client's login consent validity period, on the same type version, and the new request is no wider than the approval, and the refresh token keeps the detail while the type stays on the version it was granted on. A refresh after the version moves leaves the detail out, so the user approves it again on the new version. An approval is a standing permission rather than a count: it covers every requested detail no wider than it, including several in one request; use false for authorizations that must be approved each time.

Default: false

Responses

CodeDescriptionSchema
200

Authorization details type updated

AuthorizationDetailTypeResponse
400

Bad request

Error
404

Authorization details type not found

Error
409

The type changed while it was being updated

Error
500

Internal server error

Error

Delete an authorization details type​

DEL /authorization-detail-types/{id}

Deletes an authorization details type. Clients can no longer request it, and it is removed from authorization_details_types_supported in the authorization server metadata. Deleting a type that does not exist succeeds.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

Authorization details type ID

Responses

CodeDescriptionSchema
204

Authorization details type deleted, or no type has the ID

400

Bad request

Error
500

Internal server error

Error

Schemas​

AuthorizationDetailTypeRequest​

Type: object

Unknown members are refused, here and in processor. The read-only members a read returns (id, version and isReadOnly) are accepted and ignored, so a fetched type can be sent back as an update.

10 properties
NameTypeRequiredDescription
idstring

Ignored; a create generates the id and an update takes it from the path.

versioninteger

Ignored; the server sets the version.

isReadOnlyboolean

Ignored; a type declared in a file is read-only.

typestringYes

RFC 9396 type value clients send in authorization_details, such as a URI. Printable ASCII without spaces, unique across the deployment, and immutable after creation.

namestringYes

Display name of the type, shown in the Console

descriptionstring

Optional description of the type

schemaobjectYes

JSON Schema 2020-12 schema that every requested detail of this type must conform to. It must describe an object. type, the only member RFC 9396 defines for every detail, is required and accepted as a string when the schema does not declare it. Every other member, the RFC 9396 common fields (locations, actions, datatypes, privileges, identifier) included, is accepted only when the schema declares it, so a type defines which common fields it uses and any limits on them, such as an enum or pattern on locations. Every object in the schema is closed, so undeclared fields are rejected; additionalProperties, patternProperties and unevaluatedProperties are refused. The schema is a supported subset of JSON Schema 2020-12: type, title, description, enum and const on every schema, policy on properties outside a list's items, $schema at the root, properties and required on objects, minLength, maxLength, pattern and format (date or date-time, checked by the server) on strings, minimum, maximum, exclusiveMinimum, exclusiveMaximum and multipleOf on numbers, and items (required), minItems, maxItems and uniqueItems on arrays. Any other keyword is refused, and every property and list item schema constrains its value with type, const or enum. type names one of string, number, boolean, object or array; integer and null are refused, so a whole number is a number with multipleOf: 1. A property's title labels that field on the consent prompt; a field without one is labeled by its path. A property's policy says who supplies the field and how it may change after the request. A property without one is supplied by the client and cannot change. Settings: suppliedBy (client, the default, or processor: the client must not send the field and only the processor sets it); modification (none, the default, decrease, increase, removeItems or addItems, the last for a list whose items take permission away, such as excluded merchants; a list with removeItems may be emptied but not left out, since a missing list can read as unrestricted; text and other unordered values cannot change); modifiableBy (any of processor, user, client, required with a modification); and minimum and maximum, limits for a string with format date or date-time, checked on every request and after every change. A number is limited with the schema's own minimum and maximum keywords instead, which are checked at the same points. There is no value type setting: the property's schema decides how values compare. type: number compares as a number, exactly, and string with format date or date-time as a date or an instant; nothing else is ordered, so numbers written as text cannot be lowered, raised or limited by a policy. decrease and increase need one of these. suppliedBy: processor cannot be combined with a modification or set on type. A type whose fields the processor supplies or may change must have a processor. A required field the processor supplies is not required in the client's request, only once the processor has answered. A modification by the user is made on the consent prompt and checked before it is granted. Property names must not contain a dot. The client's values are shown on the consent prompt, so limit free text with maxLength. A number in a detail with more precision than a 64-bit floating-point number holds, such as 100.0000000000000001, is refused, since the schema checks numbers at that precision while the token carries them as sent.

consentTemplatestring

Summary shown on the consent prompt, at most 1000 bytes. Each {{path}} placeholder is replaced with the value at that dot-separated path in the detail, and must name a property the schema declares or type. When a placeholder has no value in a detail, such as an optional field the client left out, the summary is not shown for that detail rather than shown with a gap; the detail's fields are still listed.

processorAuthorizationDetailProcessor

Endpoint that authorizes and enriches the details of this type. ThunderID posts every detail served by the same endpoint in one batched call. The call is specified in api/extensions/authorization-details-processor.yaml, authenticated with authentication; details are batched per endpoint and credential, so a type's credential is never sent with another type's details. Redirects are not followed. Only a false decision refuses a detail. A processor that cannot be reached, times out, answers with a status other than 200 (a redirect included) or a body that cannot be decoded, leaves a detail without a decision, answers one twice, or patches a field its policy does not let it change, fails the request; details are never let through unchecked.

reuseboolean

Whether an earlier approval may stand in for the consent prompt. false, the default, prompts on every request and leaves the detail out of the refresh token, so it is granted for the authorization code's access token only, which suits one-off authorizations such as a single payment. With true, a detail the user already approved for the client is not prompted again while that approval is within the client's login consent validity period, on the same type version, and the new request is no wider than the approval, and the refresh token keeps the detail while the type stays on the version it was granted on. A refresh after the version moves leaves the detail out, so the user approves it again on the new version. An approval is a standing permission rather than a count: it covers every requested detail no wider than it, including several in one request; use false for authorizations that must be approved each time.

Default: false

AuthorizationDetailTypeResponse​

Type: object

10 properties
NameTypeRequiredDescription
idstringYes

Unique identifier of the type, used in management API paths

typestringYes

RFC 9396 type value clients send in authorization_details

namestringYes

Display name of the type, shown in the Console

descriptionstring

Optional description of the type

versionintegerYes

Version of the type definition. Starts at 1 and increments when an update changes the schema, the consent template or reuse, or adds or removes the processor.

schemaobjectYes

JSON Schema 2020-12 schema as registered

consentTemplatestring

Summary template shown on the consent prompt

processorAuthorizationDetailProcessor

Endpoint that authorizes and enriches the details of this type. ThunderID posts every detail served by the same endpoint in one batched call. The call is specified in api/extensions/authorization-details-processor.yaml, authenticated with authentication; details are batched per endpoint and credential, so a type's credential is never sent with another type's details. Redirects are not followed. Only a false decision refuses a detail. A processor that cannot be reached, times out, answers with a status other than 200 (a redirect included) or a body that cannot be decoded, leaves a detail without a decision, answers one twice, or patches a field its policy does not let it change, fails the request; details are never let through unchecked.

reusebooleanYes

Whether earlier approvals are reused, always returned. See the request field.

isReadOnlybooleanYes

Whether the type is defined in declarative configuration. A read-only type cannot be updated or deleted through the API.

AuthorizationDetailTypeListResponse​

Type: object

5 properties
NameTypeRequiredDescription
totalResultsintegerYes

Number of registered types

startIndexintegerYes

Index of the first element of the page, which will be equal to offset + 1

countintegerYes

Number of elements in the returned page

typesarray of AuthorizationDetailTypeResponseYes
linksarray of LinkYes

AuthorizationDetailProcessor​

Type: object

Endpoint that authorizes and enriches the details of this type. ThunderID posts every detail served by the same endpoint in one batched call. The call is specified in api/extensions/authorization-details-processor.yaml, authenticated with authentication; details are batched per endpoint and credential, so a type's credential is never sent with another type's details. Redirects are not followed. Only a false decision refuses a detail. A processor that cannot be reached, times out, answers with a status other than 200 (a redirect included) or a body that cannot be decoded, leaves a detail without a decision, answers one twice, or patches a field its policy does not let it change, fails the request; details are never let through unchecked.

2 properties
NameTypeRequiredDescription
endpointstring (uri)Yes

Absolute HTTPS URL of the processor, with a valid host and port and no user information. HTTP is accepted only on a loopback host.

authenticationOutboundAuthentication

How ThunderID authenticates itself to the processor: none, bearer, basic or api_key. The type selects the method and properties carries that method's fields, as for a connection's outbound authentication.

Credential values are stored encrypted and returned as "******". On update, a masked value or an omitted authentication block keeps the stored credential while the endpoint is unchanged; when the endpoint changes, the credential must be given again (RAR-1009). Setting type to none removes authentication.

OutboundAuthentication​

Type: object

How ThunderID authenticates itself to the processor: none, bearer, basic or api_key. The type selects the method and properties carries that method's fields, as for a connection's outbound authentication.

Credential values are stored encrypted and returned as "******". On update, a masked value or an omitted authentication block keeps the stored credential while the endpoint is unchanged; when the endpoint changes, the credential must be given again (RAR-1009). Setting type to none removes authentication.

2 properties
NameTypeRequiredDescription
typestringYes

The authentication method. none sends no credentials.

propertiesobject

The selected method's field values, keyed by field name.

Type: object

2 properties
NameTypeRequiredDescription
hrefstring
relstring

Error​

Type: object

3 properties
NameTypeRequiredDescription
codestringYes

Error code. Codes follow the RAR-XXXX convention.

messageI18nMessageYes

Internationalized message with translation key and default value.

descriptionI18nMessage

Internationalized message with translation key and default value.

I18nMessage​

Type: object

Internationalized message with translation key and default value.

2 properties
NameTypeRequiredDescription
keystringYes

Translation key for fetching localized message.

defaultValuestringYes

Default message in English (fallback).

Was this page helpful?