=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -5,6 +5,7 @@ namespace adas_core.Domain.Models.AppSettings;
|
||||
/// <summary>
|
||||
/// Represents a set of configuration settings used to control authentication behavior.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=d8a746d -->
|
||||
public class AuthSettings
|
||||
{
|
||||
public JwtConfig? JwtConfig { get; set; }
|
||||
@@ -18,6 +19,7 @@ public class AuthSettings
|
||||
/// <remarks>
|
||||
/// This class derives from <see cref="JwtExtConfig"/> and inherits its configuration properties, allowing it to serve as a more specific or customized JWT configuration type.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=8dc3f7a -->
|
||||
public class JwtConfig : JwtExtConfig
|
||||
{
|
||||
public string? Issuer { get; set; }
|
||||
@@ -32,6 +34,7 @@ public class JwtConfig : JwtExtConfig
|
||||
/// <summary>
|
||||
/// Represents a configuration class for JWT (JSON Web Token) extension settings.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=3aa508b -->
|
||||
public class JwtExtConfig
|
||||
{
|
||||
public string? Key { get; set; }
|
||||
@@ -45,6 +48,7 @@ public class JwtExtConfig
|
||||
/// <remarks>
|
||||
/// Inherits from a generic list of strings, exposing standard collection semantics for the whitelisted user entries.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=670602e -->
|
||||
public class UsersWhiteListConfig : List<string>
|
||||
{
|
||||
/// <summary>
|
||||
@@ -52,6 +56,7 @@ public class UsersWhiteListConfig : List<string>
|
||||
/// </summary>
|
||||
/// <param name="user">The user whose username will be checked against the collection.</param>
|
||||
/// <returns><c>true</c> if a matching username is found; otherwise, <c>false</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=a7ea804 body=5c9ff96 -->
|
||||
public bool IsValid(User user)
|
||||
{
|
||||
return this.Any(username => username.ToLowerInvariant().Equals(user.UserName.ToLowerInvariant()));
|
||||
@@ -74,6 +79,10 @@ public class UsersWhiteListConfig : List<string>
|
||||
/// Represents a group that has been validated as meeting the required criteria.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=1cee181 -->
|
||||
/// <summary>
|
||||
/// Represents a group that has been validated, typically used as a wrapper or marker type to distinguish validated data from unvalidated input.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=1cee181 -->
|
||||
public class ValidGroupsConfig : List<ValidGroup>
|
||||
{
|
||||
/// <summary>
|
||||
@@ -81,6 +90,7 @@ public class ValidGroupsConfig : List<ValidGroup>
|
||||
/// </summary>
|
||||
/// <param name="user">The user instance to validate.</param>
|
||||
/// <returns><see langword="true"/> if <paramref name="user"/> is not null; otherwise, <see langword="false"/>.</returns>
|
||||
/// <!-- aidoc:v1 sig=ef48a2b body=71cdf52 -->
|
||||
public bool IsValid(User? user)
|
||||
{
|
||||
return user != null;
|
||||
|
||||
Reference in New Issue
Block a user