{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beyond-identity/json-schema/beyond-identity-identity-provider-list-response-schema.json",
  "title": "IdentityProviderListResponse",
  "description": "Represents a list of identity providers as a response body.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beyond-identity-identity-provider-api-openapi.yml#/components/schemas/IdentityProviderListResponse",
  "type": "object",
  "required": [
    "identity_providers",
    "total_size"
  ],
  "properties": {
    "identity_providers": {
      "description": "The identity providers that are in the list.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/IdentityProviderResponse"
      }
    },
    "total_size": {
      "description": "The total number of identity providers contained by the Realm.",
      "type": "integer",
      "format": "uint",
      "minimum": 0
    },
    "next_page_token": {
      "description": "The value to be passed as the page_token parameter to retrieve the next page.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "IdentityProviderProtocolConfigOidcIdpResponse": {
      "description": "OIDC protocol configuration for connecting to an identity provider, and\nvalidating the token we received.\n",
      "type": "object",
      "required": [
        "client_id",
        "client_secret",
        "token_scopes",
        "identity_attribute",
        "pkce",
        "jwks_url",
        "token_url",
        "authorize_url",
        "redirect_url",
        "identifying_claim_name",
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "oidc_idp"
          ]
        },
        "client_id": {
          "description": "The OIDC client id. This value is from the identity provider.\n",
          "type": "string"
        },
        "client_secret": {
          "description": "The OIDC client secret. This value is from the identity provider.\n",
          "type": "string"
        },
        "token_scopes": {
          "description": "The scopes to assign to the generated Access token. Scopes will be checked against the identity before validating.\n",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "identity_attribute": {
          "$ref": "#/$defs/SubjectField"
        },
        "pkce": {
          "$ref": "#/$defs/PkceConfig"
        },
        "jwks_url": {
          "description": "The URL that points to the \".well-known/jwks.json\" of the identity\nprovider. Must be a URL.\n",
          "type": "string"
        },
        "token_url": {
          "description": "The URL that points to the \"/token\" endpoint of the identity\nprovider. Must be a URL.\n",
          "type": "string"
        },
        "authorize_url": {
          "description": "The \"/authorize\" URL to authenticate against inside of the identity\nprovider. Must be a URL.\n",
          "type": "string"
        },
        "redirect_url": {
          "description": "Redirect URL provided by Beyond Identity that the IdP can redirect\nend users to after successful authorize call. This is an\nOIDC-compliant callback.\n",
          "type": "string"
        },
        "identifying_claim_name": {
          "description": "The name of the claim that specifies the user's identity inside of a\ntoken.\n",
          "type": "string"
        }
      }
    },
    "IdentityProviderProtocolConfigResponse": {
      "description": "Represents the protocol configuration that is used by the identity\nprovider.\n",
      "oneOf": [
        {
          "$ref": "#/$defs/IdentityProviderProtocolConfigOidcIdpResponse"
        }
      ]
    },
    "IdentityProviderResponse": {
      "description": "Represents an identity provider.",
      "type": "object",
      "required": [
        "id",
        "tenant_id",
        "realm_id",
        "protocol_config",
        "display_name"
      ],
      "properties": {
        "id": {
          "description": "A unique identifier identifying an identity provider within a realm. This is\nautomatically set on creation. This field is immutable and read-only.\n",
          "type": "string",
          "readOnly": true
        },
        "tenant_id": {
          "type": "string",
          "description": "A unique identifier for the identity provider's tenant. This is automatically\nset on creation. This field is immutable and read-only.\n",
          "readOnly": true
        },
        "realm_id": {
          "type": "string",
          "description": "A unique identifier for the identity provider's realm. This is automatically\nset on creation. This field is immutable and read-only.\n",
          "readOnly": true
        },
        "display_name": {
          "type": "string",
          "description": "The human-readable name associated with the identity provider.\n"
        },
        "protocol_config": {
          "$ref": "#/$defs/IdentityProviderProtocolConfigResponse"
        }
      }
    },
    "PkceConfig": {
      "type": "string",
      "enum": [
        "disabled",
        "plain",
        "s256"
      ],
      "description": "PKCE code challenge methods supported for applications, as defined by\n[RFC-7636](https://datatracker.ietf.org/doc/html/rfc7636). Allowable values are:\n  - `disabled` : PKCE is disabled for this application. This is the default state if\n    the `pkce` field is left blank. Please note that public OIDC and OAuth2 configured\n    applications MUST enable PKCE support. Confidential clients can leave PKCE disabled\n    if they choose.\n  - `plain` : PKCE is enabled for this application. The server will correlate the `code_challenge` and\n    `code_verifier` between the `authorize` and `token` requests. In this configuration, those fields are\n    required to be identical. This is the lower security option for PKCE support and should only be used\n    by legacy clients, or clients that don't support `s256`.\n  - `s256` : PKCE is enabled for this application, and the server will correlate the `code_challenge` and\n    `code_verifier` between the `authorize` and `token` requests. In this configuration, those fields are\n    required to equate as follows: `code_challenge` = `base64url(sha256(ascii(code_verifier)))`. This is\n    the higher security option and should always be preferred if it is supported by the client.\n"
    },
    "SubjectField": {
      "description": "Defines which field should be used to populate the subject field of an id token.\n- `id` - The user ID is used.\n- `email` - The user email is used.\n- `username` - The username is used.\n",
      "type": "string",
      "enum": [
        "id",
        "email",
        "username",
        "external_id"
      ]
    }
  }
}