mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 20:10:50 +08:00 
			
		
		
		
	can now use tokens from ocelot a on ocelot b when using admin area
This commit is contained in:
		@@ -89,7 +89,10 @@ namespace Ocelot.DependencyInjection
 | 
			
		||||
            {
 | 
			
		||||
                services.TryAddSingleton<IIdentityServerConfiguration>(identityServerConfiguration);
 | 
			
		||||
                services.TryAddSingleton<IHashMatcher, HashMatcher>();
 | 
			
		||||
                var identityServerBuilder = services.AddIdentityServer()
 | 
			
		||||
                var identityServerBuilder = services
 | 
			
		||||
                    .AddIdentityServer(options => {
 | 
			
		||||
                        options.IssuerUri = "Ocelot";
 | 
			
		||||
                    })
 | 
			
		||||
                    .AddInMemoryApiResources(new List<ApiResource>
 | 
			
		||||
                    {
 | 
			
		||||
                        new ApiResource
 | 
			
		||||
 
 | 
			
		||||
@@ -181,7 +181,6 @@ namespace Ocelot.Middleware
 | 
			
		||||
                builder.Map(configuration.AdministrationPath, app =>
 | 
			
		||||
                {
 | 
			
		||||
                    var identityServerUrl = $"{baseSchemeUrlAndPort}/{configuration.AdministrationPath.Remove(0,1)}";
 | 
			
		||||
 | 
			
		||||
                    app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
 | 
			
		||||
                    {
 | 
			
		||||
                        Authority = identityServerUrl,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user