|
1 | 1 | using Microsoft.AspNetCore.Authentication;
|
2 | 2 | using Microsoft.AspNetCore.Authentication.MicrosoftAccount;
|
3 |
| -using Microsoft.AspNetCore.Authentication.OpenIdConnect; |
4 | 3 | using Microsoft.Extensions.DependencyInjection;
|
5 | 4 | using Microsoft.Extensions.DependencyInjection.Extensions;
|
6 | 5 | using Microsoft.Extensions.Options;
|
7 |
| -using Microsoft.Identity.Web; |
8 | 6 | using OrchardCore.Deployment;
|
9 | 7 | using OrchardCore.DisplayManagement.Handlers;
|
10 | 8 | using OrchardCore.Microsoft.Authentication.Configuration;
|
@@ -47,42 +45,12 @@ public override void ConfigureServices(IServiceCollection services)
|
47 | 45 | }
|
48 | 46 | }
|
49 | 47 |
|
50 |
| -[Feature(MicrosoftAuthenticationConstants.Features.AAD)] |
51 |
| -public sealed class AzureADStartup : StartupBase |
52 |
| -{ |
53 |
| - public override void ConfigureServices(IServiceCollection services) |
54 |
| - { |
55 |
| - services.TryAddEnumerable(new ServiceDescriptor(typeof(IPermissionProvider), typeof(Permissions), ServiceLifetime.Scoped)); |
56 |
| - |
57 |
| - services.AddSingleton<IAzureADService, AzureADService>(); |
58 |
| - services.AddRecipeExecutionStep<AzureADSettingsStep>(); |
59 |
| - |
60 |
| - services.AddSiteDisplayDriver<AzureADSettingsDisplayDriver>(); |
61 |
| - services.AddNavigationProvider<AdminMenuAAD>(); |
62 |
| - |
63 |
| - services.AddTransient<IConfigureOptions<AzureADSettings>, AzureADSettingsConfiguration>(); |
64 |
| - |
65 |
| - // Register the options initializers required by the Policy Scheme, Cookie and OpenId Connect Handler. |
66 |
| - services.TryAddEnumerable(new[] |
67 |
| - { |
68 |
| - // Orchard-specific initializers. |
69 |
| - ServiceDescriptor.Transient<IConfigureOptions<AuthenticationOptions>, AzureADOptionsConfiguration>(), |
70 |
| - ServiceDescriptor.Transient<IConfigureOptions<MicrosoftIdentityOptions>, AzureADOptionsConfiguration>(), |
71 |
| - ServiceDescriptor.Transient<IConfigureOptions<PolicySchemeOptions>, AzureADOptionsConfiguration>(), |
72 |
| - ServiceDescriptor.Transient<IConfigureOptions<OpenIdConnectOptions>, OpenIdConnectOptionsConfiguration>(), |
73 |
| - |
74 |
| - // Built-in initializers: |
75 |
| - ServiceDescriptor.Singleton<IPostConfigureOptions<OpenIdConnectOptions>, OpenIdConnectPostConfigureOptions>(), |
76 |
| - }); |
77 |
| - } |
78 |
| -} |
79 |
| - |
80 | 48 | [RequireFeatures("OrchardCore.Deployment")]
|
81 |
| -[Feature(MicrosoftAuthenticationConstants.Features.AAD)] |
82 |
| -public sealed class DeploymentStartup : StartupBase |
| 49 | +[Feature(MicrosoftAuthenticationConstants.Features.MicrosoftAccount)] |
| 50 | +public sealed class MicrosoftAccountDeploymentStartup : StartupBase |
83 | 51 | {
|
84 | 52 | public override void ConfigureServices(IServiceCollection services)
|
85 | 53 | {
|
86 |
| - services.AddDeployment<AzureADDeploymentSource, AzureADDeploymentStep, AzureADDeploymentStepDriver>(); |
| 54 | + services.AddDeployment<MicrosoftAccountDeploymentSource, MicrosoftAccountDeploymentStep, MicrosoftAccountDeploymentStepDriver>(); |
87 | 55 | }
|
88 | 56 | }
|
0 commit comments