2323using EPiServer . DependencyInjection ;
2424using Optimizely . Cms . Forms . DependencyInjection ;
2525using Optimizely . Cms . Forms ;
26+ using EPiServer . Cms . Shell . UI ;
2627
2728namespace Alloy . ManagementSite
2829{
@@ -46,7 +47,6 @@ public void ConfigureServices(IServiceCollection services)
4647 if ( _environment . IsDevelopment ( ) )
4748 {
4849 //NETCORE: Consider add appsettings support for this
49-
5050 services . Configure < StaticFileOptions > ( o =>
5151 {
5252 o . OnPrepareResponse = context =>
@@ -88,7 +88,9 @@ public void ConfigureServices(IServiceCollection services)
8888 . Configure < ExternalApplicationOptions > ( options => options . OptimizeForDelivery = true )
8989 . ConfigureDisplayOptions ( )
9090 . AddContentDelivery ( managementSiteOptions )
91- . ConfigureDxp ( managementSiteOptions , _configuration ) ;
91+ . ConfigureDxp ( managementSiteOptions , _configuration )
92+ . AddAdminUserRegistration ( options => options . Behavior = RegisterAdminUserBehaviors . Enabled |
93+ RegisterAdminUserBehaviors . LocalRequestsOnly ) ;
9294
9395 services . AddCors ( opts =>
9496 {
@@ -194,6 +196,14 @@ public void PostConfigure(string name, OptimizelyFormsServiceOptions options)
194196 client . EncryptionKeys . Add ( key ) ;
195197 }
196198 }
199+
200+ foreach ( var client in options . OpenIDConnectClients )
201+ {
202+ foreach ( var key in _options . SigningCredentials . Select ( c => c . Key ) )
203+ {
204+ client . SigningKeys . Add ( key ) ;
205+ }
206+ }
197207 }
198208 }
199209}
0 commit comments