using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace OrangeStacksApi
{
public class Startup
{
public void ConfigureServices(
IServiceCollection services)
{
services.AddAuthentication(
IdentityServerAuthenticationDefaults.JwtAuthenticationScheme)
.AddIdentityServerAuthentication(options =>
{
options.Authority = "http://localhost:5000"; // Auth Server
options.RequireHttpsMetadata = false; // only for development
options.ApiName = "fiver_auth_api"; // API Resource Id
});
services.AddMvc();
}
public void Configure(
IApplicationBuilder app,
IHostingEnvironment env)
{
app.UseAuthentication();
app.UseMvcWithDefaultRoute();
}
}
}```
This Startup Class is on API project
This code seems to be not working because the `IdentityServerAuthenticationDefaults` does not exists in current Context