【发布时间】:2019-06-01 16:34:53
【问题描述】:
我正在尝试将 Ocelot 与 IS4 一起使用 https://ocelot.readthedocs.io/en/latest/features/authentication.html
使用时
public void ConfigureServices(IServiceCollection services)
{
var authenticationProviderKey = "TestKey";
services.AddAuthentication()
.AddJwtBearer(authenticationProviderKey, x =>
{
});
}
在ocelot.json中使用“TestKey”,启动应用时会报错
无法启动 Ocelot,错误为:TestKey,AllowedScopes:[] is unsupported authentication provider
知道有什么问题吗?我是否需要在我的 IdentityServer 应用中特别设置一些东西?
【问题讨论】:
-
最重要的是,如何保护我的 ocelot api 网关,以便只有注册用户才能访问不同的端点,所有这些都使用 IS4 + AspNetIdentity + EF
标签: c# .net-core identityserver4 api-gateway ocelot