< 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: 26
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.DependencyInjection;
 8
 9namespace Elsa.ExternalAuthentication.ShellFeatures;
 10
 11[ShellFeature(
 12    DisplayName = "External Authentication",
 13    Description = "Provides brokered external authentication and identity provider connection management.",
 14    DependsOn = ["SystemClock", "ElsaFastEndpoints"])]
 15[UsedImplicitly]
 16public sealed class ExternalAuthenticationShellFeature : IFastEndpointsShellFeature
 17{
 018    public string ConfigurationSectionName { get; set; } = "ExternalAuthentication";
 19
 20    public void ConfigureServices(IServiceCollection services)
 21    {
 022        services.AddExternalAuthenticationServices();
 023        services.AddOptions<ExternalAuthenticationOptions>()
 024            .Configure<ShellConfiguration>((options, configuration) => configuration.GetSection(ConfigurationSectionName
 025    }
 26}