Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ src/Auth0.ManagementApi/Core/CustomDomainInterceptor.cs
src/Auth0.ManagementApi/CustomDomainHeader.cs
tests/Auth0.ManagementApi.Test/Core/CustomDomainInterceptorTest.cs
tests/Auth0.ManagementApi.Test/Unit/MockServer/CustomDomainHeaderTest.cs
.fern/replay.lock
.fern/replay.yml
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
.fern/replay.lock linguist-generated=true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ public record RevokeRefreshTokensRequestContent
[JsonPropertyName("client_id")]
public string? ClientId { get; set; }

/// <summary>
/// Resource server identifier (audience) to scope the revocation. Must be used with both `user_id` and `client_id`.
/// </summary>
[Optional]
[JsonPropertyName("audience")]
public string? Audience { get; set; }

/// <inheritdoc />
public override string ToString()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ public record CreateResourceServerRequestContent
[JsonPropertyName("allow_online_access")]
public bool? AllowOnlineAccess { get; set; }

/// <summary>
/// Whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral (true) or not (false).
/// </summary>
[Optional]
[JsonPropertyName("allow_online_access_with_ephemeral_sessions")]
public bool? AllowOnlineAccessWithEphemeralSessions { get; set; }

/// <summary>
/// Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ public record UpdateResourceServerRequestContent
[JsonPropertyName("allow_online_access")]
public bool? AllowOnlineAccess { get; set; }

/// <summary>
/// Whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral (true) or not (false).
/// </summary>
[Optional]
[JsonPropertyName("allow_online_access_with_ephemeral_sessions")]
public bool? AllowOnlineAccessWithEphemeralSessions { get; set; }

/// <summary>
/// Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Auth0.ManagementApi;
public record ChangePasswordTicketRequestContent
{
/// <summary>
/// URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id.
/// URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using organization_id. May be specified together with client_id when the tenant has a custom password reset page enabled and a password-reset-post-challenge Action bound.
/// </summary>
[Optional]
[JsonPropertyName("result_url")]
Expand Down
37 changes: 37 additions & 0 deletions src/Auth0.ManagementApi/Types/BadRequestSchema.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Auth0.ManagementApi.Core;
using global::System.Text.Json;
using global::System.Text.Json.Serialization;

namespace Auth0.ManagementApi;

/// <summary>
/// Bad Request
/// </summary>
[Serializable]
public record BadRequestSchema : IJsonOnDeserialized
{
[JsonExtensionData]
private readonly IDictionary<string, JsonElement> _extensionData =
new Dictionary<string, JsonElement>();

[JsonPropertyName("message")]
public required string Message { get; set; }

[JsonPropertyName("statusCode")]
public required string StatusCode { get; set; }

[JsonPropertyName("error")]
public required BadRequestSchemaError Error { get; set; }

[JsonIgnore]
public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new();

void IJsonOnDeserialized.OnDeserialized() =>
AdditionalProperties.CopyFromExtensionData(_extensionData);

/// <inheritdoc />
public override string ToString()
{
return JsonUtils.Serialize(this);
}
}
111 changes: 111 additions & 0 deletions src/Auth0.ManagementApi/Types/BadRequestSchemaError.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
using Auth0.ManagementApi.Core;
using global::System.Text.Json;
using global::System.Text.Json.Serialization;

namespace Auth0.ManagementApi;

[JsonConverter(typeof(BadRequestSchemaError.BadRequestSchemaErrorSerializer))]
[Serializable]
public readonly record struct BadRequestSchemaError : IStringEnum
{
public static readonly BadRequestSchemaError BadRequest = new(Values.BadRequest);

public BadRequestSchemaError(string value)
{
Value = value;
}

/// <summary>
/// The string value of the enum.
/// </summary>
public string Value { get; }

/// <summary>
/// Create a string enum with the given value.
/// </summary>
public static BadRequestSchemaError FromCustom(string value)
{
return new BadRequestSchemaError(value);
}

public bool Equals(string? other)
{
return Value.Equals(other);
}

/// <summary>
/// Returns the string value of the enum.
/// </summary>
public override string ToString()
{
return Value;
}

public static bool operator ==(BadRequestSchemaError value1, string value2) =>
value1.Value.Equals(value2);

public static bool operator !=(BadRequestSchemaError value1, string value2) =>
!value1.Value.Equals(value2);

public static explicit operator string(BadRequestSchemaError value) => value.Value;

public static explicit operator BadRequestSchemaError(string value) => new(value);

internal class BadRequestSchemaErrorSerializer : JsonConverter<BadRequestSchemaError>
{
public override BadRequestSchemaError 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 BadRequestSchemaError(stringValue);
}

public override void Write(
Utf8JsonWriter writer,
BadRequestSchemaError value,
JsonSerializerOptions options
)
{
writer.WriteStringValue(value.Value);
}

public override BadRequestSchemaError 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 BadRequestSchemaError(stringValue);
}

public override void WriteAsPropertyName(
Utf8JsonWriter writer,
BadRequestSchemaError value,
JsonSerializerOptions options
)
{
writer.WritePropertyName(value.Value);
}
}

/// <summary>
/// Constant strings for enum values
/// </summary>
[Serializable]
public static class Values
{
public const string BadRequest = "Bad Request";
}
}
6 changes: 2 additions & 4 deletions src/Auth0.ManagementApi/Types/ConnectionResponseCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ public record ConnectionResponseCommon : IJsonOnDeserialized
private readonly IDictionary<string, JsonElement> _extensionData =
new Dictionary<string, JsonElement>();

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@ public record ConnectionResponseContentAd : IJsonOnDeserialized
[JsonPropertyName("connected_accounts")]
public ConnectionConnectedAccountsPurpose? ConnectedAccounts { get; set; }

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,15 @@ public record ConnectionResponseContentAdfs : IJsonOnDeserialized
[JsonPropertyName("connected_accounts")]
public ConnectionConnectedAccountsPurpose? ConnectedAccounts { get; set; }

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ public record ConnectionResponseContentAmazon : IJsonOnDeserialized
[JsonPropertyName("connected_accounts")]
public ConnectionConnectedAccountsPurpose? ConnectedAccounts { get; set; }

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ public record ConnectionResponseContentApple : IJsonOnDeserialized
[JsonPropertyName("connected_accounts")]
public ConnectionConnectedAccountsPurpose? ConnectedAccounts { get; set; }

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ public record ConnectionResponseContentAuth0 : IJsonOnDeserialized
[JsonPropertyName("connected_accounts")]
public ConnectionConnectedAccountsPurpose? ConnectedAccounts { get; set; }

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ public record ConnectionResponseContentAuth0Oidc : IJsonOnDeserialized
[JsonPropertyName("connected_accounts")]
public ConnectionConnectedAccountsPurpose? ConnectedAccounts { get; set; }

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,15 @@ public record ConnectionResponseContentAzureAd : IJsonOnDeserialized
[JsonPropertyName("connected_accounts")]
public ConnectionConnectedAccountsPurpose? ConnectedAccounts { get; set; }

[Optional]
[JsonPropertyName("id")]
public string? Id { get; set; }
public required string Id { get; set; }

[Optional]
[JsonPropertyName("realms")]
public IEnumerable<string>? Realms { get; set; }

[Optional]
[JsonPropertyName("name")]
public string? Name { get; set; }
public required string Name { get; set; }

/// <summary>
/// Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.
Expand Down
Loading
Loading