mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 16:10:50 +08:00 
			
		
		
		
	unit and int tests are passing with auth changes...but acceptance tests are in a state and there are loads of todos...
This commit is contained in:
		@@ -20,6 +20,22 @@
 | 
			
		||||
                    .Build(),
 | 
			
		||||
                new FileConfiguration
 | 
			
		||||
                {
 | 
			
		||||
                    AuthenticationOptions = new List<FileAuthenticationOptions>
 | 
			
		||||
                    {
 | 
			
		||||
                        new FileAuthenticationOptions
 | 
			
		||||
                        {
 | 
			
		||||
                            AllowedScopes = new List<string>(),
 | 
			
		||||
                            Provider = "IdentityServer",
 | 
			
		||||
                            IdentityServerConfig = new FileIdentityServerConfig
 | 
			
		||||
                            {
 | 
			
		||||
                                ProviderRootUrl = "http://localhost:51888",
 | 
			
		||||
                                RequireHttps = false,
 | 
			
		||||
                                ApiName = "api",
 | 
			
		||||
                                ApiSecret = "secret"
 | 
			
		||||
                            }  ,
 | 
			
		||||
                            AuthenticationProviderKey = "Test"                              
 | 
			
		||||
                        }
 | 
			
		||||
                    },
 | 
			
		||||
                    ReRoutes = new List<FileReRoute>
 | 
			
		||||
                    {
 | 
			
		||||
                        new FileReRoute
 | 
			
		||||
@@ -28,18 +44,7 @@
 | 
			
		||||
                            DownstreamPathTemplate = "/products/{productId}",
 | 
			
		||||
                            UpstreamHttpMethod = new List<string> { "Get" },
 | 
			
		||||
                            ReRouteIsCaseSensitive = true,
 | 
			
		||||
                            AuthenticationOptions = new FileAuthenticationOptions
 | 
			
		||||
                            {
 | 
			
		||||
                                AllowedScopes = new List<string>(),
 | 
			
		||||
                                Provider = "IdentityServer",
 | 
			
		||||
                                IdentityServerConfig = new FileIdentityServerConfig
 | 
			
		||||
                                {
 | 
			
		||||
                                    ProviderRootUrl = "http://localhost:51888",
 | 
			
		||||
                                    RequireHttps = false,
 | 
			
		||||
                                    ApiName = "api",
 | 
			
		||||
                                    ApiSecret = "secret"
 | 
			
		||||
                                }                                
 | 
			
		||||
                            },
 | 
			
		||||
                                AuthenticationProviderKey = "Test",                              
 | 
			
		||||
                            AddHeadersToRequest =
 | 
			
		||||
                                {
 | 
			
		||||
                                    { "CustomerId", "Claims[CustomerId] > value" },
 | 
			
		||||
@@ -58,6 +63,20 @@
 | 
			
		||||
                    .Build(),
 | 
			
		||||
                new FileConfiguration
 | 
			
		||||
                {
 | 
			
		||||
                    AuthenticationOptions = new List<FileAuthenticationOptions>
 | 
			
		||||
                    {
 | 
			
		||||
                        new FileAuthenticationOptions
 | 
			
		||||
                            {
 | 
			
		||||
                                AllowedScopes = new List<string>(),
 | 
			
		||||
                                Provider = "IdentityServer",
 | 
			
		||||
                                JwtConfig = new FileJwtConfig
 | 
			
		||||
                                {
 | 
			
		||||
                                    Audience = "a",
 | 
			
		||||
                                    Authority = "au"
 | 
			
		||||
                                },
 | 
			
		||||
                                AuthenticationProviderKey = "Test"
 | 
			
		||||
                            }
 | 
			
		||||
                    },
 | 
			
		||||
                    ReRoutes = new List<FileReRoute>
 | 
			
		||||
                    {
 | 
			
		||||
                        new FileReRoute
 | 
			
		||||
@@ -66,16 +85,7 @@
 | 
			
		||||
                            DownstreamPathTemplate = "/products/{productId}",
 | 
			
		||||
                            UpstreamHttpMethod = new List<string> { "Get" },
 | 
			
		||||
                            ReRouteIsCaseSensitive = true,
 | 
			
		||||
                            AuthenticationOptions = new FileAuthenticationOptions
 | 
			
		||||
                            {
 | 
			
		||||
                                AllowedScopes = new List<string>(),
 | 
			
		||||
                                Provider = "IdentityServer",
 | 
			
		||||
                                JwtConfig = new FileJwtConfig
 | 
			
		||||
                                {
 | 
			
		||||
                                    Audience = "a",
 | 
			
		||||
                                    Authority = "au"
 | 
			
		||||
                                }
 | 
			
		||||
                            },
 | 
			
		||||
                            AuthenticationProviderKey = "Test",
 | 
			
		||||
                            AddHeadersToRequest =
 | 
			
		||||
                            {
 | 
			
		||||
                                { "CustomerId", "Claims[CustomerId] > value" },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user