< Summary

Information
Class: Elsa.ExternalAuthentication.ShellFeatures.ExternalAuthenticationShellFeature
Assembly: Elsa.ExternalAuthentication
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.ExternalAuthentication/ShellFeatures/ExternalAuthenticationShellFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 27
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_ConfigurationSectionName()100%210%
ConfigureServices(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.ExternalAuthentication/ShellFeatures/ExternalAuthenticationShellFeature.cs

#LineLine coverage
 1using CShells.Configuration;
 2using CShells.FastEndpoints.Features;
 3using CShells.Features;
 4using Elsa.Extensions;
 5using Elsa.ExternalAuthentication.Options;
 6using JetBrains.Annotations;
 7using Microsoft.Extensions.Configuration;
 8using Microsoft.Extensions.DependencyInjection;
 9
 10namespace Elsa.ExternalAuthentication.ShellFeatures;
 11
 12[ShellFeature(
 13    DisplayName = "External Authentication",
 14    Description = "Provides brokered external authentication and identity provider connection management.",
 15    DependsOn = ["SystemClock", "ElsaFastEndpoints"])]
 16[UsedImplicitly]
 17public sealed class ExternalAuthenticationShellFeature : IFastEndpointsShellFeature
 18{
 019    public string ConfigurationSectionName { get; set; } = "ExternalAuthentication";
 20
 21    public void ConfigureServices(IServiceCollection services)
 22    {
 023        services.AddExternalAuthenticationServices();
 024        services.AddOptions<ExternalAuthenticationOptions>()
 025            .Configure<ShellConfiguration>((options, configuration) => configuration.GetSection(ConfigurationSectionName
 026    }
 27}