| | | 1 | | using System.Text.Json; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Api.Client.Resources.ExternalAuthentication.Connections.Models; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// An external authentication connection exposed by the management API. |
| | | 7 | | /// </summary> |
| | | 8 | | public sealed class ExternalAuthenticationConnection |
| | | 9 | | { |
| | | 10 | | public string Id { get; set; } = ""; |
| | | 11 | | public string Key { get; set; } = ""; |
| | | 12 | | public string Source { get; set; } = ""; |
| | | 13 | | public ExternalAuthenticationConnectionScope Scope { get; set; } = new(); |
| | | 14 | | public string AdapterType { get; set; } = ""; |
| | | 15 | | public Uri? CallbackUri { get; set; } |
| | | 16 | | public Uri? PreviewCallbackUri { get; set; } |
| | | 17 | | public int AdapterSettingsVersion { get; set; } |
| | | 18 | | public JsonElement AdapterSettings { get; set; } |
| | | 19 | | public Dictionary<string, ExternalAuthenticationSecretBindingState> SecretBindings { get; set; } = new(StringCompare |
| | | 20 | | public string DisplayName { get; set; } = ""; |
| | | 21 | | public string? IconId { get; set; } |
| | | 22 | | public int Order { get; set; } |
| | | 23 | | public bool IsPreferred { get; set; } |
| | | 24 | | public bool OverridesConfigurationConnection { get; set; } |
| | | 25 | | public bool CanCreateOverride { get; set; } |
| | | 26 | | public bool CanPromoteToConfigurationOverride { get; set; } |
| | | 27 | | public bool EnabledIntent { get; set; } |
| | | 28 | | public bool EffectivelyEnabled { get; set; } |
| | | 29 | | public string Validity { get; set; } = ""; |
| | | 30 | | public bool Shadowed { get; set; } |
| | | 31 | | public ExternalAuthenticationConnectionReference? ShadowedBy { get; set; } |
| | | 32 | | public ICollection<ExternalAuthenticationConnectionReference> Shadows { get; set; } = []; |
| | | 33 | | public bool Archived { get; set; } |
| | | 34 | | public ExternalAuthenticationPolicySelection? UnlinkedPolicy { get; set; } |
| | | 35 | | public ICollection<ExternalAuthenticationGrantSourceSelection> PermissionGrantSources { get; set; } = []; |
| | | 36 | | public ExternalAuthenticationClaimProjection ClaimProjection { get; set; } = new(); |
| | | 37 | | public string UpstreamLogoutMode { get; set; } = "disabled"; |
| | | 38 | | public long Revision { get; set; } |
| | | 39 | | public string MaterialRevision { get; set; } = ""; |
| | | 40 | | public ExternalAuthenticationConnectionObservation? LatestObservation { get; set; } |
| | | 41 | | } |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Identifies a connection that participates in an effective/shadowed relationship. |
| | | 45 | | /// </summary> |
| | | 46 | | public sealed class ExternalAuthenticationConnectionReference |
| | | 47 | | { |
| | | 48 | | public string Id { get; set; } = ""; |
| | | 49 | | public string DisplayName { get; set; } = ""; |
| | | 50 | | public string Source { get; set; } = ""; |
| | | 51 | | } |
| | | 52 | | |
| | | 53 | | public sealed class ExternalAuthenticationConnectionScope |
| | | 54 | | { |
| | | 55 | | public string Kind { get; set; } = "host"; |
| | | 56 | | public string? TenantId { get; set; } |
| | | 57 | | } |
| | | 58 | | |
| | | 59 | | public sealed class ExternalAuthenticationSecretBindingState |
| | | 60 | | { |
| | | 61 | | public string Ownership { get; set; } = ""; |
| | | 62 | | public string? ResolverType { get; set; } |
| | | 63 | | public string? Reference { get; set; } |
| | | 64 | | public bool IsConfigured { get; set; } |
| | | 65 | | public bool IsResolvable { get; set; } |
| | | 66 | | } |
| | | 67 | | |
| | | 68 | | public sealed class ExternalAuthenticationPolicySelection |
| | | 69 | | { |
| | | 70 | | public string Type { get; set; } = ""; |
| | | 71 | | public int SettingsVersion { get; set; } |
| | | 72 | | public JsonElement Settings { get; set; } |
| | | 73 | | } |
| | | 74 | | |
| | | 75 | | public sealed class ExternalAuthenticationGrantSourceSelection |
| | | 76 | | { |
| | | 77 | | public string Type { get; set; } = ""; |
| | | 78 | | public int SettingsVersion { get; set; } |
| | | 79 | | public JsonElement Settings { get; set; } |
| | | 80 | | public int Order { get; set; } |
| | | 81 | | } |
| | | 82 | | |
| | | 83 | | public sealed class ExternalAuthenticationClaimProjection |
| | | 84 | | { |
| | | 85 | | public ICollection<string> AllowedClaimTypes { get; set; } = []; |
| | | 86 | | public ICollection<string> RedactedClaimTypes { get; set; } = []; |
| | | 87 | | public int MaximumClaimCount { get; set; } |
| | | 88 | | public int MaximumValueLength { get; set; } |
| | | 89 | | public int MaximumTotalBytes { get; set; } |
| | | 90 | | } |
| | | 91 | | |
| | | 92 | | public sealed class ExternalAuthenticationConnectionObservation |
| | | 93 | | { |
| | 0 | 94 | | public string Status { get; set; } = ""; |
| | 0 | 95 | | public DateTimeOffset ObservedAt { get; set; } |
| | 0 | 96 | | public string TestedMaterialRevision { get; set; } = ""; |
| | 0 | 97 | | public bool IsStale { get; set; } |
| | 0 | 98 | | public string Category { get; set; } = ""; |
| | 0 | 99 | | public string Summary { get; set; } = ""; |
| | | 100 | | } |