简体   繁体   English

ADFS 2.0单点注销无法注销

[英]ADFS 2.0 Single Sign Out Not Signing Out

I'm having an issue with a web application I'm writing that implements ADFS 2.0. 我正在编写一个实现ADFS 2.0的Web应用程序的问题。 I am able to get users to sign in just fine, but I do have situations where the user needs to be able to sign out of the application to allow other users to sign in. 我能够让用户登录得很好,但我确实有用户需要能够退出应用程序以允许其他用户登录的情况。

What happens is when the user clicks the sign out button it runs through the following method: 当用户单击它通过以下方法运行的注销按钮时会发生什么:

    public void SignOut()
    {
        WSFederationAuthenticationModule.FederatedSignOut(new Uri(Properties.Settings.Default.ADFSIssuer),
            new Uri(Properties.Settings.Default.ADFSRealm));
    }

My ADFS Issuer is the https://adfs.domain.com/adfs/ls/ piece, and my ADFS Realm is the main url of my web application. 我的ADFS Issuer是https://adfs.domain.com/adfs/ls/ ,我的ADFS Realm是我的Web应用程序的主要URL。

The application appears to have then signed out. 该应用程序似乎已经退出。 When another user clicks the Login button, it automatically signs them in as the previous user without prompting for credentials. 当另一个用户单击“登录”按钮时,它会自动将其作为上一个用户登录,而不会提示输入凭据。

I've looked at the following resources for assistance and nothing has worked: 我查看了以下资源以获得帮助,但没有任何工作:

https://github.com/thinktecture/Thinktecture.IdentityServer.v2/issues/195 http://social.technet.microsoft.com/wiki/contents/articles/1439.ad-fs-how-to-invoke-a-ws-federation-sign-out.aspx https://github.com/thinktecture/Thinktecture.IdentityServer.v2/issues/195 http://social.technet.microsoft.com/wiki/contents/articles/1439.ad-fs-how-to-invoke-a -ws-联合会-登录out.aspx

Am I not supposed to be able to signout of an ADFS application without closing the browser? 我不应该在不关闭浏览器的情况下注销ADFS应用程序吗?

I am only guessing but I suspect that your adfs is configurd for windows authentication while your application has the Login button (it is not clear from your description). 我只猜测,但我怀疑你的adfs配置为windows身份验证,而你的应用程序有Login按钮(从你的描述中不清楚)。

If this is the case then you can't really log out from already authenticated adfs and it happily reissues the token upon the next request from the application. 如果是这种情况,那么您无法真正从已经过身份验证的adfs注销,并且很高兴在应用程序的下一个请求时重新发出令牌。 You can't do anything about it since the authentication is performed with ntlm/kerberos and this is the browser that keeps your credentials until you close it. 您无法对此进行任何操作,因为使用ntlm / kerberos执行身份验证,这是在您关闭凭据之前保留凭据的浏览器。

The solution would be to change adfs to Forms mode (switch the order of providers in adfs web.config) so that not only the adfs has its own cookies but also these cookies are truly removed when you issue the sign out message. 解决方案是将adfs更改为Forms模式(在adfs web.config中切换提供程序的顺序),这样不仅adfs有自己的cookie,而且当您发出注销消息时,这些cookie也会被真正删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM