23
23
using EPiServer . DependencyInjection ;
24
24
using Optimizely . Cms . Forms . DependencyInjection ;
25
25
using Optimizely . Cms . Forms ;
26
+ using EPiServer . Cms . Shell . UI ;
26
27
27
28
namespace Alloy . ManagementSite
28
29
{
@@ -46,7 +47,6 @@ public void ConfigureServices(IServiceCollection services)
46
47
if ( _environment . IsDevelopment ( ) )
47
48
{
48
49
//NETCORE: Consider add appsettings support for this
49
-
50
50
services . Configure < StaticFileOptions > ( o =>
51
51
{
52
52
o . OnPrepareResponse = context =>
@@ -88,7 +88,9 @@ public void ConfigureServices(IServiceCollection services)
88
88
. Configure < ExternalApplicationOptions > ( options => options . OptimizeForDelivery = true )
89
89
. ConfigureDisplayOptions ( )
90
90
. AddContentDelivery ( managementSiteOptions )
91
- . ConfigureDxp ( managementSiteOptions , _configuration ) ;
91
+ . ConfigureDxp ( managementSiteOptions , _configuration )
92
+ . AddAdminUserRegistration ( options => options . Behavior = RegisterAdminUserBehaviors . Enabled |
93
+ RegisterAdminUserBehaviors . LocalRequestsOnly ) ;
92
94
93
95
services . AddCors ( opts =>
94
96
{
@@ -194,6 +196,14 @@ public void PostConfigure(string name, OptimizelyFormsServiceOptions options)
194
196
client . EncryptionKeys . Add ( key ) ;
195
197
}
196
198
}
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
+ }
197
207
}
198
208
}
199
209
}
0 commit comments