未为非Core客户端调用IdentityServer4 ProfileService

时间:2017-04-19 19:12:38

标签: asp.net-identity identityserver4

我已经实现了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实现中发出用户声明。任何人都可以建议一些解决方案吗?

1 个答案:

答案 0 :(得分:0)

确保在

中调用IprofileService实现

例如,如果" ProfileService"是实施

AddIdentityServer()..AddProfileService<ProfileService>();