Skip to content

Commit a356735

Browse files
Copilotmarcominerva
andcommitted
Change Roles type from string[] to IEnumerable<string>
Co-authored-by: marcominerva <3522534+marcominerva@users.noreply.github.com>
1 parent 57fc9b8 commit a356735

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/SimpleAuthentication.Abstractions/ApiKey/ApiKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ namespace SimpleAuthentication.ApiKey;
66
/// <param name="Value">The API key value</param>
77
/// <param name="UserName">The user name associated with the current key</param>
88
/// <param name="Roles">The optional list of roles to assign to the user</param>
9-
public record class ApiKey(string Value, string UserName, string[]? Roles = null);
9+
public record class ApiKey(string Value, string UserName, IEnumerable<string>? Roles = null);

src/SimpleAuthentication.Abstractions/ApiKey/ApiKeySettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class ApiKeySettings : AuthenticationSchemeOptions
4646
/// </summary>
4747
/// <seealso cref="ApiKeyValue"/>
4848
/// <seealso cref="UserName"/>
49-
public string[]? Roles { get; set; }
49+
public IEnumerable<string>? Roles { get; set; }
5050

5151
private ICollection<ApiKey> apiKeys = [];
5252
/// <summary>

src/SimpleAuthentication.Abstractions/BasicAuthentication/BasicAuthenticationSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class BasicAuthenticationSettings : AuthenticationSchemeOptions
3535
/// </summary>
3636
/// <seealso cref="UserName"/>
3737
/// <seealso cref="Password"/>
38-
public string[]? Roles { get; set; }
38+
public IEnumerable<string>? Roles { get; set; }
3939

4040
private ICollection<Credential> credentials = [];
4141
/// <summary>

src/SimpleAuthentication.Abstractions/BasicAuthentication/Credential.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ namespace SimpleAuthentication.BasicAuthentication;
66
/// <param name="UserName">The user name</param>
77
/// <param name="Password">The password</param>
88
/// <param name="Roles">The optional list of roles to assign to the user</param>
9-
public record class Credential(string UserName, string Password, string[]? Roles = null);
9+
public record class Credential(string UserName, string Password, IEnumerable<string>? Roles = null);

0 commit comments

Comments
 (0)