| | | 1 | | namespace Syki.Back.Features.Identity.CheckSsoAvailability; |
| | | 2 | | |
| | | 3 | | public class CheckSsoAvailabilityOut : IApiDto<CheckSsoAvailabilityOut> |
| | | 4 | | { |
| | | 5 | | /// <summary> |
| | | 6 | | /// Whether SSO is enabled for this email domain. |
| | | 7 | | /// </summary> |
| | 0 | 8 | | public bool SsoEnabled { get; set; } |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Whether SSO is required (password login is not allowed). |
| | | 12 | | /// Only relevant when SsoEnabled is true. |
| | | 13 | | /// </summary> |
| | 0 | 14 | | public bool SsoRequired { get; set; } |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// The SSO provider type (e.g., AzureAd, GoogleWorkspace). |
| | | 18 | | /// Only present when SsoEnabled is true. |
| | | 19 | | /// </summary> |
| | 0 | 20 | | public SsoProviderType? ProviderType { get; set; } |
| | | 21 | | |
| | | 22 | | public static IEnumerable<(string Name, CheckSsoAvailabilityOut Value)> GetExamples() => |
| | 0 | 23 | | [ |
| | 0 | 24 | | ("SSO Enabled", |
| | 0 | 25 | | new CheckSsoAvailabilityOut |
| | 0 | 26 | | { |
| | 0 | 27 | | SsoEnabled = true, |
| | 0 | 28 | | SsoRequired = false, |
| | 0 | 29 | | ProviderType = SsoProviderType.AzureAd, |
| | 0 | 30 | | }), |
| | 0 | 31 | | ("SSO Required", |
| | 0 | 32 | | new CheckSsoAvailabilityOut |
| | 0 | 33 | | { |
| | 0 | 34 | | SsoEnabled = true, |
| | 0 | 35 | | SsoRequired = true, |
| | 0 | 36 | | ProviderType = SsoProviderType.GoogleWorkspace, |
| | 0 | 37 | | }), |
| | 0 | 38 | | ("SSO Not Available", |
| | 0 | 39 | | new CheckSsoAvailabilityOut |
| | 0 | 40 | | { |
| | 0 | 41 | | SsoEnabled = false, |
| | 0 | 42 | | SsoRequired = false, |
| | 0 | 43 | | ProviderType = null, |
| | 0 | 44 | | }), |
| | 0 | 45 | | ]; |
| | | 46 | | } |