can now use tokens from ocelot a on ocelot b when using admin area

This commit is contained in:
Tom Gardham-Pallister
2017-06-23 15:17:40 +01:00
parent 2d94884c6f
commit 6cdf4e67df
8 changed files with 29 additions and 7 deletions

View File

@ -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

View File

@ -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,