Skip to content

Commit dc0f7b6

Browse files
committed
fix(SDK): Made all authentication schemes properties nullable, enabling proper ASP.NET validation when using secret-based authentication
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
1 parent 4773537 commit dc0f7b6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/ServerlessWorkflow.Sdk/Models/Authentication/BasicAuthenticationSchemeDefinition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ public record BasicAuthenticationSchemeDefinition
2929
/// Gets/sets the username used for authentication
3030
/// </summary>
3131
[DataMember(Name = "username", Order = 1), JsonPropertyName("username"), JsonPropertyOrder(1), YamlMember(Alias = "username", Order = 1)]
32-
public virtual string Username { get; set; } = null!;
32+
public virtual string? Username { get; set; }
3333

3434
/// <summary>
3535
/// Gets/sets the password used for authentication
3636
/// </summary>
3737
[DataMember(Name = "password", Order = 2), JsonPropertyName("password"), JsonPropertyOrder(2), YamlMember(Alias = "password", Order = 2)]
38-
public virtual string Password { get; set; } = null!;
38+
public virtual string? Password { get; set; }
3939

4040
}

src/ServerlessWorkflow.Sdk/Models/Authentication/BearerAuthenticationSchemeDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ public record BearerAuthenticationSchemeDefinition
2929
/// Gets/sets the bearer token used for authentication
3030
/// </summary>
3131
[DataMember(Name = "token", Order = 1), JsonPropertyName("token"), JsonPropertyOrder(1), YamlMember(Alias = "token", Order = 1)]
32-
public virtual string Token { get; set; } = null!;
32+
public virtual string? Token { get; set; }
3333

3434
}

src/ServerlessWorkflow.Sdk/Models/Authentication/DigestAuthenticationSchemeDefinition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ public record DigestAuthenticationSchemeDefinition
2929
/// Gets/sets the username used for authentication
3030
/// </summary>
3131
[DataMember(Name = "username", Order = 1), JsonPropertyName("username"), JsonPropertyOrder(1), YamlMember(Alias = "username", Order = 1)]
32-
public virtual string Username { get; set; } = null!;
32+
public virtual string? Username { get; set; }
3333

3434
/// <summary>
3535
/// Gets/sets the password used for authentication
3636
/// </summary>
3737
[DataMember(Name = "password", Order = 2), JsonPropertyName("password"), JsonPropertyOrder(2), YamlMember(Alias = "password", Order = 2)]
38-
public virtual string Password { get; set; } = null!;
38+
public virtual string? Password { get; set; }
3939

4040
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy