我试图配置我的Identityserver4使用ADFS 4.0作为外部提供程序。 我已经配置如下:Identityserver4与ADFS 4.0,不能得到Userinfo或声明
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
ClientId = "60b3d106-d155-4f9f-ba75-84b8078829fa",
AuthenticationScheme = "oidc",
PostLogoutRedirectUri = "http://localhost:5000",
DisplayName = "ADFS TEST Domain",
MetadataAddress = "https://srv2016dc01.test.local/adfs/.well-known/openid-configuration",
SaveTokens = true,
GetClaimsFromUserInfoEndpoint = true
});
似乎工作,因为我可以登录并得到一些索赔回: Claims get back from ADFS
但它看起来并不像该用户信息端点将被调用... 否则,它应该是更多的声明,并且我看不到在ADFS服务器的DEbug日志中调用UserInfo端点。
我自己也尝试在这个环节来调用用户信息端点的代码,如: ASP.NET Identity (with IdentityServer4) get external resource oauth access token
但在“等待_signInManager.UpdateExternalAuthenticationTokensAsync(信息);”我没有得到一个access_token回来,只有一个id_token ...
有没有人有ADFS 4.0或至少与任何其他外部OpenIdConnect服务器Identityserver4上的工作示例?
是否有任何其他方式从UserInfo端点获取所有信息?
我需要从经过身份验证的用户角色声明中获取组Memeberships,以获得WebApi资源的授予权限。