{
  "asyncapi": "3.0.0",
  "info": {
    "title": "core/auth-settings",
    "version": ""
  },
  "channels": {
    "systemEventsAuthSettings": {
      "address": "system-events.auth-settings",
      "messages": {
        "coreAuthSettingsUpdated": {
          "$ref": "#/components/messages/auth-settings.coreAuthSettingsUpdated"
        }
      }
    }
  },
  "operations": {
    "coreAuthSettingsUpdated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsAuthSettings"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsAuthSettings/messages/coreAuthSettingsUpdated"
        }
      ]
    }
  },
  "components": {
    "messages": {
      "auth-settings.coreAuthSettingsUpdated": {
        "name": "com.qlik.core.auth-settings.updated",
        "tags": [
          {
            "name": "auth-settings"
          }
        ],
        "title": "Auth settings updated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/authSettings"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_updates": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/attributeUpdate"
                          }
                        }
                      }
                    }
                  ],
                  "examples": [],
                  "description": "Contains the updated authentication settings and field-level changes."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.auth-settings.updated",
                  "description": "Unique identifier for the event type."
                },
                "source": {
                  "type": "string",
                  "default": "com.qlik/iam-resources",
                  "description": "Identifies the context in which an event happened."
                }
              }
            }
          ]
        },
        "description": "Published when auth settings are updated.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      }
    },
    "schemas": {
      "attributeUpdate": {
        "type": "object",
        "required": [
          "path",
          "oldValue",
          "newValue"
        ],
        "properties": {
          "path": {
            "type": "string",
            "example": "/userSessionInactivityTimeoutMinutes",
            "description": "The updated attribute path."
          },
          "newValue": {
            "example": 30,
            "description": "The new JSON value of the updated attribute."
          },
          "oldValue": {
            "example": 60,
            "description": "The old JSON value of the updated attribute."
          }
        },
        "description": "An attribute update object that contains the change of an attribute."
      },
      "authSettings": {
        "type": "object",
        "examples": [
          {
            "id": "5be59decca62aa00097268a4",
            "tenantId": "VZhiEfgW2bLd7HgR-jjzAh6VnicipweT",
            "maxUserSessionLifespanMinutes": 1440,
            "dcrAllowedAuthenticationMethods": [
              "client_secret"
            ],
            "dynamicClientRegistrationEnabled": true,
            "userSessionInactivityTimeoutMinutes": 60
          }
        ],
        "required": [
          "id",
          "tenantId",
          "userSessionInactivityTimeoutMinutes",
          "maxUserSessionLifespanMinutes"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "5be59decca62aa00097268a4",
            "description": "The ID of the Auth Settings."
          },
          "tenantId": {
            "type": "string",
            "example": "5be59decca62aa00097268a4",
            "description": "Unique identifier for the tenant the Auth Settings belongs to."
          },
          "maxUserSessionLifespanMinutes": {
            "type": "integer",
            "format": "int64",
            "example": 1440,
            "description": "Max session lifespan in minutes."
          },
          "dcrAllowedAuthenticationMethods": {
            "type": "array",
            "items": {
              "enum": [
                "none",
                "client_secret"
              ],
              "type": "string"
            },
            "example": [
              "client_secret"
            ],
            "description": "The allowed authentication methods for dynamic client registration."
          },
          "dynamicClientRegistrationEnabled": {
            "type": "boolean",
            "example": false,
            "description": "Indicates whether dynamic client registration is enabled. Only present when the dynamic client registration feature flag is enabled."
          },
          "userSessionInactivityTimeoutMinutes": {
            "type": "integer",
            "format": "int64",
            "example": 60,
            "description": "Max session inactivity time in minutes."
          }
        },
        "description": "Authentication Settings resource object."
      },
      "cloudEventsContextAttributes": {
        "type": "object",
        "required": [
          "id",
          "source",
          "specversion",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "A234-1234-1234"
            ],
            "minLength": 1,
            "description": "Identifies the event."
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-04-05T17:31:00Z"
            ],
            "minLength": 1,
            "description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339."
          },
          "type": {
            "type": "string",
            "examples": [
              "com.qlik.core.auth-settings.updated",
              "com.qlik.core.ip-policy.created",
              "com.qlik.core.ip-policy.updated",
              "com.qlik.core.ip-policy.deleted"
            ],
            "minLength": 1,
            "description": "Describes the type of event related to the originating occurrence."
          },
          "source": {
            "type": "string",
            "format": "uri-reference",
            "examples": [
              "com.qlik/my-service"
            ],
            "minLength": 1,
            "description": "Identifies the context in which an event happened."
          },
          "specversion": {
            "type": "string",
            "examples": [
              "1.0"
            ],
            "minLength": 1,
            "description": "The version of the CloudEvents specification which the event uses."
          },
          "datacontenttype": {
            "type": "string",
            "examples": [
              "application/json"
            ],
            "minLength": 1,
            "description": "Content type of the data value. Must adhere to RFC 2046 format."
          }
        },
        "description": "CloudEvents Specification JSON Schema"
      },
      "cloudEventsQlikExtensionsAttributes": {
        "type": "object",
        "required": [
          "tenantid"
        ],
        "properties": {
          "userid": {
            "type": "string",
            "examples": [
              "VZhiEfgW2bLd7HgR-jjzAh6VnicipweT"
            ],
            "description": "Unique identifier for the user triggering the event."
          },
          "tenantid": {
            "type": "string",
            "examples": [
              "VZhiEfgW2bLd7HgR-jjzAh6VnicipweT"
            ],
            "description": "Unique identifier for the tenant related to the event."
          }
        }
      }
    }
  }
}