【发布时间】:2017-03-12 09:14:36
【问题描述】:
我们使用 IdentityServer 作为我们的 Web 应用程序和 API 资源的 openid 提供程序。 我想在身份服务器上公开一个安全的 api 端点来编辑用户,不知何故我无法使配置工作。我的客户是有角的,我有一个有效的不记名令牌。
app.UseCors("AllowSpecificOrigin");
app.UseIdentity();
app.UseIdentityServer();
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationScheme = "Cookies"
});
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
{
Authority = Configuration["AuthServerUrl"],
ScopeName = "api",
AutomaticAuthenticate = true,
AutomaticChallenge = true,
RequireHttpsMetadata = false
});
我们将不胜感激。
【问题讨论】:
标签: identityserver4