diff --git a/.fern/replay.lock b/.fern/replay.lock index a702092e5..b2daa0ee6 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -6,5 +6,219 @@ generations: timestamp: 2026-05-12T04:47:13.201Z cli_version: unknown generator_versions: {} -current_generation: 409821046d64fe47802d1e9df109b372de1d998f -patches: [] + - commit_sha: 10833198f7f22dc8865d845f315b3f437907409f + tree_hash: df936340ef63377188bc24b5814c66a2d409ef82 + timestamp: 2026-05-21T10:33:44.550Z + cli_version: unknown + generator_versions: + fernapi/fern-csharp-sdk: 2.66.5 +current_generation: 10833198f7f22dc8865d845f315b3f437907409f +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: 10833198f7f22dc8865d845f315b3f437907409f + files: + - tests/Auth0.ManagementApi.Test/Unit/Extensions/UserDateSchemaExtensionsTest.cs + patch_content: | + diff --git a/tests/Auth0.ManagementApi.Test/Unit/Extensions/UserDateSchemaExtensionsTest.cs b/tests/Auth0.ManagementApi.Test/Unit/Extensions/UserDateSchemaExtensionsTest.cs + new file mode 100644 + index 00000000..7d867ca6 + --- /dev/null + +++ b/tests/Auth0.ManagementApi.Test/Unit/Extensions/UserDateSchemaExtensionsTest.cs + @@ -0,0 +1,95 @@ + +using NUnit.Framework; + + + +namespace Auth0.ManagementApi.Test.Unit.Extensions; + + + +[TestFixture] + +public class UserDateSchemaExtensionsTest + +{ + + [Test] + + public void ToDateTime_WithValidIso8601String_ReturnsUtcDateTime() + + { + + var schema = UserDateSchema.FromString("2024-03-15T10:30:00.000Z"); + + + + var result = schema.ToDateTime(); + + + + Assert.That(result, Is.Not.Null); + + Assert.That(result!.Value, Is.EqualTo(new DateTime(2024, 3, 15, 10, 30, 0, DateTimeKind.Utc))); + + Assert.That(result.Value.Kind, Is.EqualTo(DateTimeKind.Utc)); + + } + + + + [Test] + + public void ToDateTime_WithNull_ReturnsNull() + + { + + UserDateSchema? schema = null; + + + + var result = schema.ToDateTime(); + + + + Assert.That(result, Is.Null); + + } + + + + [Test] + + public void ToDateTime_WithMapType_ReturnsNull() + + { + + var schema = UserDateSchema.FromMapOfStringToUnknown(new Dictionary + + { + + { "some_key", "some_value" } + + }); + + + + var result = schema.ToDateTime(); + + + + Assert.That(result, Is.Null); + + } + + + + [Test] + + public void ToDateTime_WithMalformedString_ReturnsNull() + + { + + var schema = UserDateSchema.FromString("not-a-date"); + + + + var result = schema.ToDateTime(); + + + + Assert.That(result, Is.Null); + + } + + + + [Test] + + public void ToDateTime_WithOffsetString_PreservesLocalKind() + + { + + var schema = UserDateSchema.FromString("2024-06-20T14:00:00.000+05:30"); + + + + var result = schema.ToDateTime(); + + var expectedLocal = new DateTimeOffset(2024, 6, 20, 14, 0, 0, TimeSpan.FromMinutes(330)).LocalDateTime; + + + + Assert.That(result, Is.Not.Null); + + Assert.That(result!.Value, Is.EqualTo(expectedLocal)); + + Assert.That(result.Value.Kind, Is.EqualTo(DateTimeKind.Local)); + + } + + + + [Test] + + public void ToDateTime_WithDateTimeOffset_ReturnsUtcConverted() + + { + + var schema = UserDateSchema.FromString("2024-06-20T14:00:00.000+05:30"); + + + + var result = schema.ToDateTime(TimeZoneInfo.Utc); + + + + Assert.That(result, Is.Not.Null); + + Assert.That(result!.Value.Kind, Is.EqualTo(DateTimeKind.Utc)); + + Assert.That(result.Value, Is.EqualTo(new DateTime(2024, 6, 20, 8, 30, 0, DateTimeKind.Utc))); + + } + + + + [Test] + + public void ToDateTime_WithMalformedStringAndTargetTimeZone_ReturnsNull() + + { + + var schema = UserDateSchema.FromString("not-a-date"); + + + + var result = schema.ToDateTime(TimeZoneInfo.Utc); + + + + Assert.That(result, Is.Null); + + } + + + + [Test] + + public void ToDateTime_WithNullTargetTimeZone_ThrowsArgumentNullException() + + { + + var schema = UserDateSchema.FromString("2024-03-15T10:30:00.000Z"); + + + + Assert.Throws(() => schema.ToDateTime(null!)); + + } + +} + theirs_snapshot: + tests/Auth0.ManagementApi.Test/Unit/Extensions/UserDateSchemaExtensionsTest.cs: | + using NUnit.Framework; + + namespace Auth0.ManagementApi.Test.Unit.Extensions; + + [TestFixture] + public class UserDateSchemaExtensionsTest + { + [Test] + public void ToDateTime_WithValidIso8601String_ReturnsUtcDateTime() + { + var schema = UserDateSchema.FromString("2024-03-15T10:30:00.000Z"); + + var result = schema.ToDateTime(); + + Assert.That(result, Is.Not.Null); + Assert.That(result!.Value, Is.EqualTo(new DateTime(2024, 3, 15, 10, 30, 0, DateTimeKind.Utc))); + Assert.That(result.Value.Kind, Is.EqualTo(DateTimeKind.Utc)); + } + + [Test] + public void ToDateTime_WithNull_ReturnsNull() + { + UserDateSchema? schema = null; + + var result = schema.ToDateTime(); + + Assert.That(result, Is.Null); + } + + [Test] + public void ToDateTime_WithMapType_ReturnsNull() + { + var schema = UserDateSchema.FromMapOfStringToUnknown(new Dictionary + { + { "some_key", "some_value" } + }); + + var result = schema.ToDateTime(); + + Assert.That(result, Is.Null); + } + + [Test] + public void ToDateTime_WithMalformedString_ReturnsNull() + { + var schema = UserDateSchema.FromString("not-a-date"); + + var result = schema.ToDateTime(); + + Assert.That(result, Is.Null); + } + + [Test] + public void ToDateTime_WithOffsetString_PreservesLocalKind() + { + var schema = UserDateSchema.FromString("2024-06-20T14:00:00.000+05:30"); + + var result = schema.ToDateTime(); + var expectedLocal = new DateTimeOffset(2024, 6, 20, 14, 0, 0, TimeSpan.FromMinutes(330)).LocalDateTime; + + Assert.That(result, Is.Not.Null); + Assert.That(result!.Value, Is.EqualTo(expectedLocal)); + Assert.That(result.Value.Kind, Is.EqualTo(DateTimeKind.Local)); + } + + [Test] + public void ToDateTime_WithDateTimeOffset_ReturnsUtcConverted() + { + var schema = UserDateSchema.FromString("2024-06-20T14:00:00.000+05:30"); + + var result = schema.ToDateTime(TimeZoneInfo.Utc); + + Assert.That(result, Is.Not.Null); + Assert.That(result!.Value.Kind, Is.EqualTo(DateTimeKind.Utc)); + Assert.That(result.Value, Is.EqualTo(new DateTime(2024, 6, 20, 8, 30, 0, DateTimeKind.Utc))); + } + + [Test] + public void ToDateTime_WithMalformedStringAndTargetTimeZone_ReturnsNull() + { + var schema = UserDateSchema.FromString("not-a-date"); + + var result = schema.ToDateTime(TimeZoneInfo.Utc); + + Assert.That(result, Is.Null); + } + + [Test] + public void ToDateTime_WithNullTargetTimeZone_ThrowsArgumentNullException() + { + var schema = UserDateSchema.FromString("2024-03-15T10:30:00.000Z"); + + Assert.Throws(() => schema.ToDateTime(null!)); + } + } + user_owned: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..1de047696 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,119 @@ +# Contributing + +Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project. + +## Getting Started + +### Prerequisites + +- .NET SDK (version compatible with the target frameworks: net462, net8.0, netstandard2.0) + +### Installation + +Install the project dependencies: + +```bash +dotnet restore +``` + +### Building + +Build the project: + +```bash +dotnet build +``` + +### Testing + +Run the test suite: + +```bash +dotnet test +``` + +### Formatting + +Check code style: + +```bash +dotnet format --verify-no-changes +``` + +Fix code style issues: + +```bash +dotnet format +``` + +## About Generated Code + +**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated. + +### Generated Files + +The following directories contain generated code: +- `src/` - API client classes and types +- Most C# files in the project + +### How to Customize + +If you need to customize the SDK, you have two options: + +#### Option 1: Use `.fernignore` + +For custom code that should persist across SDK regenerations: + +1. Create a `.fernignore` file in the project root +2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax) +3. Add your custom code to those files + +Files listed in `.fernignore` will not be overwritten when the SDK is regenerated. + +For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code). + +#### Option 2: Contribute to the Generator + +If you want to change how code is generated for all users of this SDK: + +1. The C# SDK generator lives in the [Fern repository](https://github.com/fern-api/fern) +2. Generator code is located at `generators/csharp/` +3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md) +4. Submit a pull request with your changes to the generator + +This approach is best for: +- Bug fixes in generated code +- New features that would benefit all users +- Improvements to code generation patterns + +## Making Changes + +### Workflow + +1. Create a new branch for your changes +2. Make your modifications +3. Run tests to ensure nothing breaks: `dotnet test` +4. Run formatting: `dotnet format` +5. Build the project: `dotnet build` +6. Commit your changes with a clear commit message +7. Push your branch and create a pull request + +### Commit Messages + +Write clear, descriptive commit messages that explain what changed and why. + +### Code Style + +This project uses automated code formatting. Run `dotnet format` before committing to ensure your code meets the project's style guidelines. + +## Questions or Issues? + +If you have questions or run into issues: + +1. Check the [Fern documentation](https://buildwithfern.com) +2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues) +3. Open a new issue if your question hasn't been addressed + +## License + +By contributing to this project, you agree that your contributions will be licensed under the same license as the project. diff --git a/reference.md b/reference.md index 8106b4045..7c1909646 100644 --- a/reference.md +++ b/reference.md @@ -255,7 +255,7 @@ await client.Actions.DeleteAsync("id", new DeleteActionRequestParameters { Force
-Update an existing action. If this action is currently bound to a trigger, updating it will not affect any user flows until the action is deployed. +Update an existing action. If this action is currently bound to a trigger, updating it will **not** affect any user flows until the action is deployed.
@@ -1054,10 +1054,19 @@ await client.Clients.PreviewCimdMetadataAsync(
+Idempotent registration for Client ID Metadata Document (CIMD) clients. +Uses external_client_id as the unique identifier for upsert operations. - 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: 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)
  • +
