Files
matrix-authentication-service/policies/schema/authorization_grant_input.json
Quentin Gliech e40f5f97ec Regenerate config/API/policy schemas for schemars 1.0 + aide 0.16
Mechanical output changes from the dependency bump:
- aide 0.16 strips redundant null branches from optional query-param schemas
  (optionality stays expressed via required:false on the parameter).
- schemars 1.0 changes doc-comment dedenting, emits the ClientsConfig newtype as
  a named definition, and simplifies generic schema names
  (e.g. JsonWebKeySet_for_JsonWebKeyPublicParameters -> JsonWebKeySet).
2026-07-01 17:09:26 +02:00

108 lines
2.3 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AuthorizationGrantInput",
"description": "Input for the authorization grant policy.",
"type": "object",
"properties": {
"user": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"session_counts": {
"description": "How many sessions the user has.\nNot populated if it's not a user logging in.",
"anyOf": [
{
"$ref": "#/definitions/SessionCounts"
},
{
"type": "null"
}
]
},
"client": {
"type": "object",
"additionalProperties": true
},
"scope": {
"type": "string"
},
"grant_type": {
"$ref": "#/definitions/GrantType"
},
"requester": {
"$ref": "#/definitions/Requester"
}
},
"required": [
"client",
"scope",
"grant_type",
"requester"
],
"definitions": {
"SessionCounts": {
"description": "Information about how many sessions the user has",
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
"oauth2": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
"compat": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
"personal": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"required": [
"total",
"oauth2",
"compat",
"personal"
]
},
"GrantType": {
"type": "string",
"enum": [
"authorization_code",
"client_credentials",
"urn:ietf:params:oauth:grant-type:device_code"
]
},
"Requester": {
"description": "Identity of the requester",
"type": "object",
"properties": {
"ip_address": {
"description": "IP address of the entity making the request",
"type": [
"string",
"null"
],
"format": "ip"
},
"user_agent": {
"description": "User agent of the entity making the request",
"type": [
"string",
"null"
]
}
}
}
}
}