2017-04-27 66 views
10

我已经建立opeiddict作为独立的Web应用程序作为授权服务器。我陷入了一个小问题,那就是如何通过客户端Web应用程序的链接直接进入用户注册页面。现在我可以去登录页面,作为你的示例:如何到达openiddict授权服务器的注册页面?

public ActionResult SignIn() { 
      // Instruct the OIDC client middleware to redirect the user agent to the identity provider. 
      // Note: the authenticationType parameter must match the value configured in Startup.cs 
      return new ChallengeResult(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties { 
       RedirectUri = "/" 
      }); 
     } 

有没有办法去认证服务器帐户/注册从客户端应用程序?

+0

赛义德,Zafrul,请让我知道如果你需要更多的东西在响应/应答的方式。 –

回答

3

它看起来像你可以在重定向设置网址。请参见下面的代码片段:

[AllowAnonymous] 
public IActionResult SignIn() 
{ 
    return new ChallengeResult(
     OpenIdConnectDefaults.AuthenticationScheme, 
     new AuthenticationProperties 
     { 
      IsPersistent = true, 
      RedirectUri = Url.Action("SignInCallback", "Account") 
     }); 
} 

请参阅该文档在这里:Initiating the authentication flow