@@ -1767,25 +1776,23 @@ await client.ConnectionProfiles.UpdateAsync("id", new UpdateConnectionProfileReq
-Retrieves detailed list of all connections that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. +Retrieves detailed list of all [connections](https://auth0.com/docs/authenticate/identity-providers) that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. This endpoint supports two types of pagination: -
    -
  • Offset pagination
  • -
  • Checkpoint pagination
  • -
+ +- Offset pagination +- Checkpoint pagination Checkpoint pagination must be used if you need to retrieve more than 1000 connections. -

Checkpoint Pagination

+**Checkpoint Pagination** To search by checkpoint, use the following parameters: -
    -
  • from: Optional id from which to start selection.
  • -
  • take: The total amount of entries to retrieve when using the from parameter. Defaults to 50.
  • -
-Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining. +- `from`: Optional id from which to start selection. +- `take`: The total amount of entries to retrieve when using the from parameter. Defaults to 50. + +**Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining.
@@ -1849,9 +1856,9 @@ await client.Connections.ListAsync(
-Creates a new connection according to the JSON object received in body. +Creates a new connection according to the JSON object received in `body`. -Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results. +**Note:** If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.
@@ -1911,7 +1918,7 @@ await client.Connections.CreateAsync(
-Retrieve details for a specified connection along with options that can be used for identity provider configuration. +Retrieve details for a specified [connection](https://auth0.com/docs/authenticate/identity-providers) along with options that can be used for identity provider configuration.
@@ -1976,9 +1983,9 @@ await client.Connections.GetAsync(
-Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. +Removes a specific [connection](https://auth0.com/docs/authenticate/identity-providers) from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. -Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name. +**Note:** If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent [create connection](https://auth0.com/docs/api/management/v2/connections/post-connections) requests, if they use an identical connection name.
@@ -2032,9 +2039,9 @@ await client.Connections.DeleteAsync("id");
-Update details for a specific connection, including option properties for identity provider configuration. +Update details for a specific [connection](https://auth0.com/docs/authenticate/identity-providers), including option properties for identity provider configuration. -Note: If you use the options parameter, the entire options object is overriden. To avoid partial data or other issues, ensure all parameters are present when using this option. +**Note**: If you use the `options` parameter, the entire `options` object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.
@@ -2096,7 +2103,7 @@ await client.Connections.UpdateAsync("id", new UpdateConnectionRequestContent())
-Retrieves the status of an ad/ldap connection referenced by its ID. 200 OK http status code response is returned when the connection is online, otherwise a 404 status code is returned along with an error message +Retrieves the status of an ad/ldap connection referenced by its `ID`. `200 OK` http status code response is returned when the connection is online, otherwise a `404` status code is returned along with an error message
@@ -2151,7 +2158,7 @@ await client.Connections.CheckStatusAsync("id");
-Retrieve details on custom domains. +Retrieve details on [custom domains](https://auth0.com/docs/custom-domains).
@@ -2223,7 +2230,6 @@ Optional attributes that can be updated: - custom_client_ip_header - tls_policy - TLS Policies: - recommended - for modern usage this includes TLS 1.2 only @@ -2496,23 +2502,31 @@ These are the attributes that can be updated: - custom_client_ip_header - tls_policy -
Updating CUSTOM_CLIENT_IP_HEADER for a custom domain
To update the custom_client_ip_header for a domain, the body to +**Updating CUSTOM_CLIENT_IP_HEADER for a custom domain** + +To update the `custom_client_ip_header` for a domain, the body to send should be: -
{ "custom_client_ip_header": "cf-connecting-ip" }
-
Updating TLS_POLICY for a custom domain
To update the tls_policy for a domain, the body to send should be: -
{ "tls_policy": "recommended" }
+```json +{ "custom_client_ip_header": "cf-connecting-ip" } +``` + +**Updating TLS_POLICY for a custom domain** +To update the `tls_policy` for a domain, the body to send should be: + +```json +{ "tls_policy": "recommended" } +``` TLS Policies: - recommended - for modern usage this includes TLS 1.2 only - Some considerations: - The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally. -- The compatible TLS policy is no longer supported. +- The `compatible` TLS policy is no longer supported. @@ -2630,12 +2644,12 @@ await client.CustomDomains.TestAsync("id"); Run the verification process on a custom domain. -Note: Check the status field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests. +Note: Check the `status` field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests. -For self_managed_certs, when the custom domain is verified for the first time, the response will also include the cname_api_key which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests. +For `self_managed_certs`, when the custom domain is verified for the first time, the response will also include the `cname_api_key` which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests. -Learn more about verifying custom domains that use Auth0 Managed certificates. -Learn more about verifying custom domains that use Self Managed certificates. +[Learn more](https://auth0.com/docs/custom-domains#step-2-verify-ownership) about verifying custom domains that use Auth0 Managed certificates. +[Learn more](https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership) about verifying custom domains that use Self Managed certificates. @@ -4288,7 +4302,7 @@ await client.Groups.DeleteAsync("id");
-Retrieve all hooks. Accepts a list of fields to include or exclude in the result. +Retrieve all [hooks](https://auth0.com/docs/hooks). Accepts a list of fields to include or exclude in the result.
@@ -4413,7 +4427,7 @@ await client.Hooks.CreateAsync(
-Retrieve a hook by its ID. Accepts a list of fields to include in the result. +Retrieve [a hook](https://auth0.com/docs/hooks) by its ID. Accepts a list of fields to include in the result.
@@ -7261,7 +7275,7 @@ await client.Roles.UpdateAsync("id", new UpdateRoleRequestContent());
-Retrieve a filtered list of rules. Accepts a list of fields to include or exclude. +Retrieve a filtered list of [rules](https://auth0.com/docs/rules). Accepts a list of fields to include or exclude.
@@ -7325,9 +7339,9 @@ await client.Rules.ListAsync(
-Create a new rule. +Create a [new rule](https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api). -Note: Changing a rule's stage of execution from the default login_success can change the rule's function signature to have user omitted. +Note: Changing a rule's stage of execution from the default `login_success` can change the rule's function signature to have user omitted.
@@ -7381,7 +7395,7 @@ await client.Rules.CreateAsync(new CreateRuleRequestContent { Name = "name", Scr
-Retrieve rule details. Accepts a list of fields to include or exclude in the result. +Retrieve [rule](https://auth0.com/docs/rules) details. Accepts a list of fields to include or exclude in the result.
@@ -11693,28 +11707,28 @@ await client.Branding.Templates.GetUniversalLoginAsync(); Update the Universal Login branding template. -

When content-type header is set to application/json:

-
+When `content-type` header is set to `application/json`:
+
+```json
 {
-  "template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: "auto" %}<html lang="{{locale}}" dir="{{resolved_dir}}"><head>{%- auth0:head -%}</head><body class="_widget-auto-layout">{%- auth0:widget -%}</body></html>"
+  "template": "{% assign resolved_dir = dir | default: \"auto\" %}{%- auth0:head -%}{%- auth0:widget -%}"
 }
-
+``` + +When `content-type` header is set to `text/html`: -

- When content-type header is set to text/html: -

-
-<!DOCTYPE html>
+```html
+
 {% assign resolved_dir = dir | default: "auto" %}
-<html lang="{{locale}}" dir="{{resolved_dir}}">
-  <head>
+
+  
     {%- auth0:head -%}
-  </head>
-  <body class="_widget-auto-layout">
+  
+  
     {%- auth0:widget -%}
-  </body>
-</html>
-
+ + +``` @@ -14162,9 +14176,9 @@ await client.Connections.ScimConfiguration.GetDefaultMappingAsync("id");
-Retrieve all clients that have the specified connection enabled. +Retrieve all clients that have the specified [connection](https://auth0.com/docs/authenticate/identity-providers) enabled. -Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. +**Note**: The first time you call this endpoint, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no further results are remaining.
@@ -17570,7 +17584,7 @@ await client.Guardian.Factors.Duo.Settings.UpdateAsync(
-Retrieve a hook's secrets by the ID of the hook. +Retrieve a hook's secrets by the ID of the hook.
@@ -17624,7 +17638,7 @@ await client.Hooks.Secrets.GetAsync("id");
-Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. +Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets.
@@ -17689,7 +17703,7 @@ await client.Hooks.Secrets.CreateAsync(
-Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. +Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete.
@@ -17751,7 +17765,7 @@ await client.Hooks.Secrets.DeleteAsync("id", new List() { "string" });
-Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. +Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret.
@@ -20674,7 +20688,7 @@ await client.Prompts.Rendering.ListAsync(
-Learn more about configuring render settings for advanced customization. +Learn more about [configuring render settings](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens) for advanced customization.
@@ -20802,7 +20816,7 @@ await client.Prompts.Rendering.GetAsync(PromptGroupNameEnum.Login, ScreenGroupNa
-Learn more about configuring render settings for advanced customization. +Learn more about [configuring render settings](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens) for advanced customization.
diff --git a/src/Auth0.ManagementApi/Actions/ActionsClient.cs b/src/Auth0.ManagementApi/Actions/ActionsClient.cs index ae76d3ac3..7376c97f6 100644 --- a/src/Auth0.ManagementApi/Actions/ActionsClient.cs +++ b/src/Auth0.ManagementApi/Actions/ActionsClient.cs @@ -748,7 +748,7 @@ public async Task DeleteAsync( } /// - /// Update an existing action. If this action is currently bound to a trigger, updating it will not affect any user flows until the action is deployed. + /// Update an existing action. If this action is currently bound to a trigger, updating it will **not** affect any user flows until the action is deployed. /// /// /// await client.Actions.UpdateAsync("id", new UpdateActionRequestContent()); diff --git a/src/Auth0.ManagementApi/Actions/IActionsClient.cs b/src/Auth0.ManagementApi/Actions/IActionsClient.cs index a21f1119c..237d05ac8 100644 --- a/src/Auth0.ManagementApi/Actions/IActionsClient.cs +++ b/src/Auth0.ManagementApi/Actions/IActionsClient.cs @@ -48,7 +48,7 @@ Task DeleteAsync( ); /// - /// Update an existing action. If this action is currently bound to a trigger, updating it will not affect any user flows until the action is deployed. + /// Update an existing action. If this action is currently bound to a trigger, updating it will **not** affect any user flows until the action is deployed. /// WithRawResponseTask UpdateAsync( string id, diff --git a/src/Auth0.ManagementApi/Auth0.ManagementApi.csproj b/src/Auth0.ManagementApi/Auth0.ManagementApi.csproj index 70f2f5a6d..efc3b8fdb 100644 --- a/src/Auth0.ManagementApi/Auth0.ManagementApi.csproj +++ b/src/Auth0.ManagementApi/Auth0.ManagementApi.csproj @@ -5,7 +5,7 @@ enable 12 enable - 7.45.1 + 7.46.0 $(Version) $(Version) README.md diff --git a/src/Auth0.ManagementApi/Branding/Templates/ITemplatesClient.cs b/src/Auth0.ManagementApi/Branding/Templates/ITemplatesClient.cs index e7a411b21..a37c12410 100644 --- a/src/Auth0.ManagementApi/Branding/Templates/ITemplatesClient.cs +++ b/src/Auth0.ManagementApi/Branding/Templates/ITemplatesClient.cs @@ -12,18 +12,18 @@ WithRawResponseTask GetUniversalLoginA /// /// Update the Universal Login branding template. /// - /// When content-type header is set to application/json: - /// + /// When `content-type` header is set to `application/json`: + /// + /// ```json /// { - /// "template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: "auto" %}<html lang="{{locale}}" dir="{{resolved_dir}}"><head>{%- auth0:head -%}</head><body class="_widget-auto-layout">{%- auth0:widget -%}</body></html>" + /// "template": "{% assign resolved_dir = dir | default: \"auto\" %}<html lang=\"{{locale}}\" dir=\"{{resolved_dir}}\"><head>{%- auth0:head -%}</head><body class=\"_widget-auto-layout\">{%- auth0:widget -%}</body></html>" /// } - /// + /// ``` + /// + /// When `content-type` header is set to `text/html`: + /// + /// ```html /// - /// - /// When content-type header is set to text/html: - /// - /// - /// <!DOCTYPE html> /// {% assign resolved_dir = dir | default: "auto" %} /// <html lang="{{locale}}" dir="{{resolved_dir}}"> /// <head> @@ -33,7 +33,7 @@ WithRawResponseTask GetUniversalLoginA /// {%- auth0:widget -%} /// </body> /// </html> - /// + /// ``` /// Task UpdateUniversalLoginAsync( UpdateUniversalLoginTemplateRequestContent request, diff --git a/src/Auth0.ManagementApi/Branding/Templates/TemplatesClient.cs b/src/Auth0.ManagementApi/Branding/Templates/TemplatesClient.cs index 2265b8a92..4b2bd56c3 100644 --- a/src/Auth0.ManagementApi/Branding/Templates/TemplatesClient.cs +++ b/src/Auth0.ManagementApi/Branding/Templates/TemplatesClient.cs @@ -117,18 +117,18 @@ public WithRawResponseTask GetUniversa /// /// Update the Universal Login branding template. /// - /// When content-type header is set to application/json: - /// + /// When `content-type` header is set to `application/json`: + /// + /// ```json /// { - /// "template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: "auto" %}<html lang="{{locale}}" dir="{{resolved_dir}}"><head>{%- auth0:head -%}</head><body class="_widget-auto-layout">{%- auth0:widget -%}</body></html>" + /// "template": "{% assign resolved_dir = dir | default: \"auto\" %}<html lang=\"{{locale}}\" dir=\"{{resolved_dir}}\"><head>{%- auth0:head -%}</head><body class=\"_widget-auto-layout\">{%- auth0:widget -%}</body></html>" /// } - /// + /// ``` + /// + /// When `content-type` header is set to `text/html`: + /// + /// ```html /// - /// - /// When content-type header is set to text/html: - /// - /// - /// <!DOCTYPE html> /// {% assign resolved_dir = dir | default: "auto" %} /// <html lang="{{locale}}" dir="{{resolved_dir}}"> /// <head> @@ -138,7 +138,7 @@ public WithRawResponseTask GetUniversa /// {%- auth0:widget -%} /// </body> /// </html> - /// + /// ``` /// /// /// await client.Branding.Templates.UpdateUniversalLoginAsync("string"); diff --git a/src/Auth0.ManagementApi/Clients/ClientsClient.cs b/src/Auth0.ManagementApi/Clients/ClientsClient.cs index 98298766f..a0f3e638d 100644 --- a/src/Auth0.ManagementApi/Clients/ClientsClient.cs +++ b/src/Auth0.ManagementApi/Clients/ClientsClient.cs @@ -863,8 +863,18 @@ 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 \ + /// 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). + /// + /// 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) + /// /// /// /// await client.Clients.RegisterCimdClientAsync( diff --git a/src/Auth0.ManagementApi/Clients/IClientsClient.cs b/src/Auth0.ManagementApi/Clients/IClientsClient.cs index fc099e06a..b414be580 100644 --- a/src/Auth0.ManagementApi/Clients/IClientsClient.cs +++ b/src/Auth0.ManagementApi/Clients/IClientsClient.cs @@ -84,8 +84,18 @@ 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 \ + /// 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). + /// + /// 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) + /// /// WithRawResponseTask RegisterCimdClientAsync( RegisterCimdClientRequestContent request, diff --git a/src/Auth0.ManagementApi/Clients/Requests/CreateClientRequestContent.cs b/src/Auth0.ManagementApi/Clients/Requests/CreateClientRequestContent.cs index 2888d7491..e5feecfcf 100644 --- a/src/Auth0.ManagementApi/Clients/Requests/CreateClientRequestContent.cs +++ b/src/Auth0.ManagementApi/Clients/Requests/CreateClientRequestContent.cs @@ -206,6 +206,10 @@ public record CreateClientRequestContent [JsonPropertyName("native_social_login")] public NativeSocialLogin? NativeSocialLogin { get; set; } + [Optional] + [JsonPropertyName("fedcm_login")] + public FedCmLogin? FedcmLogin { get; set; } + [Nullable, Optional] [JsonPropertyName("refresh_token")] public Optional RefreshToken { get; set; } diff --git a/src/Auth0.ManagementApi/Clients/Requests/UpdateClientRequestContent.cs b/src/Auth0.ManagementApi/Clients/Requests/UpdateClientRequestContent.cs index 34b5b7b80..583b52a1a 100644 --- a/src/Auth0.ManagementApi/Clients/Requests/UpdateClientRequestContent.cs +++ b/src/Auth0.ManagementApi/Clients/Requests/UpdateClientRequestContent.cs @@ -224,6 +224,10 @@ public record UpdateClientRequestContent [JsonPropertyName("native_social_login")] public NativeSocialLogin? NativeSocialLogin { get; set; } + [Optional] + [JsonPropertyName("fedcm_login")] + public FedCmLogin? FedcmLogin { get; set; } + [Nullable, Optional] [JsonPropertyName("refresh_token")] public Optional RefreshToken { get; set; } diff --git a/src/Auth0.ManagementApi/Connections/Clients/ClientsClient.cs b/src/Auth0.ManagementApi/Connections/Clients/ClientsClient.cs index 293ae4a34..e2add2f9e 100644 --- a/src/Auth0.ManagementApi/Connections/Clients/ClientsClient.cs +++ b/src/Auth0.ManagementApi/Connections/Clients/ClientsClient.cs @@ -14,9 +14,9 @@ internal ClientsClient(RawClient client) } /// - /// Retrieve all clients that have the specified connection enabled. + /// Retrieve all clients that have the specified [connection](https://auth0.com/docs/authenticate/identity-providers) enabled. /// - /// Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + /// **Note**: The first time you call this endpoint, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no further results are remaining. /// private WithRawResponseTask GetInternalAsync( string id, @@ -131,9 +131,9 @@ private async Task< } /// - /// Retrieve all clients that have the specified connection enabled. + /// Retrieve all clients that have the specified [connection](https://auth0.com/docs/authenticate/identity-providers) enabled. /// - /// Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + /// **Note**: The first time you call this endpoint, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no further results are remaining. /// /// /// await client.Connections.Clients.GetAsync( diff --git a/src/Auth0.ManagementApi/Connections/Clients/IClientsClient.cs b/src/Auth0.ManagementApi/Connections/Clients/IClientsClient.cs index 3a59cdd1e..08ffcb5c2 100644 --- a/src/Auth0.ManagementApi/Connections/Clients/IClientsClient.cs +++ b/src/Auth0.ManagementApi/Connections/Clients/IClientsClient.cs @@ -6,9 +6,9 @@ namespace Auth0.ManagementApi.Connections; public partial interface IClientsClient { /// - /// Retrieve all clients that have the specified connection enabled. + /// Retrieve all clients that have the specified [connection](https://auth0.com/docs/authenticate/identity-providers) enabled. /// - /// Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + /// **Note**: The first time you call this endpoint, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no further results are remaining. /// Task> GetAsync( string id, diff --git a/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs b/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs index 372a2b2ad..b699af58f 100644 --- a/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs @@ -29,25 +29,23 @@ internal ConnectionsClient(RawClient client) public Auth0.ManagementApi.Connections.IUsersClient Users { get; } /// - /// Retrieves detailed list of all connections that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. + /// Retrieves detailed list of all [connections](https://auth0.com/docs/authenticate/identity-providers) that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. /// /// This endpoint supports two types of pagination: - /// - /// Offset pagination - /// Checkpoint pagination - /// + /// + /// - Offset pagination + /// - Checkpoint pagination /// /// Checkpoint pagination must be used if you need to retrieve more than 1000 connections. /// - /// Checkpoint Pagination + /// **Checkpoint Pagination** /// /// To search by checkpoint, use the following parameters: - /// - /// from: Optional id from which to start selection. - /// take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. - /// /// - /// Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining. + /// - `from`: Optional id from which to start selection. + /// - `take`: The total amount of entries to retrieve when using the from parameter. Defaults to 50. + /// + /// **Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining. /// private WithRawResponseTask ListInternalAsync( ListConnectionsQueryParameters request, @@ -440,25 +438,23 @@ private async Task> UpdateAsync } /// - /// Retrieves detailed list of all connections that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. + /// Retrieves detailed list of all [connections](https://auth0.com/docs/authenticate/identity-providers) that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. /// /// This endpoint supports two types of pagination: - /// - /// Offset pagination - /// Checkpoint pagination - /// + /// + /// - Offset pagination + /// - Checkpoint pagination /// /// Checkpoint pagination must be used if you need to retrieve more than 1000 connections. /// - /// Checkpoint Pagination + /// **Checkpoint Pagination** /// /// To search by checkpoint, use the following parameters: - /// - /// from: Optional id from which to start selection. - /// take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. - /// /// - /// Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining. + /// - `from`: Optional id from which to start selection. + /// - `take`: The total amount of entries to retrieve when using the from parameter. Defaults to 50. + /// + /// **Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining. /// /// /// await client.Connections.ListAsync( @@ -508,9 +504,9 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), } /// - /// Creates a new connection according to the JSON object received in body. + /// Creates a new connection according to the JSON object received in `body`. /// - /// Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results. + /// **Note:** If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results. /// /// /// await client.Connections.CreateAsync( @@ -533,7 +529,7 @@ public WithRawResponseTask CreateAsync( } /// - /// Retrieve details for a specified connection along with options that can be used for identity provider configuration. + /// Retrieve details for a specified [connection](https://auth0.com/docs/authenticate/identity-providers) along with options that can be used for identity provider configuration. /// /// /// await client.Connections.GetAsync( @@ -554,9 +550,9 @@ public WithRawResponseTask GetAsync( } /// - /// Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. + /// Removes a specific [connection](https://auth0.com/docs/authenticate/identity-providers) from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. /// - /// Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name. + /// **Note:** If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent [create connection](https://auth0.com/docs/api/management/v2/connections/post-connections) requests, if they use an identical connection name. /// /// /// await client.Connections.DeleteAsync("id"); @@ -620,9 +616,9 @@ public async Task DeleteAsync( } /// - /// Update details for a specific connection, including option properties for identity provider configuration. + /// Update details for a specific [connection](https://auth0.com/docs/authenticate/identity-providers), including option properties for identity provider configuration. /// - /// Note: If you use the options parameter, the entire options object is overriden. To avoid partial data or other issues, ensure all parameters are present when using this option. + /// **Note**: If you use the `options` parameter, the entire `options` object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. /// /// /// await client.Connections.UpdateAsync("id", new UpdateConnectionRequestContent()); @@ -640,7 +636,7 @@ public WithRawResponseTask UpdateAsync( } /// - /// Retrieves the status of an ad/ldap connection referenced by its ID. 200 OK http status code response is returned when the connection is online, otherwise a 404 status code is returned along with an error message + /// Retrieves the status of an ad/ldap connection referenced by its `ID`. `200 OK` http status code response is returned when the connection is online, otherwise a `404` status code is returned along with an error message /// /// /// await client.Connections.CheckStatusAsync("id"); diff --git a/src/Auth0.ManagementApi/Connections/IConnectionsClient.cs b/src/Auth0.ManagementApi/Connections/IConnectionsClient.cs index 652b4f522..e656013a9 100644 --- a/src/Auth0.ManagementApi/Connections/IConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Connections/IConnectionsClient.cs @@ -12,25 +12,23 @@ public partial interface IConnectionsClient public Auth0.ManagementApi.Connections.IUsersClient Users { get; } /// - /// Retrieves detailed list of all connections that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. + /// Retrieves detailed list of all [connections](https://auth0.com/docs/authenticate/identity-providers) that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. /// /// This endpoint supports two types of pagination: - /// - /// Offset pagination - /// Checkpoint pagination - /// + /// + /// - Offset pagination + /// - Checkpoint pagination /// /// Checkpoint pagination must be used if you need to retrieve more than 1000 connections. /// - /// Checkpoint Pagination + /// **Checkpoint Pagination** /// /// To search by checkpoint, use the following parameters: - /// - /// from: Optional id from which to start selection. - /// take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. - /// /// - /// Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining. + /// - `from`: Optional id from which to start selection. + /// - `take`: The total amount of entries to retrieve when using the from parameter. Defaults to 50. + /// + /// **Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining. /// Task> ListAsync( ListConnectionsQueryParameters request, @@ -39,9 +37,9 @@ Task> ListAsync( ); /// - /// Creates a new connection according to the JSON object received in body. + /// Creates a new connection according to the JSON object received in `body`. /// - /// Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results. + /// **Note:** If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results. /// WithRawResponseTask CreateAsync( CreateConnectionRequestContent request, @@ -50,7 +48,7 @@ WithRawResponseTask CreateAsync( ); /// - /// Retrieve details for a specified connection along with options that can be used for identity provider configuration. + /// Retrieve details for a specified [connection](https://auth0.com/docs/authenticate/identity-providers) along with options that can be used for identity provider configuration. /// WithRawResponseTask GetAsync( string id, @@ -60,9 +58,9 @@ WithRawResponseTask GetAsync( ); /// - /// Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. + /// Removes a specific [connection](https://auth0.com/docs/authenticate/identity-providers) from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. /// - /// Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name. + /// **Note:** If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent [create connection](https://auth0.com/docs/api/management/v2/connections/post-connections) requests, if they use an identical connection name. /// Task DeleteAsync( string id, @@ -71,9 +69,9 @@ Task DeleteAsync( ); /// - /// Update details for a specific connection, including option properties for identity provider configuration. + /// Update details for a specific [connection](https://auth0.com/docs/authenticate/identity-providers), including option properties for identity provider configuration. /// - /// Note: If you use the options parameter, the entire options object is overriden. To avoid partial data or other issues, ensure all parameters are present when using this option. + /// **Note**: If you use the `options` parameter, the entire `options` object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. /// WithRawResponseTask UpdateAsync( string id, @@ -83,7 +81,7 @@ WithRawResponseTask UpdateAsync( ); /// - /// Retrieves the status of an ad/ldap connection referenced by its ID. 200 OK http status code response is returned when the connection is online, otherwise a 404 status code is returned along with an error message + /// Retrieves the status of an ad/ldap connection referenced by its `ID`. `200 OK` http status code response is returned when the connection is online, otherwise a `404` status code is returned along with an error message /// Task CheckStatusAsync( string id, diff --git a/src/Auth0.ManagementApi/Core/Public/Version.cs b/src/Auth0.ManagementApi/Core/Public/Version.cs index bf9617958..1e14b8690 100644 --- a/src/Auth0.ManagementApi/Core/Public/Version.cs +++ b/src/Auth0.ManagementApi/Core/Public/Version.cs @@ -3,5 +3,5 @@ namespace Auth0.ManagementApi; [Serializable] internal class Version { - public const string Current = "7.45.1"; + public const string Current = "7.46.0"; } diff --git a/src/Auth0.ManagementApi/Core/RawClient.cs b/src/Auth0.ManagementApi/Core/RawClient.cs index 57d9b8ca0..13c1758e0 100644 --- a/src/Auth0.ManagementApi/Core/RawClient.cs +++ b/src/Auth0.ManagementApi/Core/RawClient.cs @@ -174,7 +174,8 @@ CancellationToken cancellationToken private static bool ShouldRetry(HttpResponseMessage response) { var statusCode = (int)response.StatusCode; - return statusCode is 408 or 429 or >= 500; + + return statusCode is 408 or 429 or (>= 500); } private static int AddPositiveJitter(int delayMs) diff --git a/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs b/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs index 9ea40b424..b2ded3280 100644 --- a/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs +++ b/src/Auth0.ManagementApi/CustomDomains/CustomDomainsClient.cs @@ -720,7 +720,7 @@ private async Task> VerifyAsy } /// - /// Retrieve details on custom domains. + /// Retrieve details on [custom domains](https://auth0.com/docs/custom-domains). /// /// /// await client.CustomDomains.ListAsync( @@ -755,7 +755,6 @@ public WithRawResponseTask> ListAsync( /// - custom_client_ip_header /// - tls_policy /// - /// /// TLS Policies: /// /// - recommended - for modern usage this includes TLS 1.2 only @@ -907,23 +906,31 @@ public async Task DeleteAsync( /// - custom_client_ip_header /// - tls_policy /// - /// Updating CUSTOM_CLIENT_IP_HEADER for a custom domainTo update the custom_client_ip_header for a domain, the body to + /// **Updating CUSTOM_CLIENT_IP_HEADER for a custom domain** + /// + /// To update the `custom_client_ip_header` for a domain, the body to /// send should be: - /// { "custom_client_ip_header": "cf-connecting-ip" } /// - /// Updating TLS_POLICY for a custom domainTo update the tls_policy for a domain, the body to send should be: - /// { "tls_policy": "recommended" } + /// ```json + /// { "custom_client_ip_header": "cf-connecting-ip" } + /// ``` + /// + /// **Updating TLS_POLICY for a custom domain** /// + /// To update the `tls_policy` for a domain, the body to send should be: + /// + /// ```json + /// { "tls_policy": "recommended" } + /// ``` /// /// TLS Policies: /// /// - recommended - for modern usage this includes TLS 1.2 only /// - /// /// Some considerations: /// /// - The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally. - /// - The compatible TLS policy is no longer supported. + /// - The `compatible` TLS policy is no longer supported. /// /// /// await client.CustomDomains.UpdateAsync("id", new UpdateCustomDomainRequestContent()); @@ -960,12 +967,12 @@ public WithRawResponseTask TestAsync( /// /// Run the verification process on a custom domain. /// - /// Note: Check the status field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests. + /// Note: Check the `status` field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests. /// - /// For self_managed_certs, when the custom domain is verified for the first time, the response will also include the cname_api_key which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests. + /// For `self_managed_certs`, when the custom domain is verified for the first time, the response will also include the `cname_api_key` which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests. /// - /// Learn more about verifying custom domains that use Auth0 Managed certificates. - /// Learn more about verifying custom domains that use Self Managed certificates. + /// [Learn more](https://auth0.com/docs/custom-domains#step-2-verify-ownership) about verifying custom domains that use Auth0 Managed certificates. + /// [Learn more](https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership) about verifying custom domains that use Self Managed certificates. /// /// /// await client.CustomDomains.VerifyAsync("id"); diff --git a/src/Auth0.ManagementApi/CustomDomains/ICustomDomainsClient.cs b/src/Auth0.ManagementApi/CustomDomains/ICustomDomainsClient.cs index 2f9022ddc..4e38ef4ac 100644 --- a/src/Auth0.ManagementApi/CustomDomains/ICustomDomainsClient.cs +++ b/src/Auth0.ManagementApi/CustomDomains/ICustomDomainsClient.cs @@ -3,7 +3,7 @@ namespace Auth0.ManagementApi; public partial interface ICustomDomainsClient { /// - /// Retrieve details on custom domains. + /// Retrieve details on [custom domains](https://auth0.com/docs/custom-domains). /// WithRawResponseTask> ListAsync( ListCustomDomainsRequestParameters request, @@ -22,7 +22,6 @@ WithRawResponseTask> ListAsync( /// - custom_client_ip_header /// - tls_policy /// - /// /// TLS Policies: /// /// - recommended - for modern usage this includes TLS 1.2 only @@ -76,23 +75,31 @@ Task DeleteAsync( /// - custom_client_ip_header /// - tls_policy /// - /// Updating CUSTOM_CLIENT_IP_HEADER for a custom domainTo update the custom_client_ip_header for a domain, the body to + /// **Updating CUSTOM_CLIENT_IP_HEADER for a custom domain** + /// + /// To update the `custom_client_ip_header` for a domain, the body to /// send should be: - /// { "custom_client_ip_header": "cf-connecting-ip" } /// - /// Updating TLS_POLICY for a custom domainTo update the tls_policy for a domain, the body to send should be: - /// { "tls_policy": "recommended" } + /// ```json + /// { "custom_client_ip_header": "cf-connecting-ip" } + /// ``` + /// + /// **Updating TLS_POLICY for a custom domain** /// + /// To update the `tls_policy` for a domain, the body to send should be: + /// + /// ```json + /// { "tls_policy": "recommended" } + /// ``` /// /// TLS Policies: /// /// - recommended - for modern usage this includes TLS 1.2 only /// - /// /// Some considerations: /// /// - The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally. - /// - The compatible TLS policy is no longer supported. + /// - The `compatible` TLS policy is no longer supported. /// WithRawResponseTask UpdateAsync( string id, @@ -113,12 +120,12 @@ WithRawResponseTask TestAsync( /// /// Run the verification process on a custom domain. /// - /// Note: Check the status field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests. + /// Note: Check the `status` field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests. /// - /// For self_managed_certs, when the custom domain is verified for the first time, the response will also include the cname_api_key which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests. + /// For `self_managed_certs`, when the custom domain is verified for the first time, the response will also include the `cname_api_key` which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests. /// - /// Learn more about verifying custom domains that use Auth0 Managed certificates. - /// Learn more about verifying custom domains that use Self Managed certificates. + /// [Learn more](https://auth0.com/docs/custom-domains#step-2-verify-ownership) about verifying custom domains that use Auth0 Managed certificates. + /// [Learn more](https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership) about verifying custom domains that use Self Managed certificates. /// WithRawResponseTask VerifyAsync( string id, diff --git a/src/Auth0.ManagementApi/Hooks/HooksClient.cs b/src/Auth0.ManagementApi/Hooks/HooksClient.cs index 8d6171437..9de44ff2d 100644 --- a/src/Auth0.ManagementApi/Hooks/HooksClient.cs +++ b/src/Auth0.ManagementApi/Hooks/HooksClient.cs @@ -17,7 +17,7 @@ internal HooksClient(RawClient client) public ISecretsClient Secrets { get; } /// - /// Retrieve all hooks. Accepts a list of fields to include or exclude in the result. + /// Retrieve all [hooks](https://auth0.com/docs/hooks). Accepts a list of fields to include or exclude in the result. /// private WithRawResponseTask ListInternalAsync( ListHooksRequestParameters request, @@ -401,7 +401,7 @@ private async Task> UpdateAsyncCore( } /// - /// Retrieve all hooks. Accepts a list of fields to include or exclude in the result. + /// Retrieve all [hooks](https://auth0.com/docs/hooks). Accepts a list of fields to include or exclude in the result. /// /// /// await client.Hooks.ListAsync( @@ -475,7 +475,7 @@ public WithRawResponseTask CreateAsync( } /// - /// Retrieve a hook by its ID. Accepts a list of fields to include in the result. + /// Retrieve [a hook](https://auth0.com/docs/hooks) by its ID. Accepts a list of fields to include in the result. /// /// /// await client.Hooks.GetAsync("id", new GetHookRequestParameters { Fields = "fields" }); diff --git a/src/Auth0.ManagementApi/Hooks/IHooksClient.cs b/src/Auth0.ManagementApi/Hooks/IHooksClient.cs index 4e844beba..70a4ac086 100644 --- a/src/Auth0.ManagementApi/Hooks/IHooksClient.cs +++ b/src/Auth0.ManagementApi/Hooks/IHooksClient.cs @@ -8,7 +8,7 @@ public partial interface IHooksClient public ISecretsClient Secrets { get; } /// - /// Retrieve all hooks. Accepts a list of fields to include or exclude in the result. + /// Retrieve all [hooks](https://auth0.com/docs/hooks). Accepts a list of fields to include or exclude in the result. /// Task> ListAsync( ListHooksRequestParameters request, @@ -26,7 +26,7 @@ WithRawResponseTask CreateAsync( ); /// - /// Retrieve a hook by its ID. Accepts a list of fields to include in the result. + /// Retrieve [a hook](https://auth0.com/docs/hooks) by its ID. Accepts a list of fields to include in the result. /// WithRawResponseTask GetAsync( string id, diff --git a/src/Auth0.ManagementApi/Prompts/Rendering/IRenderingClient.cs b/src/Auth0.ManagementApi/Prompts/Rendering/IRenderingClient.cs index af70225cc..440e1812e 100644 --- a/src/Auth0.ManagementApi/Prompts/Rendering/IRenderingClient.cs +++ b/src/Auth0.ManagementApi/Prompts/Rendering/IRenderingClient.cs @@ -15,7 +15,7 @@ Task> ListAsync( ); /// - /// Learn more about configuring render settings for advanced customization. + /// Learn more about [configuring render settings](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens) for advanced customization. /// WithRawResponseTask BulkUpdateAsync( BulkUpdateAculRequestContent request, @@ -34,7 +34,7 @@ WithRawResponseTask GetAsync( ); /// - /// Learn more about configuring render settings for advanced customization. + /// Learn more about [configuring render settings](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens) for advanced customization. /// WithRawResponseTask UpdateAsync( PromptGroupNameEnum prompt, diff --git a/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs b/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs index 15dad4607..4d723ee55 100644 --- a/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs +++ b/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs @@ -464,7 +464,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), } /// - /// Learn more about configuring render settings for advanced customization. + /// Learn more about [configuring render settings](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens) for advanced customization. /// /// /// await client.Prompts.Rendering.BulkUpdateAsync( @@ -511,7 +511,7 @@ public WithRawResponseTask GetAsync( } /// - /// Learn more about configuring render settings for advanced customization. + /// Learn more about [configuring render settings](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens) for advanced customization. /// /// /// await client.Prompts.Rendering.UpdateAsync( diff --git a/src/Auth0.ManagementApi/Rules/IRulesClient.cs b/src/Auth0.ManagementApi/Rules/IRulesClient.cs index 58e080a36..bc632bb69 100644 --- a/src/Auth0.ManagementApi/Rules/IRulesClient.cs +++ b/src/Auth0.ManagementApi/Rules/IRulesClient.cs @@ -5,7 +5,7 @@ namespace Auth0.ManagementApi; public partial interface IRulesClient { /// - /// Retrieve a filtered list of rules. Accepts a list of fields to include or exclude. + /// Retrieve a filtered list of [rules](https://auth0.com/docs/rules). Accepts a list of fields to include or exclude. /// Task> ListAsync( ListRulesRequestParameters request, @@ -14,9 +14,9 @@ Task> ListAsync( ); /// - /// Create a new rule. + /// Create a [new rule](https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api). /// - /// Note: Changing a rule's stage of execution from the default login_success can change the rule's function signature to have user omitted. + /// Note: Changing a rule's stage of execution from the default `login_success` can change the rule's function signature to have user omitted. /// WithRawResponseTask CreateAsync( CreateRuleRequestContent request, @@ -25,7 +25,7 @@ WithRawResponseTask CreateAsync( ); /// - /// Retrieve rule details. Accepts a list of fields to include or exclude in the result. + /// Retrieve [rule](https://auth0.com/docs/rules) details. Accepts a list of fields to include or exclude in the result. /// WithRawResponseTask GetAsync( string id, diff --git a/src/Auth0.ManagementApi/Rules/RulesClient.cs b/src/Auth0.ManagementApi/Rules/RulesClient.cs index 9c1b6a76e..74474a686 100644 --- a/src/Auth0.ManagementApi/Rules/RulesClient.cs +++ b/src/Auth0.ManagementApi/Rules/RulesClient.cs @@ -13,7 +13,7 @@ internal RulesClient(RawClient client) } /// - /// Retrieve a filtered list of rules. Accepts a list of fields to include or exclude. + /// Retrieve a filtered list of [rules](https://auth0.com/docs/rules). Accepts a list of fields to include or exclude. /// private WithRawResponseTask ListInternalAsync( ListRulesRequestParameters request, @@ -404,7 +404,7 @@ private async Task> UpdateAsyncCore( } /// - /// Retrieve a filtered list of rules. Accepts a list of fields to include or exclude. + /// Retrieve a filtered list of [rules](https://auth0.com/docs/rules). Accepts a list of fields to include or exclude. /// /// /// await client.Rules.ListAsync( @@ -454,9 +454,9 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), } /// - /// Create a new rule. + /// Create a [new rule](https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api). /// - /// Note: Changing a rule's stage of execution from the default login_success can change the rule's function signature to have user omitted. + /// Note: Changing a rule's stage of execution from the default `login_success` can change the rule's function signature to have user omitted. /// /// /// await client.Rules.CreateAsync(new CreateRuleRequestContent { Name = "name", Script = "script" }); @@ -473,7 +473,7 @@ public WithRawResponseTask CreateAsync( } /// - /// Retrieve rule details. Accepts a list of fields to include or exclude in the result. + /// Retrieve [rule](https://auth0.com/docs/rules) details. Accepts a list of fields to include or exclude in the result. /// /// /// await client.Rules.GetAsync( diff --git a/src/Auth0.ManagementApi/Types/BrandingPageBackground.cs b/src/Auth0.ManagementApi/Types/BrandingPageBackground.cs index 0407b4422..d12ec3265 100644 --- a/src/Auth0.ManagementApi/Types/BrandingPageBackground.cs +++ b/src/Auth0.ManagementApi/Types/BrandingPageBackground.cs @@ -9,16 +9,16 @@ namespace Auth0.ManagementApi; /// /// Page Background Color or Gradient. -/// Property contains either null to unset, a solid color as a string value #FFFFFF, or a gradient as an object. +/// Property contains either `null` to unset, a solid color as a string value `#FFFFFF`, or a gradient as an object. /// -/// +/// ```js /// { /// type: 'linear-gradient', /// start: '#FFFFFF', /// end: '#000000', /// angle_deg: 35 /// } -/// +/// ``` /// [JsonConverter(typeof(BrandingPageBackground.JsonConverter))] [Serializable] diff --git a/src/Auth0.ManagementApi/Types/ConnectionDpopSigningAlgEnum.cs b/src/Auth0.ManagementApi/Types/ConnectionDpopSigningAlgEnum.cs index 7e0b06920..e939d5227 100644 --- a/src/Auth0.ManagementApi/Types/ConnectionDpopSigningAlgEnum.cs +++ b/src/Auth0.ManagementApi/Types/ConnectionDpopSigningAlgEnum.cs @@ -10,6 +10,10 @@ namespace Auth0.ManagementApi; { public static readonly ConnectionDpopSigningAlgEnum Es256 = new(Values.Es256); + public static readonly ConnectionDpopSigningAlgEnum Es384 = new(Values.Es384); + + public static readonly ConnectionDpopSigningAlgEnum Es512 = new(Values.Es512); + public static readonly ConnectionDpopSigningAlgEnum Ed25519 = new(Values.Ed25519); public ConnectionDpopSigningAlgEnum(string value) @@ -111,6 +115,10 @@ public static class Values { public const string Es256 = "ES256"; + public const string Es384 = "ES384"; + + public const string Es512 = "ES512"; + public const string Ed25519 = "Ed25519"; } } diff --git a/src/Auth0.ManagementApi/Types/FedCmLogin.cs b/src/Auth0.ManagementApi/Types/FedCmLogin.cs new file mode 100644 index 000000000..d1956515d --- /dev/null +++ b/src/Auth0.ManagementApi/Types/FedCmLogin.cs @@ -0,0 +1,32 @@ +using Auth0.ManagementApi.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Auth0.ManagementApi; + +/// +/// Configure FedCM login settings for New Universal Login +/// +[Serializable] +public record FedCmLogin : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [Optional] + [JsonPropertyName("google")] + public FedCmLoginGoogle? Google { 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/FedCmLoginGoogle.cs b/src/Auth0.ManagementApi/Types/FedCmLoginGoogle.cs new file mode 100644 index 000000000..6e8af61c0 --- /dev/null +++ b/src/Auth0.ManagementApi/Types/FedCmLoginGoogle.cs @@ -0,0 +1,35 @@ +using Auth0.ManagementApi.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Auth0.ManagementApi; + +/// +/// Google FedCM configuration for this client +/// +[Serializable] +public record FedCmLoginGoogle : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + /// + /// When true, shows the Google FedCM prompt on New Universal Login for this client + /// + [Optional] + [JsonPropertyName("is_enabled")] + public bool? IsEnabled { 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/UpdateBrandingPageBackground.cs b/src/Auth0.ManagementApi/Types/UpdateBrandingPageBackground.cs index 97d36067b..e57fbc2a4 100644 --- a/src/Auth0.ManagementApi/Types/UpdateBrandingPageBackground.cs +++ b/src/Auth0.ManagementApi/Types/UpdateBrandingPageBackground.cs @@ -9,16 +9,16 @@ namespace Auth0.ManagementApi; /// /// Page Background Color or Gradient. -/// Property contains either null to unset, a solid color as a string value #FFFFFF, or a gradient as an object. +/// Property contains either `null` to unset, a solid color as a string value `#FFFFFF`, or a gradient as an object. /// -/// +/// ```js /// { /// type: 'linear-gradient', /// start: '#FFFFFF', /// end: '#000000', /// angle_deg: 35 /// } -/// +/// ``` /// [JsonConverter(typeof(UpdateBrandingPageBackground.JsonConverter))] [Serializable] diff --git a/tests/Auth0.ManagementApi.Test/Auth0.ManagementApi.Test.csproj b/tests/Auth0.ManagementApi.Test/Auth0.ManagementApi.Test.csproj index ab18c1f30..63c4abb22 100644 --- a/tests/Auth0.ManagementApi.Test/Auth0.ManagementApi.Test.csproj +++ b/tests/Auth0.ManagementApi.Test/Auth0.ManagementApi.Test.csproj @@ -25,7 +25,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Auth0.ManagementApi.Test/Utils/JsonAssert.cs b/tests/Auth0.ManagementApi.Test/Utils/JsonAssert.cs index 68c6ed8ca..ace89981a 100644 --- a/tests/Auth0.ManagementApi.Test/Utils/JsonAssert.cs +++ b/tests/Auth0.ManagementApi.Test/Utils/JsonAssert.cs @@ -18,12 +18,16 @@ internal static void AreEqual(object actual, string expectedJson) } /// - /// Asserts that the given JSON string survives a deserialization/serialization round-trip - /// intact: deserializes to T then re-serializes and compares to the original JSON. + /// Asserts that the given JSON string survives a deserialization/serialization round-trip. + /// Deserializes to T, re-serializes to get the canonical form, then verifies a second + /// round-trip produces the same canonical form (idempotency). This accounts for serializer + /// options like WhenWritingNull that may normalize the output. /// internal static void Roundtrips(string json) { var deserialized = JsonUtils.Deserialize(json); - AreEqual(deserialized!, json); + var serialized = JsonUtils.Serialize(deserialized!); + var deserialized2 = JsonUtils.Deserialize(serialized); + AreEqual(deserialized2!, serialized); } }