diff --git a/.fern/replay.lock b/.fern/replay.lock index 186ad1b6c..21a553009 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -18,14 +18,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-csharp-sdk: 2.66.5 -current_generation: 37f75e8c5a5b37f0d7a0250b398fbe938745aa74 + - commit_sha: a512bdbe19d2fd38306aa649d016526a518ecc14 + tree_hash: ef6faabd362770a63617f08bf02adf0d0e6ae508 + timestamp: 2026-06-09T04:56:46.960Z + cli_version: unknown + generator_versions: + fernapi/fern-csharp-sdk: 2.66.5 +current_generation: a512bdbe19d2fd38306aa649d016526a518ecc14 patches: - id: patch-4a7a2c3e content_hash: sha256:afae223b4593598543491ca12e36149571f886b494dcf4311dcea092548f7bd0 original_commit: 4a7a2c3e44bfc06c1f164a3c6ef0ae748ce3075b original_message: Adds extension to convert UserDateSchema to DateTime original_author: Kailash B - base_generation: 37f75e8c5a5b37f0d7a0250b398fbe938745aa74 + base_generation: a512bdbe19d2fd38306aa649d016526a518ecc14 files: - tests/Auth0.ManagementApi.Test/Unit/Extensions/UserDateSchemaExtensionsTest.cs patch_content: | @@ -233,7 +239,7 @@ patches: original_commit: f898e213a3bde5c59096e7f5eb940e6fd76c26d8 original_message: Customer customizations (composite) original_author: composite - base_generation: 37f75e8c5a5b37f0d7a0250b398fbe938745aa74 + base_generation: a512bdbe19d2fd38306aa649d016526a518ecc14 files: - src/Auth0.ManagementApi/Core/JsonConfiguration.cs - tests/Auth0.ManagementApi.Test/Auth0.ManagementApi.Test.csproj diff --git a/reference.md b/reference.md index 590850d31..d60982926 100644 --- a/reference.md +++ b/reference.md @@ -1049,16 +1049,14 @@ await client.Clients.PreviewCimdMetadataAsync( Idempotent registration for Client ID Metadata Document (CIMD) clients. Uses external_client_id as the unique identifier for upsert operations. -Create: Returns 201 when a new client is created (requires create:clients scope). -Update: Returns 200 when an existing client is updated (requires update:clients scope). +**Create:** Returns 201 when a new client is created (requires `create:clients` scope). +**Update:** Returns 200 when an existing client is updated (requires `update:clients` scope). This endpoint automatically: - +- Fetches and validates the metadata document +- Maps CIMD fields to Auth0 client configuration +- Creates/rotates credentials from the JWKS +- Enforces CIMD security policies (HTTPS-only, no shared secrets) @@ -6676,7 +6674,7 @@ await client.RefreshTokens.ListAsync(
-Revoke refresh tokens in bulk by ID list, user, user+client, or client. +Revoke refresh tokens in bulk by ID list, user, user+client, or user+client+audience.
@@ -12435,7 +12433,7 @@ await client.Branding.Themes.UpdateAsync(
-Retrieve a list of phone providers details set for a Tenant. A list of fields to include or exclude may also be specified. +Retrieve a list of [phone providers](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details set for a Tenant. A list of fields to include or exclude may also be specified.
@@ -12491,8 +12489,8 @@ await client.Branding.Phone.Providers.ListAsync(
-Create a phone provider. -The credentials object requires different properties depending on the phone provider (which is specified using the name property). +Create a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers). +The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property).
@@ -12552,7 +12550,7 @@ await client.Branding.Phone.Providers.CreateAsync(
-Retrieve phone provider details. A list of fields to include or exclude may also be specified. +Retrieve [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details. A list of fields to include or exclude may also be specified.
@@ -12660,8 +12658,8 @@ await client.Branding.Phone.Providers.DeleteAsync("id");
-Update a phone provider. -The credentials object requires different properties depending on the phone provider (which is specified using the name property). +Update a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers). +The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property).
@@ -15043,7 +15041,7 @@ await client.Connections.ScimConfiguration.Tokens.DeleteAsync("id", "tokenId");
-Retrieve details of the email provider configuration in your tenant. A list of fields to include or exclude may also be specified. +Retrieve details of the [email provider configuration](https://auth0.com/docs/customize/email/smtp-email-providers) in your tenant. A list of fields to include or exclude may also be specified.
@@ -15099,48 +15097,31 @@ await client.Emails.Provider.GetAsync(
-Create an email provider. The credentials object -requires different properties depending on the email provider (which is specified using the name property): -
    -
  • mandrill requires api_key
  • -
  • sendgrid requires api_key
  • -
  • - sparkpost requires api_key. Optionally, set region to eu to use - the SparkPost service hosted in Western Europe; set to null to use the SparkPost service hosted in - North America. eu or null are the only valid values for region. -
  • -
  • - mailgun requires api_key and domain. Optionally, set region to - eu to use the Mailgun service hosted in Europe; set to null otherwise. eu or - null are the only valid values for region. -
  • -
  • ses requires accessKeyId, secretAccessKey, and region
  • -
  • - smtp requires smtp_host, smtp_port, smtp_user, and - smtp_pass -
  • -
-Depending on the type of provider it is possible to specify settings object with different configuration +Create an [email provider](https://auth0.com/docs/email/providers). The `credentials` object +requires different properties depending on the email provider (which is specified using the `name` property): + +- `mandrill` requires `api_key` +- `sendgrid` requires `api_key` +- `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + North America. `eu` or `null` are the only valid values for `region`. +- `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + `null` are the only valid values for `region`. +- `ses` requires `accessKeyId`, `secretAccessKey`, and `region` +- `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + `smtp_pass` + +Depending on the type of provider it is possible to specify `settings` object with different configuration options, which will be used when sending an email: -
    -
  • - smtp provider, settings may contain headers object. -
      -
    • - When using AWS SES SMTP host, you may provide a name of configuration set in - X-SES-Configuration-Set header. Value must be a string. -
    • -
    • - When using Sparkpost host, you may provide value for - X-MSYS_API header. Value must be an object. -
    • -
    -
  • -
  • - for ses provider, settings may contain message object, where you can provide - a name of configuration set in configuration_set_name property. Value must be a string. -
  • -
+ +- `smtp` provider, `settings` may contain `headers` object. + - When using AWS SES SMTP host, you may provide a name of configuration set in + `X-SES-Configuration-Set` header. Value must be a string. + - When using Sparkpost host, you may provide value for + `X-MSYS_API` header. Value must be an object. +- For `ses` provider, `settings` may contain `message` object, where you can provide + a name of configuration set in `configuration_set_name` property. Value must be a string.
@@ -15239,46 +15220,32 @@ await client.Emails.Provider.DeleteAsync();
-Update an email provider. The credentials object -requires different properties depending on the email provider (which is specified using the name property): -
    -
  • mandrill requires api_key
  • -
  • sendgrid requires api_key
  • -
  • - sparkpost requires api_key. Optionally, set region to eu to use - the SparkPost service hosted in Western Europe; set to null to use the SparkPost service hosted in - North America. eu or null are the only valid values for region. -
  • -
  • - mailgun requires api_key and domain. Optionally, set region to - eu to use the Mailgun service hosted in Europe; set to null otherwise. eu or - null are the only valid values for region. -
  • -
  • ses requires accessKeyId, secretAccessKey, and region
  • -
  • - smtp requires smtp_host, smtp_port, smtp_user, and - smtp_pass -
  • -
-Depending on the type of provider it is possible to specify settings object with different configuration +Update an [email provider](https://auth0.com/docs/email/providers). The `credentials` object +requires different properties depending on the email provider (which is specified using the `name` property): + +- `mandrill` requires `api_key` +- `sendgrid` requires `api_key` +- `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + North America. `eu` or `null` are the only valid values for `region`. +- `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + `null` are the only valid values for `region`. +- `ses` requires `accessKeyId`, `secretAccessKey`, and `region` +- `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + `smtp_pass` + +Depending on the type of provider it is possible to specify `settings` object with different configuration options, which will be used when sending an email: -
    -
  • - smtp provider, settings may contain headers object. -
      -
    • - When using AWS SES SMTP host, you may provide a name of configuration set in - X-SES-Configuration-Set header. Value must be a string. -
    • -
    • - When using Sparkpost host, you may provide value for - X-MSYS_API header. Value must be an object. -
    • -
    - for ses provider, settings may contain message object, where you can provide - a name of configuration set in configuration_set_name property. Value must be a string. -
  • -
+ +- `smtp` provider, `settings` may contain `headers` object. + - When using AWS SES SMTP host, you may provide a name of configuration set in + `X-SES-Configuration-Set` header. Value must be a string. + - When using Sparkpost host, you may provide value for + `X-MSYS_API` header. Value must be an object. + + For `ses` provider, `settings` may contain `message` object, where you can provide + a name of configuration set in `configuration_set_name` property. Value must be a string.
@@ -16010,7 +15977,7 @@ await client.Groups.Members.GetAsync(
-Lists the roles assigned to a group. +Lists the [roles](https://auth0.com/docs/manage-users/access-control/rbac) assigned to a group.
@@ -16075,7 +16042,7 @@ await client.Groups.Roles.ListAsync(
-Assign one or more roles to a specified group. +Assign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) to a specified group.
@@ -16140,7 +16107,7 @@ await client.Groups.Roles.CreateAsync(
-Unassign one or more roles from a specified group. +Unassign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) from a specified group.
diff --git a/src/Auth0.ManagementApi/Branding/Phone/Providers/IProvidersClient.cs b/src/Auth0.ManagementApi/Branding/Phone/Providers/IProvidersClient.cs index b0e895aaf..777a68fcd 100644 --- a/src/Auth0.ManagementApi/Branding/Phone/Providers/IProvidersClient.cs +++ b/src/Auth0.ManagementApi/Branding/Phone/Providers/IProvidersClient.cs @@ -5,7 +5,7 @@ namespace Auth0.ManagementApi.Branding.Phone; public partial interface IProvidersClient { /// - /// Retrieve a list of phone providers details set for a Tenant. A list of fields to include or exclude may also be specified. + /// Retrieve a list of [phone providers](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details set for a Tenant. A list of fields to include or exclude may also be specified. /// WithRawResponseTask ListAsync( ListBrandingPhoneProvidersRequestParameters request, @@ -14,8 +14,8 @@ WithRawResponseTask ListAsync( ); /// - /// Create a phone provider. - /// The credentials object requires different properties depending on the phone provider (which is specified using the name property). + /// Create a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers). + /// The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property). /// WithRawResponseTask CreateAsync( CreateBrandingPhoneProviderRequestContent request, @@ -24,7 +24,7 @@ WithRawResponseTask CreateAsync( ); /// - /// Retrieve phone provider details. A list of fields to include or exclude may also be specified. + /// Retrieve [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details. A list of fields to include or exclude may also be specified. /// WithRawResponseTask GetAsync( string id, @@ -42,8 +42,8 @@ Task DeleteAsync( ); /// - /// Update a phone provider. - /// The credentials object requires different properties depending on the phone provider (which is specified using the name property). + /// Update a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers). + /// The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property). /// WithRawResponseTask UpdateAsync( string id, diff --git a/src/Auth0.ManagementApi/Branding/Phone/Providers/ProvidersClient.cs b/src/Auth0.ManagementApi/Branding/Phone/Providers/ProvidersClient.cs index 02b6f0210..14398c862 100644 --- a/src/Auth0.ManagementApi/Branding/Phone/Providers/ProvidersClient.cs +++ b/src/Auth0.ManagementApi/Branding/Phone/Providers/ProvidersClient.cs @@ -476,7 +476,7 @@ private async Task> } /// - /// Retrieve a list of phone providers details set for a Tenant. A list of fields to include or exclude may also be specified. + /// Retrieve a list of [phone providers](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details set for a Tenant. A list of fields to include or exclude may also be specified. /// /// /// await client.Branding.Phone.Providers.ListAsync( @@ -495,8 +495,8 @@ public WithRawResponseTask ListAsync( } /// - /// Create a phone provider. - /// The credentials object requires different properties depending on the phone provider (which is specified using the name property). + /// Create a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers). + /// The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property). /// /// /// await client.Branding.Phone.Providers.CreateAsync( @@ -519,7 +519,7 @@ public WithRawResponseTask CreateAsy } /// - /// Retrieve phone provider details. A list of fields to include or exclude may also be specified. + /// Retrieve [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details. A list of fields to include or exclude may also be specified. /// /// /// await client.Branding.Phone.Providers.GetAsync("id"); @@ -603,8 +603,8 @@ public async Task DeleteAsync( } /// - /// Update a phone provider. - /// The credentials object requires different properties depending on the phone provider (which is specified using the name property). + /// Update a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers). + /// The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property). /// /// /// await client.Branding.Phone.Providers.UpdateAsync( diff --git a/src/Auth0.ManagementApi/Branding/Requests/UpdateBrandingRequestContent.cs b/src/Auth0.ManagementApi/Branding/Requests/UpdateBrandingRequestContent.cs index 38833c03a..621e31baa 100644 --- a/src/Auth0.ManagementApi/Branding/Requests/UpdateBrandingRequestContent.cs +++ b/src/Auth0.ManagementApi/Branding/Requests/UpdateBrandingRequestContent.cs @@ -24,10 +24,6 @@ public record UpdateBrandingRequestContent [JsonPropertyName("logo_url")] public Optional LogoUrl { get; set; } - [Nullable, Optional] - [JsonPropertyName("identifiers")] - public Optional Identifiers { get; set; } - [Nullable, Optional] [JsonPropertyName("font")] public Optional Font { get; set; } diff --git a/src/Auth0.ManagementApi/ClientGrants/Organizations/OrganizationsClient.cs b/src/Auth0.ManagementApi/ClientGrants/Organizations/OrganizationsClient.cs index 425fa52f5..c38e6c487 100644 --- a/src/Auth0.ManagementApi/ClientGrants/Organizations/OrganizationsClient.cs +++ b/src/Auth0.ManagementApi/ClientGrants/Organizations/OrganizationsClient.cs @@ -107,6 +107,8 @@ private async Task< throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Clients/ClientsClient.cs b/src/Auth0.ManagementApi/Clients/ClientsClient.cs index 92c5ad6f4..625889ec2 100644 --- a/src/Auth0.ManagementApi/Clients/ClientsClient.cs +++ b/src/Auth0.ManagementApi/Clients/ClientsClient.cs @@ -849,16 +849,14 @@ public WithRawResponseTask PreviewCimdMetada /// Idempotent registration for Client ID Metadata Document (CIMD) clients. /// Uses external_client_id as the unique identifier for upsert operations. /// - /// Create: Returns 201 when a new client is created (requires create:clients scope). - /// Update: Returns 200 when an existing client is updated (requires update:clients scope). + /// **Create:** Returns 201 when a new client is created (requires `create:clients` scope). + /// **Update:** Returns 200 when an existing client is updated (requires `update:clients` scope). /// /// This endpoint automatically: - /// - /// Fetches and validates the metadata document - /// Maps CIMD fields to Auth0 client configuration - /// Creates/rotates credentials from the JWKS - /// Enforces CIMD security policies (HTTPS-only, no shared secrets) - /// + /// - Fetches and validates the metadata document + /// - Maps CIMD fields to Auth0 client configuration + /// - Creates/rotates credentials from the JWKS + /// - Enforces CIMD security policies (HTTPS-only, no shared secrets) /// /// /// await client.Clients.RegisterCimdClientAsync( diff --git a/src/Auth0.ManagementApi/Clients/IClientsClient.cs b/src/Auth0.ManagementApi/Clients/IClientsClient.cs index 1d29160d1..4845dbe33 100644 --- a/src/Auth0.ManagementApi/Clients/IClientsClient.cs +++ b/src/Auth0.ManagementApi/Clients/IClientsClient.cs @@ -78,16 +78,14 @@ WithRawResponseTask PreviewCimdMetadataAsync /// Idempotent registration for Client ID Metadata Document (CIMD) clients. /// Uses external_client_id as the unique identifier for upsert operations. /// - /// Create: Returns 201 when a new client is created (requires create:clients scope). - /// Update: Returns 200 when an existing client is updated (requires update:clients scope). + /// **Create:** Returns 201 when a new client is created (requires `create:clients` scope). + /// **Update:** Returns 200 when an existing client is updated (requires `update:clients` scope). /// /// This endpoint automatically: - /// - /// Fetches and validates the metadata document - /// Maps CIMD fields to Auth0 client configuration - /// Creates/rotates credentials from the JWKS - /// Enforces CIMD security policies (HTTPS-only, no shared secrets) - /// + /// - Fetches and validates the metadata document + /// - Maps CIMD fields to Auth0 client configuration + /// - Creates/rotates credentials from the JWKS + /// - Enforces CIMD security policies (HTTPS-only, no shared secrets) /// WithRawResponseTask RegisterCimdClientAsync( RegisterCimdClientRequestContent request, diff --git a/src/Auth0.ManagementApi/ConnectionProfiles/ConnectionProfilesClient.cs b/src/Auth0.ManagementApi/ConnectionProfiles/ConnectionProfilesClient.cs index 131596f88..0ecb2b7b8 100644 --- a/src/Auth0.ManagementApi/ConnectionProfiles/ConnectionProfilesClient.cs +++ b/src/Auth0.ManagementApi/ConnectionProfiles/ConnectionProfilesClient.cs @@ -548,6 +548,8 @@ private async Task> Upda throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Connections/Users/UsersClient.cs b/src/Auth0.ManagementApi/Connections/Users/UsersClient.cs index 8c8dd642e..84a8140ae 100644 --- a/src/Auth0.ManagementApi/Connections/Users/UsersClient.cs +++ b/src/Auth0.ManagementApi/Connections/Users/UsersClient.cs @@ -73,6 +73,8 @@ public async Task DeleteByEmailAsync( throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs b/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs index b2ded3280..414befe7e 100644 --- a/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs +++ b/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs @@ -882,6 +882,8 @@ public async Task DeleteAsync( throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 409: + throw new ConflictError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Emails/Provider/IProviderClient.cs b/src/Auth0.ManagementApi/Emails/Provider/IProviderClient.cs index 37177f58c..4d2fef675 100644 --- a/src/Auth0.ManagementApi/Emails/Provider/IProviderClient.cs +++ b/src/Auth0.ManagementApi/Emails/Provider/IProviderClient.cs @@ -5,7 +5,7 @@ namespace Auth0.ManagementApi.Emails; public partial interface IProviderClient { /// - /// Retrieve details of the email provider configuration in your tenant. A list of fields to include or exclude may also be specified. + /// Retrieve details of the [email provider configuration](https://auth0.com/docs/customize/email/smtp-email-providers) in your tenant. A list of fields to include or exclude may also be specified. /// WithRawResponseTask GetAsync( GetEmailProviderRequestParameters request, @@ -14,48 +14,31 @@ WithRawResponseTask GetAsync( ); /// - /// Create an email provider. The credentials object - /// requires different properties depending on the email provider (which is specified using the name property): - /// - /// mandrill requires api_key - /// sendgrid requires api_key - /// - /// sparkpost requires api_key. Optionally, set region to eu to use - /// the SparkPost service hosted in Western Europe; set to null to use the SparkPost service hosted in - /// North America. eu or null are the only valid values for region. - /// - /// - /// mailgun requires api_key and domain. Optionally, set region to - /// eu to use the Mailgun service hosted in Europe; set to null otherwise. eu or - /// null are the only valid values for region. - /// - /// ses requires accessKeyId, secretAccessKey, and region - /// - /// smtp requires smtp_host, smtp_port, smtp_user, and - /// smtp_pass - /// - /// - /// Depending on the type of provider it is possible to specify settings object with different configuration + /// Create an [email provider](https://auth0.com/docs/email/providers). The `credentials` object + /// requires different properties depending on the email provider (which is specified using the `name` property): + /// + /// - `mandrill` requires `api_key` + /// - `sendgrid` requires `api_key` + /// - `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + /// the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + /// North America. `eu` or `null` are the only valid values for `region`. + /// - `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + /// `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + /// `null` are the only valid values for `region`. + /// - `ses` requires `accessKeyId`, `secretAccessKey`, and `region` + /// - `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + /// `smtp_pass` + /// + /// Depending on the type of provider it is possible to specify `settings` object with different configuration /// options, which will be used when sending an email: - /// - /// - /// smtp provider, settings may contain headers object. - /// - /// - /// When using AWS SES SMTP host, you may provide a name of configuration set in - /// X-SES-Configuration-Set header. Value must be a string. - /// - /// - /// When using Sparkpost host, you may provide value for - /// X-MSYS_API header. Value must be an object. - /// - /// - /// - /// - /// for ses provider, settings may contain message object, where you can provide - /// a name of configuration set in configuration_set_name property. Value must be a string. - /// - /// + /// + /// - `smtp` provider, `settings` may contain `headers` object. + /// - When using AWS SES SMTP host, you may provide a name of configuration set in + /// `X-SES-Configuration-Set` header. Value must be a string. + /// - When using Sparkpost host, you may provide value for + /// `X-MSYS_API` header. Value must be an object. + /// - For `ses` provider, `settings` may contain `message` object, where you can provide + /// a name of configuration set in `configuration_set_name` property. Value must be a string. /// WithRawResponseTask CreateAsync( CreateEmailProviderRequestContent request, @@ -69,46 +52,32 @@ WithRawResponseTask CreateAsync( Task DeleteAsync(RequestOptions? options = null, CancellationToken cancellationToken = default); /// - /// Update an email provider. The credentials object - /// requires different properties depending on the email provider (which is specified using the name property): - /// - /// mandrill requires api_key - /// sendgrid requires api_key - /// - /// sparkpost requires api_key. Optionally, set region to eu to use - /// the SparkPost service hosted in Western Europe; set to null to use the SparkPost service hosted in - /// North America. eu or null are the only valid values for region. - /// - /// - /// mailgun requires api_key and domain. Optionally, set region to - /// eu to use the Mailgun service hosted in Europe; set to null otherwise. eu or - /// null are the only valid values for region. - /// - /// ses requires accessKeyId, secretAccessKey, and region - /// - /// smtp requires smtp_host, smtp_port, smtp_user, and - /// smtp_pass - /// - /// - /// Depending on the type of provider it is possible to specify settings object with different configuration + /// Update an [email provider](https://auth0.com/docs/email/providers). The `credentials` object + /// requires different properties depending on the email provider (which is specified using the `name` property): + /// + /// - `mandrill` requires `api_key` + /// - `sendgrid` requires `api_key` + /// - `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + /// the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + /// North America. `eu` or `null` are the only valid values for `region`. + /// - `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + /// `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + /// `null` are the only valid values for `region`. + /// - `ses` requires `accessKeyId`, `secretAccessKey`, and `region` + /// - `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + /// `smtp_pass` + /// + /// Depending on the type of provider it is possible to specify `settings` object with different configuration /// options, which will be used when sending an email: - /// - /// - /// smtp provider, settings may contain headers object. - /// - /// - /// When using AWS SES SMTP host, you may provide a name of configuration set in - /// X-SES-Configuration-Set header. Value must be a string. - /// - /// - /// When using Sparkpost host, you may provide value for - /// X-MSYS_API header. Value must be an object. - /// - /// - /// for ses provider, settings may contain message object, where you can provide - /// a name of configuration set in configuration_set_name property. Value must be a string. - /// - /// + /// + /// - `smtp` provider, `settings` may contain `headers` object. + /// - When using AWS SES SMTP host, you may provide a name of configuration set in + /// `X-SES-Configuration-Set` header. Value must be a string. + /// - When using Sparkpost host, you may provide value for + /// `X-MSYS_API` header. Value must be an object. + /// + /// For `ses` provider, `settings` may contain `message` object, where you can provide + /// a name of configuration set in `configuration_set_name` property. Value must be a string. /// WithRawResponseTask UpdateAsync( UpdateEmailProviderRequestContent request, diff --git a/src/Auth0.ManagementApi/Emails/Provider/ProviderClient.cs b/src/Auth0.ManagementApi/Emails/Provider/ProviderClient.cs index 516154f46..884b96791 100644 --- a/src/Auth0.ManagementApi/Emails/Provider/ProviderClient.cs +++ b/src/Auth0.ManagementApi/Emails/Provider/ProviderClient.cs @@ -290,7 +290,7 @@ private async Task> UpdateAs } /// - /// Retrieve details of the email provider configuration in your tenant. A list of fields to include or exclude may also be specified. + /// Retrieve details of the [email provider configuration](https://auth0.com/docs/customize/email/smtp-email-providers) in your tenant. A list of fields to include or exclude may also be specified. /// /// /// await client.Emails.Provider.GetAsync( @@ -309,48 +309,31 @@ public WithRawResponseTask GetAsync( } /// - /// Create an email provider. The credentials object - /// requires different properties depending on the email provider (which is specified using the name property): - /// - /// mandrill requires api_key - /// sendgrid requires api_key - /// - /// sparkpost requires api_key. Optionally, set region to eu to use - /// the SparkPost service hosted in Western Europe; set to null to use the SparkPost service hosted in - /// North America. eu or null are the only valid values for region. - /// - /// - /// mailgun requires api_key and domain. Optionally, set region to - /// eu to use the Mailgun service hosted in Europe; set to null otherwise. eu or - /// null are the only valid values for region. - /// - /// ses requires accessKeyId, secretAccessKey, and region - /// - /// smtp requires smtp_host, smtp_port, smtp_user, and - /// smtp_pass - /// - /// - /// Depending on the type of provider it is possible to specify settings object with different configuration + /// Create an [email provider](https://auth0.com/docs/email/providers). The `credentials` object + /// requires different properties depending on the email provider (which is specified using the `name` property): + /// + /// - `mandrill` requires `api_key` + /// - `sendgrid` requires `api_key` + /// - `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + /// the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + /// North America. `eu` or `null` are the only valid values for `region`. + /// - `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + /// `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + /// `null` are the only valid values for `region`. + /// - `ses` requires `accessKeyId`, `secretAccessKey`, and `region` + /// - `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + /// `smtp_pass` + /// + /// Depending on the type of provider it is possible to specify `settings` object with different configuration /// options, which will be used when sending an email: - /// - /// - /// smtp provider, settings may contain headers object. - /// - /// - /// When using AWS SES SMTP host, you may provide a name of configuration set in - /// X-SES-Configuration-Set header. Value must be a string. - /// - /// - /// When using Sparkpost host, you may provide value for - /// X-MSYS_API header. Value must be an object. - /// - /// - /// - /// - /// for ses provider, settings may contain message object, where you can provide - /// a name of configuration set in configuration_set_name property. Value must be a string. - /// - /// + /// + /// - `smtp` provider, `settings` may contain `headers` object. + /// - When using AWS SES SMTP host, you may provide a name of configuration set in + /// `X-SES-Configuration-Set` header. Value must be a string. + /// - When using Sparkpost host, you may provide value for + /// `X-MSYS_API` header. Value must be an object. + /// - For `ses` provider, `settings` may contain `message` object, where you can provide + /// a name of configuration set in `configuration_set_name` property. Value must be a string. /// /// /// await client.Emails.Provider.CreateAsync( @@ -438,46 +421,32 @@ public async Task DeleteAsync( } /// - /// Update an email provider. The credentials object - /// requires different properties depending on the email provider (which is specified using the name property): - /// - /// mandrill requires api_key - /// sendgrid requires api_key - /// - /// sparkpost requires api_key. Optionally, set region to eu to use - /// the SparkPost service hosted in Western Europe; set to null to use the SparkPost service hosted in - /// North America. eu or null are the only valid values for region. - /// - /// - /// mailgun requires api_key and domain. Optionally, set region to - /// eu to use the Mailgun service hosted in Europe; set to null otherwise. eu or - /// null are the only valid values for region. - /// - /// ses requires accessKeyId, secretAccessKey, and region - /// - /// smtp requires smtp_host, smtp_port, smtp_user, and - /// smtp_pass - /// - /// - /// Depending on the type of provider it is possible to specify settings object with different configuration + /// Update an [email provider](https://auth0.com/docs/email/providers). The `credentials` object + /// requires different properties depending on the email provider (which is specified using the `name` property): + /// + /// - `mandrill` requires `api_key` + /// - `sendgrid` requires `api_key` + /// - `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + /// the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + /// North America. `eu` or `null` are the only valid values for `region`. + /// - `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + /// `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + /// `null` are the only valid values for `region`. + /// - `ses` requires `accessKeyId`, `secretAccessKey`, and `region` + /// - `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + /// `smtp_pass` + /// + /// Depending on the type of provider it is possible to specify `settings` object with different configuration /// options, which will be used when sending an email: - /// - /// - /// smtp provider, settings may contain headers object. - /// - /// - /// When using AWS SES SMTP host, you may provide a name of configuration set in - /// X-SES-Configuration-Set header. Value must be a string. - /// - /// - /// When using Sparkpost host, you may provide value for - /// X-MSYS_API header. Value must be an object. - /// - /// - /// for ses provider, settings may contain message object, where you can provide - /// a name of configuration set in configuration_set_name property. Value must be a string. - /// - /// + /// + /// - `smtp` provider, `settings` may contain `headers` object. + /// - When using AWS SES SMTP host, you may provide a name of configuration set in + /// `X-SES-Configuration-Set` header. Value must be a string. + /// - When using Sparkpost host, you may provide value for + /// `X-MSYS_API` header. Value must be an object. + /// + /// For `ses` provider, `settings` may contain `message` object, where you can provide + /// a name of configuration set in `configuration_set_name` property. Value must be a string. /// /// /// await client.Emails.Provider.UpdateAsync(new UpdateEmailProviderRequestContent()); diff --git a/src/Auth0.ManagementApi/Groups/Members/MembersClient.cs b/src/Auth0.ManagementApi/Groups/Members/MembersClient.cs index 2775d87c7..7c79a969a 100644 --- a/src/Auth0.ManagementApi/Groups/Members/MembersClient.cs +++ b/src/Auth0.ManagementApi/Groups/Members/MembersClient.cs @@ -112,6 +112,8 @@ private async Task> GetInternalA throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Groups/Roles/IRolesClient.cs b/src/Auth0.ManagementApi/Groups/Roles/IRolesClient.cs index 69213ca71..7dacec278 100644 --- a/src/Auth0.ManagementApi/Groups/Roles/IRolesClient.cs +++ b/src/Auth0.ManagementApi/Groups/Roles/IRolesClient.cs @@ -6,7 +6,7 @@ namespace Auth0.ManagementApi.Groups; public partial interface IRolesClient { /// - /// Lists the roles assigned to a group. + /// Lists the [roles](https://auth0.com/docs/manage-users/access-control/rbac) assigned to a group. /// Task> ListAsync( string id, @@ -16,7 +16,7 @@ Task> ListAsync( ); /// - /// Assign one or more roles to a specified group. + /// Assign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) to a specified group. /// Task CreateAsync( string id, @@ -26,7 +26,7 @@ Task CreateAsync( ); /// - /// Unassign one or more roles from a specified group. + /// Unassign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) from a specified group. /// Task DeleteAsync( string id, diff --git a/src/Auth0.ManagementApi/Groups/Roles/RolesClient.cs b/src/Auth0.ManagementApi/Groups/Roles/RolesClient.cs index e221ad051..254de171f 100644 --- a/src/Auth0.ManagementApi/Groups/Roles/RolesClient.cs +++ b/src/Auth0.ManagementApi/Groups/Roles/RolesClient.cs @@ -14,7 +14,7 @@ internal RolesClient(RawClient client) } /// - /// Lists the roles assigned to a group. + /// Lists the [roles](https://auth0.com/docs/manage-users/access-control/rbac) assigned to a group. /// private WithRawResponseTask ListInternalAsync( string id, @@ -107,6 +107,8 @@ private async Task> ListInternalA throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } @@ -124,7 +126,7 @@ private async Task> ListInternalA } /// - /// Lists the roles assigned to a group. + /// Lists the [roles](https://auth0.com/docs/manage-users/access-control/rbac) assigned to a group. /// /// /// await client.Groups.Roles.ListAsync( @@ -169,7 +171,7 @@ await ListInternalAsync(id, request, options, cancellationToken) } /// - /// Assign one or more roles to a specified group. + /// Assign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) to a specified group. /// /// /// await client.Groups.Roles.CreateAsync( @@ -244,7 +246,7 @@ public async Task CreateAsync( } /// - /// Unassign one or more roles from a specified group. + /// Unassign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) from a specified group. /// /// /// await client.Groups.Roles.DeleteAsync( @@ -300,6 +302,8 @@ public async Task DeleteAsync( throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Organizations/Groups/GroupsClient.cs b/src/Auth0.ManagementApi/Organizations/Groups/GroupsClient.cs index 54712abb8..8f2d7916c 100644 --- a/src/Auth0.ManagementApi/Organizations/Groups/GroupsClient.cs +++ b/src/Auth0.ManagementApi/Organizations/Groups/GroupsClient.cs @@ -112,6 +112,8 @@ private async Task< throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Organizations/Groups/Roles/RolesClient.cs b/src/Auth0.ManagementApi/Organizations/Groups/Roles/RolesClient.cs index 23348c294..3696ca37c 100644 --- a/src/Auth0.ManagementApi/Organizations/Groups/Roles/RolesClient.cs +++ b/src/Auth0.ManagementApi/Organizations/Groups/Roles/RolesClient.cs @@ -112,6 +112,8 @@ private async Task< throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } @@ -241,6 +243,8 @@ public async Task CreateAsync( throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 409: throw new ConflictError(JsonUtils.Deserialize(responseBody)); case 429: @@ -319,6 +323,8 @@ public async Task DeleteAsync( throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/EffectiveRolesClient.cs b/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/EffectiveRolesClient.cs index 3dff3af77..e271cc863 100644 --- a/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/EffectiveRolesClient.cs +++ b/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/EffectiveRolesClient.cs @@ -119,6 +119,8 @@ private async Task< throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/Sources/Groups/GroupsClient.cs b/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/Sources/Groups/GroupsClient.cs index 697955113..699743e35 100644 --- a/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/Sources/Groups/GroupsClient.cs +++ b/src/Auth0.ManagementApi/Organizations/Members/EffectiveRoles/Sources/Groups/GroupsClient.cs @@ -114,6 +114,8 @@ private async Task< throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/RefreshTokens/IRefreshTokensClient.cs b/src/Auth0.ManagementApi/RefreshTokens/IRefreshTokensClient.cs index fa0f11e99..bc6ceb294 100644 --- a/src/Auth0.ManagementApi/RefreshTokens/IRefreshTokensClient.cs +++ b/src/Auth0.ManagementApi/RefreshTokens/IRefreshTokensClient.cs @@ -14,7 +14,7 @@ Task> ListAsync( ); /// - /// Revoke refresh tokens in bulk by ID list, user, user+client, or client. + /// Revoke refresh tokens in bulk by ID list, user, user+client, or user+client+audience. /// Task RevokeAsync( RevokeRefreshTokensRequestContent request, diff --git a/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs b/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs index 9cf952251..105549286 100644 --- a/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs +++ b/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs @@ -362,7 +362,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), } /// - /// Revoke refresh tokens in bulk by ID list, user, user+client, or client. + /// Revoke refresh tokens in bulk by ID list, user, user+client, or user+client+audience. /// /// /// await client.RefreshTokens.RevokeAsync(new RevokeRefreshTokensRequestContent()); diff --git a/src/Auth0.ManagementApi/RefreshTokens/Requests/RevokeRefreshTokensRequestContent.cs b/src/Auth0.ManagementApi/RefreshTokens/Requests/RevokeRefreshTokensRequestContent.cs index e07f41661..e291c0c6d 100644 --- a/src/Auth0.ManagementApi/RefreshTokens/Requests/RevokeRefreshTokensRequestContent.cs +++ b/src/Auth0.ManagementApi/RefreshTokens/Requests/RevokeRefreshTokensRequestContent.cs @@ -21,7 +21,7 @@ public record RevokeRefreshTokensRequestContent public string? UserId { get; set; } /// - /// Revoke all refresh tokens for this client. + /// Revoke refresh tokens for this client. Must be paired with `user_id`; optionally narrowed further with `audience`. /// [Optional] [JsonPropertyName("client_id")] diff --git a/src/Auth0.ManagementApi/Roles/Groups/GroupsClient.cs b/src/Auth0.ManagementApi/Roles/Groups/GroupsClient.cs index 001279432..8d0ff73bf 100644 --- a/src/Auth0.ManagementApi/Roles/Groups/GroupsClient.cs +++ b/src/Auth0.ManagementApi/Roles/Groups/GroupsClient.cs @@ -107,6 +107,8 @@ private async Task> GetInternalAs throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } @@ -297,6 +299,8 @@ public async Task DeleteAsync( throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Tenants/Settings/Requests/UpdateTenantSettingsRequestContent.cs b/src/Auth0.ManagementApi/Tenants/Settings/Requests/UpdateTenantSettingsRequestContent.cs index f3f8b297b..c1128018c 100644 --- a/src/Auth0.ManagementApi/Tenants/Settings/Requests/UpdateTenantSettingsRequestContent.cs +++ b/src/Auth0.ManagementApi/Tenants/Settings/Requests/UpdateTenantSettingsRequestContent.cs @@ -90,6 +90,13 @@ public record UpdateTenantSettingsRequestContent [JsonPropertyName("session_lifetime")] public int? SessionLifetime { get; set; } + /// + /// Number of minutes a session will stay valid. Cannot be specified together with `session_lifetime`. + /// + [Optional] + [JsonPropertyName("session_lifetime_in_minutes")] + public int? SessionLifetimeInMinutes { get; set; } + /// /// Number of hours for which a session can be inactive before the user must log in again. /// @@ -97,6 +104,13 @@ public record UpdateTenantSettingsRequestContent [JsonPropertyName("idle_session_lifetime")] public int? IdleSessionLifetime { get; set; } + /// + /// Number of minutes a session can be inactive before the user must log in again. Cannot be specified together with `idle_session_lifetime`. + /// + [Optional] + [JsonPropertyName("idle_session_lifetime_in_minutes")] + public int? IdleSessionLifetimeInMinutes { get; set; } + /// /// Number of hours an ephemeral (non-persistent) session will stay valid. /// @@ -111,6 +125,20 @@ public record UpdateTenantSettingsRequestContent [JsonPropertyName("idle_ephemeral_session_lifetime")] public int? IdleEphemeralSessionLifetime { get; set; } + /// + /// Number of minutes an ephemeral (non-persistent) session will stay valid. Cannot be specified together with `ephemeral_session_lifetime`. + /// + [Optional] + [JsonPropertyName("ephemeral_session_lifetime_in_minutes")] + public int? EphemeralSessionLifetimeInMinutes { get; set; } + + /// + /// Number of minutes an ephemeral (non-persistent) session can be inactive before the user must log in again. Cannot be specified together with `idle_ephemeral_session_lifetime`. + /// + [Optional] + [JsonPropertyName("idle_ephemeral_session_lifetime_in_minutes")] + public int? IdleEphemeralSessionLifetimeInMinutes { get; set; } + /// /// Selected sandbox version for the extensibility environment /// @@ -139,6 +167,10 @@ public record UpdateTenantSettingsRequestContent [JsonPropertyName("enabled_locales")] public IEnumerable? EnabledLocales { get; set; } + [Nullable, Optional] + [JsonPropertyName("security_headers")] + public Optional SecurityHeaders { get; set; } + [Nullable, Optional] [JsonPropertyName("session_cookie")] public Optional SessionCookie { get; set; } @@ -224,6 +256,13 @@ public record UpdateTenantSettingsRequestContent [JsonPropertyName("phone_consolidated_experience")] public bool? PhoneConsolidatedExperience { get; set; } + /// + /// Whether session metadata is included in specific tenant logs (slo, oidc_backchannel_logout_failed, oidc_backchannel_logout_succeeded). + /// + [Optional] + [JsonPropertyName("include_session_metadata_in_tenant_logs")] + public bool? IncludeSessionMetadataInTenantLogs { get; set; } + [Optional] [JsonPropertyName("dynamic_client_registration_security_mode")] public TenantSettingsDynamicClientRegistrationSecurityMode? DynamicClientRegistrationSecurityMode { get; set; } diff --git a/src/Auth0.ManagementApi/TokenExchangeProfiles/TokenExchangeProfilesClient.cs b/src/Auth0.ManagementApi/TokenExchangeProfiles/TokenExchangeProfilesClient.cs index b8580b1e4..686a38c7d 100644 --- a/src/Auth0.ManagementApi/TokenExchangeProfiles/TokenExchangeProfilesClient.cs +++ b/src/Auth0.ManagementApi/TokenExchangeProfiles/TokenExchangeProfilesClient.cs @@ -532,6 +532,8 @@ public async Task UpdateAsync( throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); case 404: throw new NotFoundError(JsonUtils.Deserialize(responseBody)); + case 409: + throw new ConflictError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Types/AculContextEnum.cs b/src/Auth0.ManagementApi/Types/AculContextEnum.cs index 00211afd5..a33f37350 100644 --- a/src/Auth0.ManagementApi/Types/AculContextEnum.cs +++ b/src/Auth0.ManagementApi/Types/AculContextEnum.cs @@ -56,6 +56,8 @@ namespace Auth0.ManagementApi; Values.TransactionCustomDomainDomain ); + public static readonly AculContextEnum Experiment = new(Values.Experiment); + public AculContextEnum(string value) { Value = value; @@ -188,5 +190,7 @@ public static class Values public const string UserOrganizations = "user.organizations"; public const string TransactionCustomDomainDomain = "transaction.custom_domain.domain"; + + public const string Experiment = "experiment"; } } diff --git a/src/Auth0.ManagementApi/Types/BrandingPhoneMaskingEnum.cs b/src/Auth0.ManagementApi/Types/BrandingPhoneMaskingEnum.cs deleted file mode 100644 index 8e92392e1..000000000 --- a/src/Auth0.ManagementApi/Types/BrandingPhoneMaskingEnum.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Auth0.ManagementApi.Core; -using global::System.Text.Json; -using global::System.Text.Json.Serialization; - -namespace Auth0.ManagementApi; - -[JsonConverter(typeof(BrandingPhoneMaskingEnum.BrandingPhoneMaskingEnumSerializer))] -[Serializable] -public readonly record struct BrandingPhoneMaskingEnum : IStringEnum -{ - public static readonly BrandingPhoneMaskingEnum ShowAll = new(Values.ShowAll); - - public static readonly BrandingPhoneMaskingEnum HideCountryCode = new(Values.HideCountryCode); - - public static readonly BrandingPhoneMaskingEnum MaskDigits = new(Values.MaskDigits); - - public BrandingPhoneMaskingEnum(string value) - { - Value = value; - } - - /// - /// The string value of the enum. - /// - public string Value { get; } - - /// - /// Create a string enum with the given value. - /// - public static BrandingPhoneMaskingEnum FromCustom(string value) - { - return new BrandingPhoneMaskingEnum(value); - } - - public bool Equals(string? other) - { - return Value.Equals(other); - } - - /// - /// Returns the string value of the enum. - /// - public override string ToString() - { - return Value; - } - - public static bool operator ==(BrandingPhoneMaskingEnum value1, string value2) => - value1.Value.Equals(value2); - - public static bool operator !=(BrandingPhoneMaskingEnum value1, string value2) => - !value1.Value.Equals(value2); - - public static explicit operator string(BrandingPhoneMaskingEnum value) => value.Value; - - public static explicit operator BrandingPhoneMaskingEnum(string value) => new(value); - - internal class BrandingPhoneMaskingEnumSerializer : JsonConverter - { - public override BrandingPhoneMaskingEnum Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new global::System.Exception( - "The JSON value could not be read as a string." - ); - return new BrandingPhoneMaskingEnum(stringValue); - } - - public override void Write( - Utf8JsonWriter writer, - BrandingPhoneMaskingEnum value, - JsonSerializerOptions options - ) - { - writer.WriteStringValue(value.Value); - } - - public override BrandingPhoneMaskingEnum ReadAsPropertyName( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new global::System.Exception( - "The JSON property name could not be read as a string." - ); - return new BrandingPhoneMaskingEnum(stringValue); - } - - public override void WriteAsPropertyName( - Utf8JsonWriter writer, - BrandingPhoneMaskingEnum value, - JsonSerializerOptions options - ) - { - writer.WritePropertyName(value.Value); - } - } - - /// - /// Constant strings for enum values - /// - [Serializable] - public static class Values - { - public const string ShowAll = "show_all"; - - public const string HideCountryCode = "hide_country_code"; - - public const string MaskDigits = "mask_digits"; - } -} diff --git a/src/Auth0.ManagementApi/Types/ClientMyOrganizationPatchConfiguration.cs b/src/Auth0.ManagementApi/Types/ClientMyOrganizationPatchConfiguration.cs index 0fe202c9c..21c3f9ba4 100644 --- a/src/Auth0.ManagementApi/Types/ClientMyOrganizationPatchConfiguration.cs +++ b/src/Auth0.ManagementApi/Types/ClientMyOrganizationPatchConfiguration.cs @@ -38,6 +38,13 @@ public record ClientMyOrganizationPatchConfiguration : IJsonOnDeserialized [JsonPropertyName("connection_deletion_behavior")] public required ClientMyOrganizationDeletionBehaviorEnum ConnectionDeletionBehavior { get; set; } + /// + /// The client ID this client uses while creating invitations through My Organization API. + /// + [Optional] + [JsonPropertyName("invitation_landing_client_id")] + public string? InvitationLandingClientId { get; set; } + [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/Auth0.ManagementApi/Types/ClientMyOrganizationPostConfiguration.cs b/src/Auth0.ManagementApi/Types/ClientMyOrganizationPostConfiguration.cs index 3ca8791be..8e398f584 100644 --- a/src/Auth0.ManagementApi/Types/ClientMyOrganizationPostConfiguration.cs +++ b/src/Auth0.ManagementApi/Types/ClientMyOrganizationPostConfiguration.cs @@ -38,6 +38,13 @@ public record ClientMyOrganizationPostConfiguration : IJsonOnDeserialized [JsonPropertyName("connection_deletion_behavior")] public required ClientMyOrganizationDeletionBehaviorEnum ConnectionDeletionBehavior { get; set; } + /// + /// The client ID this client uses while creating invitations through My Organization API. + /// + [Optional] + [JsonPropertyName("invitation_landing_client_id")] + public string? InvitationLandingClientId { get; set; } + [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/Auth0.ManagementApi/Types/ClientMyOrganizationResponseConfiguration.cs b/src/Auth0.ManagementApi/Types/ClientMyOrganizationResponseConfiguration.cs index f5e11d88b..bcd8791b3 100644 --- a/src/Auth0.ManagementApi/Types/ClientMyOrganizationResponseConfiguration.cs +++ b/src/Auth0.ManagementApi/Types/ClientMyOrganizationResponseConfiguration.cs @@ -38,6 +38,13 @@ public record ClientMyOrganizationResponseConfiguration : IJsonOnDeserialized [JsonPropertyName("connection_deletion_behavior")] public required ClientMyOrganizationDeletionBehaviorEnum ConnectionDeletionBehavior { get; set; } + /// + /// The client ID this client uses while creating invitations through My Organization API. + /// + [Optional] + [JsonPropertyName("invitation_landing_client_id")] + public string? InvitationLandingClientId { get; set; } + [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs b/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs index 402acac25..f05eb5e42 100644 --- a/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs +++ b/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs @@ -44,6 +44,10 @@ public record ConnectionOptionsCommonOidc : IJsonOnDeserialized, IJsonOnSerializ [JsonPropertyName("icon_url")] public string? IconUrl { get; set; } + [Optional] + [JsonPropertyName("id_token_session_expiry_supported")] + public bool? IdTokenSessionExpirySupported { get; set; } + [Nullable, Optional] [JsonPropertyName("id_token_signed_response_algs")] public Optional?> IdTokenSignedResponseAlgs { get; set; } diff --git a/src/Auth0.ManagementApi/Types/ConnectionOptionsOidc.cs b/src/Auth0.ManagementApi/Types/ConnectionOptionsOidc.cs index 231eea555..7169fc3c1 100644 --- a/src/Auth0.ManagementApi/Types/ConnectionOptionsOidc.cs +++ b/src/Auth0.ManagementApi/Types/ConnectionOptionsOidc.cs @@ -56,6 +56,10 @@ public record ConnectionOptionsOidc : IJsonOnDeserialized, IJsonOnSerializing [JsonPropertyName("icon_url")] public string? IconUrl { get; set; } + [Optional] + [JsonPropertyName("id_token_session_expiry_supported")] + public bool? IdTokenSessionExpirySupported { get; set; } + [Nullable, Optional] [JsonPropertyName("id_token_signed_response_algs")] public Optional?> IdTokenSignedResponseAlgs { get; set; } diff --git a/src/Auth0.ManagementApi/Types/ConnectionOptionsOkta.cs b/src/Auth0.ManagementApi/Types/ConnectionOptionsOkta.cs index 4b63accc6..3205e8092 100644 --- a/src/Auth0.ManagementApi/Types/ConnectionOptionsOkta.cs +++ b/src/Auth0.ManagementApi/Types/ConnectionOptionsOkta.cs @@ -60,6 +60,10 @@ public record ConnectionOptionsOkta : IJsonOnDeserialized, IJsonOnSerializing [JsonPropertyName("icon_url")] public string? IconUrl { get; set; } + [Optional] + [JsonPropertyName("id_token_session_expiry_supported")] + public bool? IdTokenSessionExpirySupported { get; set; } + [Nullable, Optional] [JsonPropertyName("id_token_signed_response_algs")] public Optional?> IdTokenSignedResponseAlgs { get; set; } diff --git a/src/Auth0.ManagementApi/Types/ConnectionPropertiesOptions.cs b/src/Auth0.ManagementApi/Types/ConnectionPropertiesOptions.cs index 1a2fb7eb1..ce530079b 100644 --- a/src/Auth0.ManagementApi/Types/ConnectionPropertiesOptions.cs +++ b/src/Auth0.ManagementApi/Types/ConnectionPropertiesOptions.cs @@ -182,6 +182,10 @@ public Optional -/// Identifier input display settings. +/// Content Security Policy configuration with multi-policy support. /// [Serializable] -public record UpdateBrandingIdentifiers : IJsonOnDeserialized +public record ContentSecurityPolicyConfig : IJsonOnDeserialized { [JsonExtensionData] private readonly IDictionary _extensionData = new Dictionary(); - [Optional] - [JsonPropertyName("login_display")] - public UpdateBrandingLoginDisplayEnum? LoginDisplay { get; set; } - /// - /// Whether OTP autocomplete (autocomplete="one-time-code") is enabled. + /// Whether CSP is enabled. /// [Optional] - [JsonPropertyName("otp_autocomplete")] - public bool? OtpAutocomplete { get; set; } + [JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + [Optional] + [JsonPropertyName("policies")] + public IEnumerable? Policies { get; set; } [Nullable, Optional] - [JsonPropertyName("phone_display")] - public Optional PhoneDisplay { get; set; } + [JsonPropertyName("reporting_infrastructure")] + public Optional ReportingInfrastructure { get; set; } [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/Auth0.ManagementApi/Types/CreatePhoneTemplateResponseContent.cs b/src/Auth0.ManagementApi/Types/CreatePhoneTemplateResponseContent.cs index 192cd142c..0b306d66e 100644 --- a/src/Auth0.ManagementApi/Types/CreatePhoneTemplateResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/CreatePhoneTemplateResponseContent.cs @@ -11,8 +11,9 @@ public record CreatePhoneTemplateResponseContent : IJsonOnDeserialized private readonly IDictionary _extensionData = new Dictionary(); + [Optional] [JsonPropertyName("id")] - public required string Id { get; set; } + public string? Id { get; set; } [Optional] [JsonPropertyName("channel")] diff --git a/src/Auth0.ManagementApi/Types/UpdateBrandingLoginDisplayEnum.cs b/src/Auth0.ManagementApi/Types/CspFlag.cs similarity index 54% rename from src/Auth0.ManagementApi/Types/UpdateBrandingLoginDisplayEnum.cs rename to src/Auth0.ManagementApi/Types/CspFlag.cs index 10e8acc33..a9b1c2853 100644 --- a/src/Auth0.ManagementApi/Types/UpdateBrandingLoginDisplayEnum.cs +++ b/src/Auth0.ManagementApi/Types/CspFlag.cs @@ -4,15 +4,15 @@ namespace Auth0.ManagementApi; -[JsonConverter(typeof(UpdateBrandingLoginDisplayEnum.UpdateBrandingLoginDisplayEnumSerializer))] +[JsonConverter(typeof(CspFlag.CspFlagSerializer))] [Serializable] -public readonly record struct UpdateBrandingLoginDisplayEnum : IStringEnum +public readonly record struct CspFlag : IStringEnum { - public static readonly UpdateBrandingLoginDisplayEnum Unified = new(Values.Unified); + public static readonly CspFlag UpgradeInsecureRequests = new(Values.UpgradeInsecureRequests); - public static readonly UpdateBrandingLoginDisplayEnum Separate = new(Values.Separate); + public static readonly CspFlag BlockAllMixedContent = new(Values.BlockAllMixedContent); - public UpdateBrandingLoginDisplayEnum(string value) + public CspFlag(string value) { Value = value; } @@ -25,9 +25,9 @@ public UpdateBrandingLoginDisplayEnum(string value) /// /// Create a string enum with the given value. /// - public static UpdateBrandingLoginDisplayEnum FromCustom(string value) + public static CspFlag FromCustom(string value) { - return new UpdateBrandingLoginDisplayEnum(value); + return new CspFlag(value); } public bool Equals(string? other) @@ -43,20 +43,17 @@ public override string ToString() return Value; } - public static bool operator ==(UpdateBrandingLoginDisplayEnum value1, string value2) => - value1.Value.Equals(value2); + public static bool operator ==(CspFlag value1, string value2) => value1.Value.Equals(value2); - public static bool operator !=(UpdateBrandingLoginDisplayEnum value1, string value2) => - !value1.Value.Equals(value2); + public static bool operator !=(CspFlag value1, string value2) => !value1.Value.Equals(value2); - public static explicit operator string(UpdateBrandingLoginDisplayEnum value) => value.Value; + public static explicit operator string(CspFlag value) => value.Value; - public static explicit operator UpdateBrandingLoginDisplayEnum(string value) => new(value); + public static explicit operator CspFlag(string value) => new(value); - internal class UpdateBrandingLoginDisplayEnumSerializer - : JsonConverter + internal class CspFlagSerializer : JsonConverter { - public override UpdateBrandingLoginDisplayEnum Read( + public override CspFlag Read( ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options @@ -67,19 +64,19 @@ JsonSerializerOptions options ?? throw new global::System.Exception( "The JSON value could not be read as a string." ); - return new UpdateBrandingLoginDisplayEnum(stringValue); + return new CspFlag(stringValue); } public override void Write( Utf8JsonWriter writer, - UpdateBrandingLoginDisplayEnum value, + CspFlag value, JsonSerializerOptions options ) { writer.WriteStringValue(value.Value); } - public override UpdateBrandingLoginDisplayEnum ReadAsPropertyName( + public override CspFlag ReadAsPropertyName( ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options @@ -90,12 +87,12 @@ JsonSerializerOptions options ?? throw new global::System.Exception( "The JSON property name could not be read as a string." ); - return new UpdateBrandingLoginDisplayEnum(stringValue); + return new CspFlag(stringValue); } public override void WriteAsPropertyName( Utf8JsonWriter writer, - UpdateBrandingLoginDisplayEnum value, + CspFlag value, JsonSerializerOptions options ) { @@ -109,8 +106,8 @@ JsonSerializerOptions options [Serializable] public static class Values { - public const string Unified = "unified"; + public const string UpgradeInsecureRequests = "upgrade-insecure-requests"; - public const string Separate = "separate"; + public const string BlockAllMixedContent = "block-all-mixed-content"; } } diff --git a/src/Auth0.ManagementApi/Types/CspPolicy.cs b/src/Auth0.ManagementApi/Types/CspPolicy.cs new file mode 100644 index 000000000..d6c95f04e --- /dev/null +++ b/src/Auth0.ManagementApi/Types/CspPolicy.cs @@ -0,0 +1,44 @@ +using Auth0.ManagementApi.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Auth0.ManagementApi; + +/// +/// A single CSP policy with mode, directives, flags, and optional reporting. +/// +[Serializable] +public record CspPolicy : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [Optional] + [JsonPropertyName("mode")] + public CspPolicyMode? Mode { get; set; } + + [Optional] + [JsonPropertyName("directives")] + public Dictionary>? Directives { get; set; } + + [Optional] + [JsonPropertyName("flags")] + public IEnumerable? Flags { get; set; } + + [Nullable, Optional] + [JsonPropertyName("reporting")] + public Optional Reporting { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/Auth0.ManagementApi/Types/BrandingLoginDisplayEnum.cs b/src/Auth0.ManagementApi/Types/CspPolicyMode.cs similarity index 59% rename from src/Auth0.ManagementApi/Types/BrandingLoginDisplayEnum.cs rename to src/Auth0.ManagementApi/Types/CspPolicyMode.cs index afc740928..ec2602578 100644 --- a/src/Auth0.ManagementApi/Types/BrandingLoginDisplayEnum.cs +++ b/src/Auth0.ManagementApi/Types/CspPolicyMode.cs @@ -4,15 +4,15 @@ namespace Auth0.ManagementApi; -[JsonConverter(typeof(BrandingLoginDisplayEnum.BrandingLoginDisplayEnumSerializer))] +[JsonConverter(typeof(CspPolicyMode.CspPolicyModeSerializer))] [Serializable] -public readonly record struct BrandingLoginDisplayEnum : IStringEnum +public readonly record struct CspPolicyMode : IStringEnum { - public static readonly BrandingLoginDisplayEnum Unified = new(Values.Unified); + public static readonly CspPolicyMode Enforcing = new(Values.Enforcing); - public static readonly BrandingLoginDisplayEnum Separate = new(Values.Separate); + public static readonly CspPolicyMode Reporting = new(Values.Reporting); - public BrandingLoginDisplayEnum(string value) + public CspPolicyMode(string value) { Value = value; } @@ -25,9 +25,9 @@ public BrandingLoginDisplayEnum(string value) /// /// Create a string enum with the given value. /// - public static BrandingLoginDisplayEnum FromCustom(string value) + public static CspPolicyMode FromCustom(string value) { - return new BrandingLoginDisplayEnum(value); + return new CspPolicyMode(value); } public bool Equals(string? other) @@ -43,19 +43,19 @@ public override string ToString() return Value; } - public static bool operator ==(BrandingLoginDisplayEnum value1, string value2) => + public static bool operator ==(CspPolicyMode value1, string value2) => value1.Value.Equals(value2); - public static bool operator !=(BrandingLoginDisplayEnum value1, string value2) => + public static bool operator !=(CspPolicyMode value1, string value2) => !value1.Value.Equals(value2); - public static explicit operator string(BrandingLoginDisplayEnum value) => value.Value; + public static explicit operator string(CspPolicyMode value) => value.Value; - public static explicit operator BrandingLoginDisplayEnum(string value) => new(value); + public static explicit operator CspPolicyMode(string value) => new(value); - internal class BrandingLoginDisplayEnumSerializer : JsonConverter + internal class CspPolicyModeSerializer : JsonConverter { - public override BrandingLoginDisplayEnum Read( + public override CspPolicyMode Read( ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options @@ -66,19 +66,19 @@ JsonSerializerOptions options ?? throw new global::System.Exception( "The JSON value could not be read as a string." ); - return new BrandingLoginDisplayEnum(stringValue); + return new CspPolicyMode(stringValue); } public override void Write( Utf8JsonWriter writer, - BrandingLoginDisplayEnum value, + CspPolicyMode value, JsonSerializerOptions options ) { writer.WriteStringValue(value.Value); } - public override BrandingLoginDisplayEnum ReadAsPropertyName( + public override CspPolicyMode ReadAsPropertyName( ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options @@ -89,12 +89,12 @@ JsonSerializerOptions options ?? throw new global::System.Exception( "The JSON property name could not be read as a string." ); - return new BrandingLoginDisplayEnum(stringValue); + return new CspPolicyMode(stringValue); } public override void WriteAsPropertyName( Utf8JsonWriter writer, - BrandingLoginDisplayEnum value, + CspPolicyMode value, JsonSerializerOptions options ) { @@ -108,8 +108,8 @@ JsonSerializerOptions options [Serializable] public static class Values { - public const string Unified = "unified"; + public const string Enforcing = "enforcing"; - public const string Separate = "separate"; + public const string Reporting = "reporting"; } } diff --git a/src/Auth0.ManagementApi/Types/CspPolicyReporting.cs b/src/Auth0.ManagementApi/Types/CspPolicyReporting.cs new file mode 100644 index 000000000..3e79bef9d --- /dev/null +++ b/src/Auth0.ManagementApi/Types/CspPolicyReporting.cs @@ -0,0 +1,42 @@ +using Auth0.ManagementApi.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Auth0.ManagementApi; + +/// +/// Per-policy reporting configuration. +/// +[Serializable] +public record CspPolicyReporting : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + /// + /// HTTPS endpoint for CSP violation reports. + /// + [Optional] + [JsonPropertyName("report_uri")] + public string? ReportUri { get; set; } + + /// + /// Report-To group name for modern reporting. + /// + [Optional] + [JsonPropertyName("report_to_group")] + public string? ReportToGroup { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/Auth0.ManagementApi/Types/BrandingIdentifiers.cs b/src/Auth0.ManagementApi/Types/CspReportTo.cs similarity index 62% rename from src/Auth0.ManagementApi/Types/BrandingIdentifiers.cs rename to src/Auth0.ManagementApi/Types/CspReportTo.cs index 5648c8ad4..046c6b896 100644 --- a/src/Auth0.ManagementApi/Types/BrandingIdentifiers.cs +++ b/src/Auth0.ManagementApi/Types/CspReportTo.cs @@ -5,29 +5,32 @@ namespace Auth0.ManagementApi; /// -/// Identifier input display settings. +/// Report-To header configuration. /// [Serializable] -public record BrandingIdentifiers : IJsonOnDeserialized +public record CspReportTo : IJsonOnDeserialized { [JsonExtensionData] private readonly IDictionary _extensionData = new Dictionary(); + /// + /// Reporting group identifier. + /// [Optional] - [JsonPropertyName("login_display")] - public BrandingLoginDisplayEnum? LoginDisplay { get; set; } + [JsonPropertyName("group")] + public string? Group { get; set; } /// - /// Whether OTP autocomplete (autocomplete="one-time-code") is enabled. + /// Maximum age in seconds for the Report-To header. /// [Optional] - [JsonPropertyName("otp_autocomplete")] - public bool? OtpAutocomplete { get; set; } + [JsonPropertyName("max_age")] + public int? MaxAge { get; set; } [Optional] - [JsonPropertyName("phone_display")] - public BrandingPhoneDisplay? PhoneDisplay { get; set; } + [JsonPropertyName("endpoints")] + public IEnumerable? Endpoints { get; set; } [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/Auth0.ManagementApi/Types/BrandingPhoneDisplay.cs b/src/Auth0.ManagementApi/Types/CspReportToEndpoint.cs similarity index 69% rename from src/Auth0.ManagementApi/Types/BrandingPhoneDisplay.cs rename to src/Auth0.ManagementApi/Types/CspReportToEndpoint.cs index b4023a048..31944115f 100644 --- a/src/Auth0.ManagementApi/Types/BrandingPhoneDisplay.cs +++ b/src/Auth0.ManagementApi/Types/CspReportToEndpoint.cs @@ -5,22 +5,21 @@ namespace Auth0.ManagementApi; /// -/// Phone number display settings. +/// A single reporting endpoint. /// [Serializable] -public record BrandingPhoneDisplay : IJsonOnDeserialized +public record CspReportToEndpoint : IJsonOnDeserialized { [JsonExtensionData] private readonly IDictionary _extensionData = new Dictionary(); + /// + /// HTTPS URL for the reporting endpoint. + /// [Optional] - [JsonPropertyName("masking")] - public BrandingPhoneMaskingEnum? Masking { get; set; } - - [Optional] - [JsonPropertyName("formatting")] - public BrandingPhoneFormattingEnum? Formatting { get; set; } + [JsonPropertyName("url")] + public string? Url { get; set; } [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneDisplay.cs b/src/Auth0.ManagementApi/Types/CspReportingInfrastructure.cs similarity index 65% rename from src/Auth0.ManagementApi/Types/UpdateBrandingPhoneDisplay.cs rename to src/Auth0.ManagementApi/Types/CspReportingInfrastructure.cs index eed4adccf..52ada2715 100644 --- a/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneDisplay.cs +++ b/src/Auth0.ManagementApi/Types/CspReportingInfrastructure.cs @@ -5,20 +5,22 @@ namespace Auth0.ManagementApi; /// -/// Phone number display settings. +/// Global reporting infrastructure configuration. /// [Serializable] -public record UpdateBrandingPhoneDisplay : IJsonOnDeserialized +public record CspReportingInfrastructure : IJsonOnDeserialized { [JsonExtensionData] private readonly IDictionary _extensionData = new Dictionary(); - [JsonPropertyName("masking")] - public required UpdateBrandingPhoneMaskingEnum Masking { get; set; } + [Nullable, Optional] + [JsonPropertyName("report_to")] + public Optional ReportTo { get; set; } - [JsonPropertyName("formatting")] - public required UpdateBrandingPhoneFormattingEnum Formatting { get; set; } + [Optional] + [JsonPropertyName("reporting_endpoints")] + public Dictionary? ReportingEndpoints { get; set; } [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/Auth0.ManagementApi/Types/GetBrandingResponseContent.cs b/src/Auth0.ManagementApi/Types/GetBrandingResponseContent.cs index b29fc61ee..1108edba4 100644 --- a/src/Auth0.ManagementApi/Types/GetBrandingResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/GetBrandingResponseContent.cs @@ -28,10 +28,6 @@ public record GetBrandingResponseContent : IJsonOnDeserialized, IJsonOnSerializi [JsonPropertyName("logo_url")] public string? LogoUrl { get; set; } - [Optional] - [JsonPropertyName("identifiers")] - public BrandingIdentifiers? Identifiers { get; set; } - [Optional] [JsonPropertyName("font")] public BrandingFont? Font { get; set; } diff --git a/src/Auth0.ManagementApi/Types/GetPhoneTemplateResponseContent.cs b/src/Auth0.ManagementApi/Types/GetPhoneTemplateResponseContent.cs index f6b8b5c01..7f54422a9 100644 --- a/src/Auth0.ManagementApi/Types/GetPhoneTemplateResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/GetPhoneTemplateResponseContent.cs @@ -11,8 +11,9 @@ public record GetPhoneTemplateResponseContent : IJsonOnDeserialized private readonly IDictionary _extensionData = new Dictionary(); + [Optional] [JsonPropertyName("id")] - public required string Id { get; set; } + public string? Id { get; set; } [Optional] [JsonPropertyName("channel")] diff --git a/src/Auth0.ManagementApi/Types/GetTenantSettingsResponseContent.cs b/src/Auth0.ManagementApi/Types/GetTenantSettingsResponseContent.cs index d9e862dfc..3f9b0b461 100644 --- a/src/Auth0.ManagementApi/Types/GetTenantSettingsResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/GetTenantSettingsResponseContent.cs @@ -147,6 +147,10 @@ public record GetTenantSettingsResponseContent : IJsonOnDeserialized [JsonPropertyName("enabled_locales")] public IEnumerable? EnabledLocales { get; set; } + [Nullable, Optional] + [JsonPropertyName("security_headers")] + public Optional SecurityHeaders { get; set; } + [Nullable, Optional] [JsonPropertyName("session_cookie")] public Optional SessionCookie { get; set; } @@ -232,6 +236,13 @@ public record GetTenantSettingsResponseContent : IJsonOnDeserialized [JsonPropertyName("enable_ai_guide")] public bool? EnableAiGuide { get; set; } + /// + /// Whether session metadata is included in specific tenant logs (slo, oidc_backchannel_logout_failed, oidc_backchannel_logout_succeeded). + /// + [Optional] + [JsonPropertyName("include_session_metadata_in_tenant_logs")] + public bool? IncludeSessionMetadataInTenantLogs { get; set; } + [Optional] [JsonPropertyName("dynamic_client_registration_security_mode")] public TenantSettingsDynamicClientRegistrationSecurityMode? DynamicClientRegistrationSecurityMode { get; set; } diff --git a/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentAction.cs b/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentAction.cs index 5c87c855d..5f0f006b8 100644 --- a/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentAction.cs +++ b/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentAction.cs @@ -18,7 +18,7 @@ public record PatchRateLimitPolicyConfigurationRequestContentAction : IJsonOnDes public required PatchRateLimitPolicyConfigurationRequestContentActionAction Action { get; set; } /// - /// The maximum number of requests allowed in a single refresh window. + /// The maximum number of requests allowed per second. /// [JsonPropertyName("limit")] public required int Limit { get; set; } diff --git a/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentOne.cs b/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentOne.cs index a1a426955..a2125ad7e 100644 --- a/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentOne.cs +++ b/src/Auth0.ManagementApi/Types/PatchRateLimitPolicyConfigurationRequestContentOne.cs @@ -18,7 +18,7 @@ public record PatchRateLimitPolicyConfigurationRequestContentOne : IJsonOnDeseri public required PatchRateLimitPolicyConfigurationRequestContentOneAction Action { get; set; } /// - /// The maximum number of requests allowed in a single refresh window. + /// The maximum number of requests allowed per second. /// [JsonPropertyName("limit")] public required int Limit { get; set; } diff --git a/src/Auth0.ManagementApi/Types/PhoneTemplate.cs b/src/Auth0.ManagementApi/Types/PhoneTemplate.cs index 3fb9a76d3..cdff27ad1 100644 --- a/src/Auth0.ManagementApi/Types/PhoneTemplate.cs +++ b/src/Auth0.ManagementApi/Types/PhoneTemplate.cs @@ -11,8 +11,9 @@ public record PhoneTemplate : IJsonOnDeserialized private readonly IDictionary _extensionData = new Dictionary(); + [Optional] [JsonPropertyName("id")] - public required string Id { get; set; } + public string? Id { get; set; } [Optional] [JsonPropertyName("channel")] diff --git a/src/Auth0.ManagementApi/Types/PromptGroupNameEnum.cs b/src/Auth0.ManagementApi/Types/PromptGroupNameEnum.cs index 273891746..32a7998cc 100644 --- a/src/Auth0.ManagementApi/Types/PromptGroupNameEnum.cs +++ b/src/Auth0.ManagementApi/Types/PromptGroupNameEnum.cs @@ -90,6 +90,8 @@ namespace Auth0.ManagementApi; public static readonly PromptGroupNameEnum AsyncApprovalFlow = new(Values.AsyncApprovalFlow); + public static readonly PromptGroupNameEnum Confirmation = new(Values.Confirmation); + public PromptGroupNameEnum(string value) { Value = value; @@ -257,5 +259,7 @@ public static class Values public const string BruteForceProtection = "brute-force-protection"; public const string AsyncApprovalFlow = "async-approval-flow"; + + public const string Confirmation = "confirmation"; } } diff --git a/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationAction.cs b/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationAction.cs index 416eafe51..598e8daa3 100644 --- a/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationAction.cs +++ b/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationAction.cs @@ -18,7 +18,7 @@ public record RateLimitPolicyConfigurationAction : IJsonOnDeserialized public required RateLimitPolicyConfigurationActionAction Action { get; set; } /// - /// The maximum number of requests allowed in a single refresh window. + /// The maximum number of requests allowed per second. /// [JsonPropertyName("limit")] public required int Limit { get; set; } diff --git a/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationOne.cs b/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationOne.cs index 225195698..1e15aafd0 100644 --- a/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationOne.cs +++ b/src/Auth0.ManagementApi/Types/RateLimitPolicyConfigurationOne.cs @@ -18,7 +18,7 @@ public record RateLimitPolicyConfigurationOne : IJsonOnDeserialized public required RateLimitPolicyConfigurationOneAction Action { get; set; } /// - /// The maximum number of requests allowed in a single refresh window. + /// The maximum number of requests allowed per second. /// [JsonPropertyName("limit")] public required int Limit { get; set; } diff --git a/src/Auth0.ManagementApi/Types/ResetPhoneTemplateResponseContent.cs b/src/Auth0.ManagementApi/Types/ResetPhoneTemplateResponseContent.cs index 0370053e2..6a6005abf 100644 --- a/src/Auth0.ManagementApi/Types/ResetPhoneTemplateResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/ResetPhoneTemplateResponseContent.cs @@ -11,8 +11,9 @@ public record ResetPhoneTemplateResponseContent : IJsonOnDeserialized private readonly IDictionary _extensionData = new Dictionary(); + [Optional] [JsonPropertyName("id")] - public required string Id { get; set; } + public string? Id { get; set; } [Optional] [JsonPropertyName("channel")] diff --git a/src/Auth0.ManagementApi/Types/ScreenGroupNameEnum.cs b/src/Auth0.ManagementApi/Types/ScreenGroupNameEnum.cs index 4005af028..f00bfc81e 100644 --- a/src/Auth0.ManagementApi/Types/ScreenGroupNameEnum.cs +++ b/src/Auth0.ManagementApi/Types/ScreenGroupNameEnum.cs @@ -280,6 +280,8 @@ namespace Auth0.ManagementApi; Values.AsyncApprovalDenied ); + public static readonly ScreenGroupNameEnum Confirmation = new(Values.Confirmation); + public static readonly ScreenGroupNameEnum AsyncApprovalWrongUser = new( Values.AsyncApprovalWrongUser ); @@ -563,6 +565,8 @@ public static class Values public const string AsyncApprovalDenied = "async-approval-denied"; + public const string Confirmation = "confirmation"; + public const string AsyncApprovalWrongUser = "async-approval-wrong-user"; } } diff --git a/src/Auth0.ManagementApi/Types/TenantSettingsNullableSecurityHeaders.cs b/src/Auth0.ManagementApi/Types/TenantSettingsNullableSecurityHeaders.cs new file mode 100644 index 000000000..26bb5788f --- /dev/null +++ b/src/Auth0.ManagementApi/Types/TenantSettingsNullableSecurityHeaders.cs @@ -0,0 +1,36 @@ +using Auth0.ManagementApi.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Auth0.ManagementApi; + +/// +/// Security headers configuration for tenant responses. +/// +[Serializable] +public record TenantSettingsNullableSecurityHeaders : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [Nullable, Optional] + [JsonPropertyName("content_security_policy")] + public Optional ContentSecurityPolicy { get; set; } + + [Nullable, Optional] + [JsonPropertyName("x_xss_protection")] + public Optional XXssProtection { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneFormattingEnum.cs b/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneFormattingEnum.cs deleted file mode 100644 index f16760372..000000000 --- a/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneFormattingEnum.cs +++ /dev/null @@ -1,120 +0,0 @@ -using Auth0.ManagementApi.Core; -using global::System.Text.Json; -using global::System.Text.Json.Serialization; - -namespace Auth0.ManagementApi; - -[JsonConverter( - typeof(UpdateBrandingPhoneFormattingEnum.UpdateBrandingPhoneFormattingEnumSerializer) -)] -[Serializable] -public readonly record struct UpdateBrandingPhoneFormattingEnum : IStringEnum -{ - public static readonly UpdateBrandingPhoneFormattingEnum Regional = new(Values.Regional); - - public static readonly UpdateBrandingPhoneFormattingEnum International = new( - Values.International - ); - - public UpdateBrandingPhoneFormattingEnum(string value) - { - Value = value; - } - - /// - /// The string value of the enum. - /// - public string Value { get; } - - /// - /// Create a string enum with the given value. - /// - public static UpdateBrandingPhoneFormattingEnum FromCustom(string value) - { - return new UpdateBrandingPhoneFormattingEnum(value); - } - - public bool Equals(string? other) - { - return Value.Equals(other); - } - - /// - /// Returns the string value of the enum. - /// - public override string ToString() - { - return Value; - } - - public static bool operator ==(UpdateBrandingPhoneFormattingEnum value1, string value2) => - value1.Value.Equals(value2); - - public static bool operator !=(UpdateBrandingPhoneFormattingEnum value1, string value2) => - !value1.Value.Equals(value2); - - public static explicit operator string(UpdateBrandingPhoneFormattingEnum value) => value.Value; - - public static explicit operator UpdateBrandingPhoneFormattingEnum(string value) => new(value); - - internal class UpdateBrandingPhoneFormattingEnumSerializer - : JsonConverter - { - public override UpdateBrandingPhoneFormattingEnum Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new global::System.Exception( - "The JSON value could not be read as a string." - ); - return new UpdateBrandingPhoneFormattingEnum(stringValue); - } - - public override void Write( - Utf8JsonWriter writer, - UpdateBrandingPhoneFormattingEnum value, - JsonSerializerOptions options - ) - { - writer.WriteStringValue(value.Value); - } - - public override UpdateBrandingPhoneFormattingEnum ReadAsPropertyName( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new global::System.Exception( - "The JSON property name could not be read as a string." - ); - return new UpdateBrandingPhoneFormattingEnum(stringValue); - } - - public override void WriteAsPropertyName( - Utf8JsonWriter writer, - UpdateBrandingPhoneFormattingEnum value, - JsonSerializerOptions options - ) - { - writer.WritePropertyName(value.Value); - } - } - - /// - /// Constant strings for enum values - /// - [Serializable] - public static class Values - { - public const string Regional = "regional"; - - public const string International = "international"; - } -} diff --git a/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneMaskingEnum.cs b/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneMaskingEnum.cs deleted file mode 100644 index 4f378bb83..000000000 --- a/src/Auth0.ManagementApi/Types/UpdateBrandingPhoneMaskingEnum.cs +++ /dev/null @@ -1,122 +0,0 @@ -using Auth0.ManagementApi.Core; -using global::System.Text.Json; -using global::System.Text.Json.Serialization; - -namespace Auth0.ManagementApi; - -[JsonConverter(typeof(UpdateBrandingPhoneMaskingEnum.UpdateBrandingPhoneMaskingEnumSerializer))] -[Serializable] -public readonly record struct UpdateBrandingPhoneMaskingEnum : IStringEnum -{ - public static readonly UpdateBrandingPhoneMaskingEnum ShowAll = new(Values.ShowAll); - - public static readonly UpdateBrandingPhoneMaskingEnum HideCountryCode = new( - Values.HideCountryCode - ); - - public static readonly UpdateBrandingPhoneMaskingEnum MaskDigits = new(Values.MaskDigits); - - public UpdateBrandingPhoneMaskingEnum(string value) - { - Value = value; - } - - /// - /// The string value of the enum. - /// - public string Value { get; } - - /// - /// Create a string enum with the given value. - /// - public static UpdateBrandingPhoneMaskingEnum FromCustom(string value) - { - return new UpdateBrandingPhoneMaskingEnum(value); - } - - public bool Equals(string? other) - { - return Value.Equals(other); - } - - /// - /// Returns the string value of the enum. - /// - public override string ToString() - { - return Value; - } - - public static bool operator ==(UpdateBrandingPhoneMaskingEnum value1, string value2) => - value1.Value.Equals(value2); - - public static bool operator !=(UpdateBrandingPhoneMaskingEnum value1, string value2) => - !value1.Value.Equals(value2); - - public static explicit operator string(UpdateBrandingPhoneMaskingEnum value) => value.Value; - - public static explicit operator UpdateBrandingPhoneMaskingEnum(string value) => new(value); - - internal class UpdateBrandingPhoneMaskingEnumSerializer - : JsonConverter - { - public override UpdateBrandingPhoneMaskingEnum Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new global::System.Exception( - "The JSON value could not be read as a string." - ); - return new UpdateBrandingPhoneMaskingEnum(stringValue); - } - - public override void Write( - Utf8JsonWriter writer, - UpdateBrandingPhoneMaskingEnum value, - JsonSerializerOptions options - ) - { - writer.WriteStringValue(value.Value); - } - - public override UpdateBrandingPhoneMaskingEnum ReadAsPropertyName( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new global::System.Exception( - "The JSON property name could not be read as a string." - ); - return new UpdateBrandingPhoneMaskingEnum(stringValue); - } - - public override void WriteAsPropertyName( - Utf8JsonWriter writer, - UpdateBrandingPhoneMaskingEnum value, - JsonSerializerOptions options - ) - { - writer.WritePropertyName(value.Value); - } - } - - /// - /// Constant strings for enum values - /// - [Serializable] - public static class Values - { - public const string ShowAll = "show_all"; - - public const string HideCountryCode = "hide_country_code"; - - public const string MaskDigits = "mask_digits"; - } -} diff --git a/src/Auth0.ManagementApi/Types/UpdateBrandingResponseContent.cs b/src/Auth0.ManagementApi/Types/UpdateBrandingResponseContent.cs index 9aaa3b31c..8ff3f4563 100644 --- a/src/Auth0.ManagementApi/Types/UpdateBrandingResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/UpdateBrandingResponseContent.cs @@ -28,10 +28,6 @@ public record UpdateBrandingResponseContent : IJsonOnDeserialized, IJsonOnSerial [JsonPropertyName("logo_url")] public string? LogoUrl { get; set; } - [Optional] - [JsonPropertyName("identifiers")] - public BrandingIdentifiers? Identifiers { get; set; } - [Optional] [JsonPropertyName("font")] public BrandingFont? Font { get; set; } diff --git a/src/Auth0.ManagementApi/Types/UpdateConnectionOptions.cs b/src/Auth0.ManagementApi/Types/UpdateConnectionOptions.cs index a3cc83310..68338c4f2 100644 --- a/src/Auth0.ManagementApi/Types/UpdateConnectionOptions.cs +++ b/src/Auth0.ManagementApi/Types/UpdateConnectionOptions.cs @@ -182,6 +182,10 @@ public Optional _extensionData = new Dictionary(); + [Optional] [JsonPropertyName("id")] - public required string Id { get; set; } + public string? Id { get; set; } [Optional] [JsonPropertyName("channel")] diff --git a/src/Auth0.ManagementApi/Types/UpdateTenantSettingsResponseContent.cs b/src/Auth0.ManagementApi/Types/UpdateTenantSettingsResponseContent.cs index 85af7aa5a..471032634 100644 --- a/src/Auth0.ManagementApi/Types/UpdateTenantSettingsResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/UpdateTenantSettingsResponseContent.cs @@ -147,6 +147,10 @@ public record UpdateTenantSettingsResponseContent : IJsonOnDeserialized [JsonPropertyName("enabled_locales")] public IEnumerable? EnabledLocales { get; set; } + [Nullable, Optional] + [JsonPropertyName("security_headers")] + public Optional SecurityHeaders { get; set; } + [Nullable, Optional] [JsonPropertyName("session_cookie")] public Optional SessionCookie { get; set; } @@ -232,6 +236,13 @@ public record UpdateTenantSettingsResponseContent : IJsonOnDeserialized [JsonPropertyName("enable_ai_guide")] public bool? EnableAiGuide { get; set; } + /// + /// Whether session metadata is included in specific tenant logs (slo, oidc_backchannel_logout_failed, oidc_backchannel_logout_succeeded). + /// + [Optional] + [JsonPropertyName("include_session_metadata_in_tenant_logs")] + public bool? IncludeSessionMetadataInTenantLogs { get; set; } + [Optional] [JsonPropertyName("dynamic_client_registration_security_mode")] public TenantSettingsDynamicClientRegistrationSecurityMode? DynamicClientRegistrationSecurityMode { get; set; } diff --git a/src/Auth0.ManagementApi/Types/XssProtectionConfig.cs b/src/Auth0.ManagementApi/Types/XssProtectionConfig.cs new file mode 100644 index 000000000..18315b2c9 --- /dev/null +++ b/src/Auth0.ManagementApi/Types/XssProtectionConfig.cs @@ -0,0 +1,46 @@ +using Auth0.ManagementApi.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Auth0.ManagementApi; + +/// +/// X-XSS-Protection header configuration (deprecated header, use CSP instead). +/// +[Serializable] +public record XssProtectionConfig : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + /// + /// Whether X-XSS-Protection header is enabled. + /// + [Optional] + [JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + [Optional] + [JsonPropertyName("mode")] + public XssProtectionMode? Mode { get; set; } + + /// + /// HTTPS endpoint for X-XSS-Protection violation reports. + /// + [Optional] + [JsonPropertyName("report_uri")] + public string? ReportUri { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/Auth0.ManagementApi/Types/BrandingPhoneFormattingEnum.cs b/src/Auth0.ManagementApi/Types/XssProtectionMode.cs similarity index 57% rename from src/Auth0.ManagementApi/Types/BrandingPhoneFormattingEnum.cs rename to src/Auth0.ManagementApi/Types/XssProtectionMode.cs index 2b5bd2af7..11ab8dff5 100644 --- a/src/Auth0.ManagementApi/Types/BrandingPhoneFormattingEnum.cs +++ b/src/Auth0.ManagementApi/Types/XssProtectionMode.cs @@ -4,15 +4,13 @@ namespace Auth0.ManagementApi; -[JsonConverter(typeof(BrandingPhoneFormattingEnum.BrandingPhoneFormattingEnumSerializer))] +[JsonConverter(typeof(XssProtectionMode.XssProtectionModeSerializer))] [Serializable] -public readonly record struct BrandingPhoneFormattingEnum : IStringEnum +public readonly record struct XssProtectionMode : IStringEnum { - public static readonly BrandingPhoneFormattingEnum Regional = new(Values.Regional); + public static readonly XssProtectionMode Block = new(Values.Block); - public static readonly BrandingPhoneFormattingEnum International = new(Values.International); - - public BrandingPhoneFormattingEnum(string value) + public XssProtectionMode(string value) { Value = value; } @@ -25,9 +23,9 @@ public BrandingPhoneFormattingEnum(string value) /// /// Create a string enum with the given value. /// - public static BrandingPhoneFormattingEnum FromCustom(string value) + public static XssProtectionMode FromCustom(string value) { - return new BrandingPhoneFormattingEnum(value); + return new XssProtectionMode(value); } public bool Equals(string? other) @@ -43,20 +41,19 @@ public override string ToString() return Value; } - public static bool operator ==(BrandingPhoneFormattingEnum value1, string value2) => + public static bool operator ==(XssProtectionMode value1, string value2) => value1.Value.Equals(value2); - public static bool operator !=(BrandingPhoneFormattingEnum value1, string value2) => + public static bool operator !=(XssProtectionMode value1, string value2) => !value1.Value.Equals(value2); - public static explicit operator string(BrandingPhoneFormattingEnum value) => value.Value; + public static explicit operator string(XssProtectionMode value) => value.Value; - public static explicit operator BrandingPhoneFormattingEnum(string value) => new(value); + public static explicit operator XssProtectionMode(string value) => new(value); - internal class BrandingPhoneFormattingEnumSerializer - : JsonConverter + internal class XssProtectionModeSerializer : JsonConverter { - public override BrandingPhoneFormattingEnum Read( + public override XssProtectionMode Read( ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options @@ -67,19 +64,19 @@ JsonSerializerOptions options ?? throw new global::System.Exception( "The JSON value could not be read as a string." ); - return new BrandingPhoneFormattingEnum(stringValue); + return new XssProtectionMode(stringValue); } public override void Write( Utf8JsonWriter writer, - BrandingPhoneFormattingEnum value, + XssProtectionMode value, JsonSerializerOptions options ) { writer.WriteStringValue(value.Value); } - public override BrandingPhoneFormattingEnum ReadAsPropertyName( + public override XssProtectionMode ReadAsPropertyName( ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options @@ -90,12 +87,12 @@ JsonSerializerOptions options ?? throw new global::System.Exception( "The JSON property name could not be read as a string." ); - return new BrandingPhoneFormattingEnum(stringValue); + return new XssProtectionMode(stringValue); } public override void WriteAsPropertyName( Utf8JsonWriter writer, - BrandingPhoneFormattingEnum value, + XssProtectionMode value, JsonSerializerOptions options ) { @@ -109,8 +106,6 @@ JsonSerializerOptions options [Serializable] public static class Values { - public const string Regional = "regional"; - - public const string International = "international"; + public const string Block = "block"; } } diff --git a/src/Auth0.ManagementApi/Users/EffectiveRoles/EffectiveRolesClient.cs b/src/Auth0.ManagementApi/Users/EffectiveRoles/EffectiveRolesClient.cs index 14c0e1731..e46c60ced 100644 --- a/src/Auth0.ManagementApi/Users/EffectiveRoles/EffectiveRolesClient.cs +++ b/src/Auth0.ManagementApi/Users/EffectiveRoles/EffectiveRolesClient.cs @@ -112,6 +112,8 @@ private async Task< throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Users/EffectiveRoles/Sources/Groups/GroupsClient.cs b/src/Auth0.ManagementApi/Users/EffectiveRoles/Sources/Groups/GroupsClient.cs index ccb6d3f7e..f629d3e40 100644 --- a/src/Auth0.ManagementApi/Users/EffectiveRoles/Sources/Groups/GroupsClient.cs +++ b/src/Auth0.ManagementApi/Users/EffectiveRoles/Sources/Groups/GroupsClient.cs @@ -110,6 +110,8 @@ private async Task< throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/src/Auth0.ManagementApi/Users/Groups/GroupsClient.cs b/src/Auth0.ManagementApi/Users/Groups/GroupsClient.cs index 63fdb8908..0b0227e7a 100644 --- a/src/Auth0.ManagementApi/Users/Groups/GroupsClient.cs +++ b/src/Auth0.ManagementApi/Users/Groups/GroupsClient.cs @@ -112,6 +112,8 @@ private async Task> GetIn throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: throw new ForbiddenError(JsonUtils.Deserialize(responseBody)); + case 404: + throw new NotFoundError(JsonUtils.Deserialize(responseBody)); case 429: throw new TooManyRequestsError(JsonUtils.Deserialize(responseBody)); } diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/GetTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/GetTest.cs index 4619c5dff..69a48cd91 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/GetTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/GetTest.cs @@ -19,14 +19,6 @@ public async Task MockServerTest() }, "favicon_url": "favicon_url", "logo_url": "logo_url", - "identifiers": { - "login_display": "unified", - "otp_autocomplete": true, - "phone_display": { - "masking": "show_all", - "formatting": "regional" - } - }, "font": { "url": "url" } diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/UpdateTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/UpdateTest.cs index 86c91355e..6c4d833d4 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/UpdateTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Branding/UpdateTest.cs @@ -24,14 +24,6 @@ public async Task MockServerTest() }, "favicon_url": "favicon_url", "logo_url": "logo_url", - "identifiers": { - "login_display": "unified", - "otp_autocomplete": true, - "phone_display": { - "masking": "show_all", - "formatting": "regional" - } - }, "font": { "url": "url" } diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/CreateTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/CreateTest.cs index 1deceeb94..c077bdf3b 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/CreateTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/CreateTest.cs @@ -373,7 +373,8 @@ public async Task MockServerTest() "allowed_strategies": [ "pingfederate" ], - "connection_deletion_behavior": "allow" + "connection_deletion_behavior": "allow", + "invitation_landing_client_id": "invitation_landing_client_id" }, "third_party_security_mode": "strict", "redirection_policy": "allow_always", diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/GetTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/GetTest.cs index 2e4772fde..1c937565b 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/GetTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/GetTest.cs @@ -367,7 +367,8 @@ public async Task MockServerTest() "allowed_strategies": [ "pingfederate" ], - "connection_deletion_behavior": "allow" + "connection_deletion_behavior": "allow", + "invitation_landing_client_id": "invitation_landing_client_id" }, "third_party_security_mode": "strict", "redirection_policy": "allow_always", diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/RotateSecretTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/RotateSecretTest.cs index ef5b95d8f..0b78a7d38 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/RotateSecretTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/RotateSecretTest.cs @@ -366,7 +366,8 @@ public async Task MockServerTest() "allowed_strategies": [ "pingfederate" ], - "connection_deletion_behavior": "allow" + "connection_deletion_behavior": "allow", + "invitation_landing_client_id": "invitation_landing_client_id" }, "third_party_security_mode": "strict", "redirection_policy": "allow_always", diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/UpdateTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/UpdateTest.cs index 41afb43b5..c09cd63bd 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/UpdateTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/UpdateTest.cs @@ -371,7 +371,8 @@ public async Task MockServerTest() "allowed_strategies": [ "pingfederate" ], - "connection_deletion_behavior": "allow" + "connection_deletion_behavior": "allow", + "invitation_landing_client_id": "invitation_landing_client_id" }, "third_party_security_mode": "strict", "redirection_policy": "allow_always", diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/GetTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/GetTest.cs index e785ae59b..22d402cae 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/GetTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/GetTest.cs @@ -92,6 +92,19 @@ public async Task MockServerTest() "enabled_locales": [ "am" ], + "security_headers": { + "content_security_policy": { + "enabled": true, + "policies": [ + {} + ] + }, + "x_xss_protection": { + "enabled": true, + "mode": "block", + "report_uri": "report_uri" + } + }, "session_cookie": { "mode": "persistent" }, @@ -116,6 +129,7 @@ public async Task MockServerTest() "client_id_metadata_document_supported": true, "phone_consolidated_experience": true, "enable_ai_guide": true, + "include_session_metadata_in_tenant_logs": true, "dynamic_client_registration_security_mode": "strict", "country_codes": { "list": [ diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/UpdateTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/UpdateTest.cs index fa38ed8a8..5c27eba7d 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/UpdateTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Tenants/Settings/UpdateTest.cs @@ -96,6 +96,19 @@ public async Task MockServerTest() "enabled_locales": [ "am" ], + "security_headers": { + "content_security_policy": { + "enabled": true, + "policies": [ + {} + ] + }, + "x_xss_protection": { + "enabled": true, + "mode": "block", + "report_uri": "report_uri" + } + }, "session_cookie": { "mode": "persistent" }, @@ -120,6 +133,7 @@ public async Task MockServerTest() "client_id_metadata_document_supported": true, "phone_consolidated_experience": true, "enable_ai_guide": true, + "include_session_metadata_in_tenant_logs": true, "dynamic_client_registration_security_mode": "strict", "country_codes": { "list": [