{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daytona-io/json-schema/daytona-io-identity-provider-schema.json",
  "title": "IdentityProvider",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daytona-io-organizations-api-openapi.yml#/components/schemas/IdentityProvider",
  "properties": {
    "id": {
      "description": "Unique identifier",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization ID",
      "type": "string"
    },
    "name": {
      "description": "Display name for the identity provider",
      "type": "string"
    },
    "oidcConfig": {
      "allOf": [
        {
          "$ref": "#/$defs/OidcIdPConfigResponse"
        }
      ],
      "description": "OIDC configuration (secret redacted)"
    },
    "emailDomains": {
      "description": "Email domains used for IdP discovery on the login form. May be empty when `allowAnyDomain` is true.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "allowAnyDomain": {
      "description": "Whether the IdP accepts any email domain returned by the external provider",
      "type": "boolean"
    },
    "trustEmailVerified": {
      "description": "Whether the `email_verified` claim check is skipped on SSO logins through this identity provider",
      "type": "boolean"
    },
    "defaultAssignedRoleIds": {
      "description": "Organization role IDs assigned to users who join via SSO through this identity provider",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "enabled": {
      "description": "Whether the identity provider is enabled",
      "type": "boolean"
    },
    "createdAt": {
      "description": "Creation timestamp",
      "format": "date-time",
      "type": "string"
    },
    "updatedAt": {
      "description": "Last update timestamp",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "allowAnyDomain",
    "createdAt",
    "defaultAssignedRoleIds",
    "emailDomains",
    "enabled",
    "id",
    "name",
    "oidcConfig",
    "organizationId",
    "trustEmailVerified",
    "updatedAt"
  ],
  "type": "object",
  "$defs": {
    "OidcIdPConfigResponse": {
      "properties": {
        "issuerUrl": {
          "description": "OIDC Issuer URL",
          "type": "string"
        },
        "clientId": {
          "description": "OAuth Client ID",
          "type": "string"
        },
        "scope": {
          "description": "OAuth scopes",
          "type": "string"
        }
      },
      "required": [
        "clientId",
        "issuerUrl"
      ],
      "type": "object"
    }
  }
}