File tree Expand file tree Collapse file tree
SecurityService.OpenIdConnect.IntegrationTests/Common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,9 +297,9 @@ private IContainerService SetupSecurityServiceTestUIContainer(String containerNa
297297 {
298298 // Management API Container
299299 IContainerService securityServiceTestUIContainer = new Builder ( ) . UseContainer ( ) . WithName ( containerName )
300- . WithEnvironment ( $ "Authority=https://identity-server:{ securityServiceContainerPort } ",
301- $ "ClientId={ clientDetails . clientId } ",
302- $ "ClientSecret={ clientDetails . clientSecret } ",
300+ . WithEnvironment ( $ "AppSettings: Authority=https://identity-server:{ securityServiceContainerPort } ",
301+ $ "AppSettings: ClientId={ clientDetails . clientId } ",
302+ $ "AppSettings: ClientSecret={ clientDetails . clientSecret } ",
303303 "urls=https://*:5004" )
304304 . UseImage ( "securityservicetestui" ) . ExposePort ( 5004 )
305305 . UseNetwork ( new List < INetworkService >
Original file line number Diff line number Diff line change @@ -18,12 +18,15 @@ namespace SecurityServiceTestUI
1818
1919 public class Startup
2020 {
21- public Startup ( IConfiguration configuration )
21+ public Startup ( IWebHostEnvironment webHostEnvironment )
2222 {
23- Configuration = configuration ;
23+ IConfigurationBuilder builder = new ConfigurationBuilder ( ) . SetBasePath ( webHostEnvironment . ContentRootPath )
24+ . AddJsonFile ( "appsettings.json" , optional : true , reloadOnChange : true )
25+ . AddEnvironmentVariables ( ) ;
26+ Startup . Configuration = builder . Build ( ) ;
2427 }
2528
26- public IConfiguration Configuration { get ; }
29+ public static IConfigurationRoot Configuration { get ; set ; }
2730
2831 // This method gets called by the runtime. Use this method to add services to the container.
2932 public void ConfigureServices ( IServiceCollection services )
@@ -32,6 +35,8 @@ public void ConfigureServices(IServiceCollection services)
3235
3336 JwtSecurityTokenHandler . DefaultMapInboundClaims = false ;
3437
38+ Console . WriteLine ( $ "Authority is { Configuration . GetValue < String > ( "AppSettings:Authority" ) } ") ;
39+
3540 services . AddAuthentication ( options =>
3641 {
3742 options . DefaultScheme = "Cookies" ;
You can’t perform that action at this time.
0 commit comments