| | | 1 | | using CShells.Configuration; |
| | | 2 | | using CShells.FastEndpoints.Features; |
| | | 3 | | using CShells.Features; |
| | | 4 | | using Elsa.Extensions; |
| | | 5 | | using Elsa.ExternalAuthentication.Options; |
| | | 6 | | using JetBrains.Annotations; |
| | | 7 | | using Microsoft.Extensions.Configuration; |
| | | 8 | | using Microsoft.Extensions.DependencyInjection; |
| | | 9 | | |
| | | 10 | | namespace 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] |
| | | 17 | | public sealed class ExternalAuthenticationShellFeature : IFastEndpointsShellFeature |
| | | 18 | | { |
| | 0 | 19 | | public string ConfigurationSectionName { get; set; } = "ExternalAuthentication"; |
| | | 20 | | |
| | | 21 | | public void ConfigureServices(IServiceCollection services) |
| | | 22 | | { |
| | 0 | 23 | | services.AddExternalAuthenticationServices(); |
| | 0 | 24 | | services.AddOptions<ExternalAuthenticationOptions>() |
| | 0 | 25 | | .Configure<ShellConfiguration>((options, configuration) => configuration.GetSection(ConfigurationSectionName |
| | 0 | 26 | | } |
| | | 27 | | } |