Browse Source

Update Startup.cs

pull/986/head
Rafsanul Hasan 5 years ago
committed by GitHub
parent
commit
d1dd16e022
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 22 deletions
  1. +21
    -22
      src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs

+ 21
- 22
src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs View File

@ -89,9 +89,9 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
app.UseSwagger()
.UseSwaggerUI(c =>
{
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1");
//c.ConfigureOAuth2("Microsoft.eShopOnContainers.Web.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI");
});
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1");
//c.ConfigureOAuth2("Microsoft.eShopOnContainers.Web.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI");
});
}
}
@ -114,17 +114,17 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
options.Events = new JwtBearerEvents()
{
OnAuthenticationFailed = async ctx =>
{
await Task.Run(() =>
{
});
},
{
await Task.Run(() =>
{
});
},
OnTokenValidated = async ctx =>
{
await Task.Run(() =>
{
});
}
{
await Task.Run(() =>
{
});
}
};
});
@ -157,9 +157,9 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
AuthorizationUrl = $"{configuration.GetValue<string>("IdentityUrlExternal")}/connect/authorize",
TokenUrl = $"{configuration.GetValue<string>("IdentityUrlExternal")}/connect/token",
Scopes = new Dictionary<string, string>()
{
{ "webshoppingagg", "Shopping Aggregator for Web Clients" }
}
{
{ "webshoppingagg", "Shopping Aggregator for Web Clients" }
}
});
options.OperationFilter<AuthorizeCheckOperationFilter>();
@ -167,12 +167,11 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
services.AddCors(options =>
{
options.AddPolicy("CorsPolicy",
builder => builder
.SetIsOriginAllowed((host) => true)
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
options.AddPolicy("CorsPolicy", builder => builder
.SetIsOriginAllowed((host) => true)
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
});
return services;


Loading…
Cancel
Save