| | | 1 | | using Elsa.ExternalAuthentication.Options; |
| | | 2 | | using Elsa.Common.Features; |
| | | 3 | | using Elsa.Extensions; |
| | | 4 | | using Elsa.Features.Abstractions; |
| | | 5 | | using Elsa.Features.Attributes; |
| | | 6 | | using Elsa.Features.Services; |
| | | 7 | | using Microsoft.Extensions.DependencyInjection; |
| | | 8 | | |
| | | 9 | | namespace Elsa.ExternalAuthentication.Features; |
| | | 10 | | |
| | | 11 | | [DependsOn(typeof(SystemClockFeature))] |
| | 0 | 12 | | public sealed class ExternalAuthenticationFeature(IModule module) : FeatureBase(module) |
| | | 13 | | { |
| | | 14 | | /// <summary>Configures deployment-owned broker clients, connections, security boundaries, and operations.</summary> |
| | 0 | 15 | | public Action<ExternalAuthenticationOptions>? ConfigureOptions { get; set; } |
| | | 16 | | |
| | | 17 | | public override void Configure() |
| | | 18 | | { |
| | 0 | 19 | | Module.AddFastEndpointsAssembly<ExternalAuthenticationFeature>(); |
| | 0 | 20 | | } |
| | | 21 | | |
| | | 22 | | public override void Apply() |
| | | 23 | | { |
| | 0 | 24 | | Services.AddExternalAuthenticationServices(ConfigureOptions); |
| | 0 | 25 | | Module.AddFastEndpointsFromModule(); |
| | 0 | 26 | | } |
| | | 27 | | } |