Skip to content

Commit

Permalink
merge results
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed May 27, 2024
2 parents baca784 + 07118b2 commit 2260601
Showing 1 changed file with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ public class AppSettings : IValidatableObject

public HealthCheckSettings HealthCheckSettings { get; set; } = default!;

[Required]
public string UserProfileImagesDir { get; set; } = default!;

//#if (captcha == "reCaptcha")
[Required]
public string GoogleRecaptchaSecretKey { get; set; } = default!;
//#endif

Expand All @@ -41,14 +39,8 @@ public class IdentitySettings
{
public TimeSpan BearerTokenExpiration { get; set; }
public TimeSpan RefreshTokenExpiration { get; set; }

[Required]
public string Issuer { get; set; } = default!;

[Required]
public string Audience { get; set; } = default!;

[Required]
public string IdentityCertificatePassword { get; set; } = default!;
public bool PasswordRequireDigit { get; set; }
public int PasswordRequiredLength { get; set; }
Expand All @@ -75,7 +67,6 @@ public class IdentitySettings

public class EmailSettings
{
[Required]
public string Host { get; set; } = default!;
/// <summary>
/// If true, the web app tries to store emails as .eml file in the bin/Debug/net8.0/sent-emails folder instead of sending them using smtp server (recommended for testing purposes only).
Expand All @@ -84,19 +75,18 @@ public class EmailSettings

[Range(1, 65535)]
public int Port { get; set; }
public string? UserName { get; set; }
public string? Password { get; set; }

[Required]
public string UserName { get; set; } = default!;
public string Password { get; set; } = default!;
public string DefaultFromEmail { get; set; } = default!;
public bool HasCredential => (string.IsNullOrEmpty(UserName) is false) && (string.IsNullOrEmpty(Password) is false);
}

public class SmsSettings
{
public string? FromPhoneNumber { get; set; }
[Phone]
public string FromPhoneNumber { get; set; } = default!;

public string? ConnectionString { get; set; }
public string ConnectionString { get; set; } = default!;

public bool Configured => string.IsNullOrEmpty(FromPhoneNumber) is false && string.IsNullOrEmpty(ConnectionString) is false;
}

0 comments on commit 2260601

Please sign in to comment.