1

我们有很多通过 thinktecture identityserver v2 进行通用身份验证的站点。

现在我们想要有登录到站点的日志。我们有一个自定义的 IUserRepository,我们可以在其中登录用户登录,但是我们如何继续并获取用户登录的站点?

当我们从一个站点跳到另一个站点时-怎么会被记录下来

如果没有对此的内置支持,那么修改代码的最佳位置在哪里?

似乎它可以在我可以基于uri获得领域WSFederationController的方法中完成。Issue

 public ActionResult Issue()
    {
        Tracing.Start("WS-Federation endpoint.");

        if (!ConfigurationRepository.WSFederation.Enabled && ConfigurationRepository.WSFederation.EnableAuthentication)
        {
            return new HttpNotFoundResult();
        }

        var message = WSFederationMessage.CreateFromUri(HttpContext.Request.Url);

        // sign in 
        var signinMessage = message as SignInRequestMessage;
        if (signinMessage != null)
        {
            // Is this a good place to log current user and the application the user is loggin into to db??? 
            // or does Thinktecture have some build in functionaltiy for this?


            return ProcessWSFederationSignIn(signinMessage, ClaimsPrincipal.Current);
        }

拉尔西

4

0 回答 0