1
我们使用IdentityServer作为我们的Web应用程序和API资源的openid提供程序。 我想在身份服务器上公开一个用于编辑用户的安全api端点,不知何故,我无法配置工作。我的客户是有角度的,我有一个有效的持票人令牌。身份服务器4在同一项目上保护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
});
任何帮助将不胜感激。
这是一个好的做法呢?看起来更像是一种对我的工作。因为我必须为自己的项目指定权限。 – aurimas
您必须映射路径才能拥有此功能,否则管道将开始互相覆盖。最好的做法是让他们完全分开的项目。 –
@adem caglin,你是如何自动获得授权URL的? – blgrnboy