< Summary

Information
Class: Elsa.Api.Client.Resources.ExternalAuthentication.Descriptors.Models.ExternalAuthenticationSettingFieldDescriptor
Assembly: Elsa.Api.Client
File(s): /home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/ExternalAuthentication/Descriptors/Models/ExternalAuthenticationDescriptors.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 14
Coverable lines: 14
Total lines: 102
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%210%
get_DisplayName()100%210%
get_Description()100%210%
get_ValueType()100%210%
get_IsRequired()100%210%
get_UiHint()100%210%
get_DefaultValue()100%210%
get_AllowedValues()100%210%
get_Validation()100%210%
get_IsSecretBinding()100%210%
get_IsUnsafe()100%210%
get_VisibleWhen()100%210%
get_HelpText()100%210%
get_IsRedacted()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/ExternalAuthentication/Descriptors/Models/ExternalAuthenticationDescriptors.cs

#LineLine coverage
 1using System.Text.Json;
 2
 3namespace Elsa.Api.Client.Resources.ExternalAuthentication.Descriptors.Models;
 4
 5public sealed class ExternalAuthenticationAdapterDescriptor
 6{
 7    public string Type { get; set; } = "";
 8    public string DisplayName { get; set; } = "";
 9    public string Description { get; set; } = "";
 10    public int SettingsVersion { get; set; }
 11    public ICollection<ExternalAuthenticationSettingFieldDescriptor> Fields { get; set; } = [];
 12    public ExternalAuthenticationAdapterCapabilities Capabilities { get; set; } = new();
 13    public ExternalAuthenticationCustomEditorContract? CustomEditor { get; set; }
 14}
 15
 16public sealed class ExternalAuthenticationPolicyDescriptor
 17{
 18    public string Type { get; set; } = "";
 19    public string DisplayName { get; set; } = "";
 20    public string Description { get; set; } = "";
 21    public int SettingsVersion { get; set; }
 22    public ICollection<ExternalAuthenticationSettingFieldDescriptor> Fields { get; set; } = [];
 23    public ExternalAuthenticationCustomEditorContract? CustomEditor { get; set; }
 24}
 25
 26public sealed class ExternalAuthenticationPermissionGrantSourceDescriptor
 27{
 28    public string Type { get; set; } = "";
 29    public string DisplayName { get; set; } = "";
 30    public string Description { get; set; } = "";
 31    public int SettingsVersion { get; set; }
 32    public ICollection<ExternalAuthenticationSettingFieldDescriptor> Fields { get; set; } = [];
 33    public ExternalAuthenticationCustomEditorContract? CustomEditor { get; set; }
 34}
 35
 36/// <summary>
 37/// One permission resource a claim mapping may be configured to confer.
 38/// </summary>
 39/// <remarks>
 40/// Mirrors the core catalog's descriptor, which is keyed by resource and carries the verbs that resource
 41/// accepts. It replaced a single <c>Name</c> holding a whole permission string when the two-axis model
 42/// landed: a mapping picks a resource and a verb, so a client needs both to offer the choice.
 43/// </remarks>
 44public sealed class ExternalAuthenticationPermissionDescriptor
 45{
 46    /// <summary>The hierarchical resource path, for example <c>workflows/definitions</c>.</summary>
 47    public string Resource { get; set; } = "";
 48
 49    /// <summary>The verbs this resource accepts. The wildcard is deliberately absent: it is not a verb a user selects.<
 50    public ICollection<string> SupportedVerbs { get; set; } = [];
 51
 52    public string DisplayName { get; set; } = "";
 53    public string Description { get; set; } = "";
 54    public string Category { get; set; } = "";
 55
 56    /// <summary><c>false</c> for a descriptor auto-registered because a module declared a permission that matched none.
 57    public bool Verified { get; set; } = true;
 58}
 59
 60public sealed class ExternalAuthenticationSettingFieldDescriptor
 61{
 062    public string Name { get; set; } = "";
 063    public string DisplayName { get; set; } = "";
 064    public string Description { get; set; } = "";
 065    public string ValueType { get; set; } = "";
 066    public bool IsRequired { get; set; }
 067    public string UiHint { get; set; } = "";
 068    public JsonElement? DefaultValue { get; set; }
 069    public ICollection<string> AllowedValues { get; set; } = [];
 070    public ExternalAuthenticationSettingFieldValidation Validation { get; set; } = new();
 071    public bool IsSecretBinding { get; set; }
 072    public bool IsUnsafe { get; set; }
 073    public ExternalAuthenticationSettingFieldVisibilityCondition? VisibleWhen { get; set; }
 074    public string? HelpText { get; set; }
 075    public bool IsRedacted { get; set; }
 76}
 77
 78public sealed class ExternalAuthenticationSettingFieldValidation
 79{
 80    public int? MinimumLength { get; set; }
 81    public int? MaximumLength { get; set; }
 82    public string? Pattern { get; set; }
 83}
 84
 85public sealed class ExternalAuthenticationSettingFieldVisibilityCondition
 86{
 87    public string Field { get; set; } = "";
 88    public string ExpectedValue { get; set; } = "";
 89}
 90
 91public sealed class ExternalAuthenticationCustomEditorContract
 92{
 93    public string Key { get; set; } = "";
 94    public int ContractVersion { get; set; }
 95}
 96
 97public sealed class ExternalAuthenticationAdapterCapabilities
 98{
 99    public bool SupportsTest { get; set; }
 100    public bool SupportsPreview { get; set; }
 101    public bool SupportsUpstreamLogout { get; set; }
 102}