我已经实现了IdentityServer4。我正面临着从非Core Mvc 客户端验证用户身份的问题,因为在登录验证后未调用 IProfileService 。 当我尝试从 .NetCore Mvc 客户端登录时,工作正常。
Here is my Mvc.Net Client configurations
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
AuthenticationType = "oidc",
SignInAsAuthenticationType = "Cookies",
Authority = "http://localhost:5070/",
RedirectUri = "http://localhost:65156/signin-oidc",
ResponseType = "code id_token",
ClientId = "Justt-IWA-001113",
ClientSecret = "!Erty#@asd",
Scope = "openid profile SavingsAPI",
});
我需要在ProfileService实现中发出用户声明。任何人都可以建议一些解决方案吗?
答案 0 :(得分:0)
确保在
中调用IprofileService实现例如,如果" ProfileService"是实施
AddIdentityServer()..AddProfileService<ProfileService>();