2017-06-09 48 views
0

我有关于此功能的问题。 登录操作适用于ADFS并返回到AuthServices/Acs 但注销操作不会调用ADFS并直接重定向到returnUrl参数(使用fiddler检查它)。 我打电话此链接:/AuthServices/Logout?ReturnUrl=~/&Status=LoggedOutKentor MVC注销不呼叫注销网址

web.config中被设置为这样:

<kentor.authServices entityId="https://localhost:2181/AuthServices" returnUrl="https://localhost:2181/"> 
    <identityProviders> 
     <add 
     entityId="https://ADFS DOMAIN/adfs/services/trust" 
     signOnUrl="https://ADFS DOMAIN/adfs/ls" 
     logoutUrl="https://ADFS DOMAIN/adfs/ls/?wa=wsignout1.0" 
     binding="HttpPost" 
     allowUnsolicitedAuthnResponse="true" 
     metadataLocation="https://ADFS DOMAIN/FederationMetadata/2007-06/FederationMetadata.xml" 
     wantAuthnRequestsSigned="true"> 
     <signingCertificate fileName="~/App_Data/*****.cer" /> 
     </add> 
    </identityProviders> 
    </kentor.authServices> 

如果我在另一个选项卡推出https://ADFS DOMAIN/adfs/ls/?wa=wsignout1.0,这是工作,我登录页面上的返回从我的网站。

所以它似乎是一个内部问题来检索logouturl并发送它?

感谢您的帮助。

回答

0

有许多问题需要之前注销请求将发出满足的要求:

  1. 你需要有一个http://kentor.se/AuthServices/LogoutNameIdentifier要求及其发行人有权匹配你要登出IDP从。
  2. 您需要拥有http://kentor.se/AuthServices/SessionIndex声明。
  3. 你AuthServices IDP配置需要一个logoutUrl(我看你指定这一点,但也许更容易让AuthServices从元数据读取它)
  4. 您指定与任何签名或两种用途的ServiceCertificate(即不只是加密)
  5. 你AuthServices IDP配置有DisableOutboundLogoutRequests = 假(这是默认)

失踪索赔(前两个点)是最有可能的问题,如果您有登录过程中的一些声明转换发生或你是不是保留原来的ClaimsIdent性。另请参阅有关ClaimsAuthenticationManager的文档,例如https://github.com/KentorIT/authservices/blob/master/doc/ClaimsAuthenticationManager.md

您可以打开日志记录,看看这些点都没有: https://github.com/KentorIT/authservices/blob/v0.21.2/Kentor.AuthServices/WebSSO/LogOutCommand.cs#L155-L170

+0

谢谢您的答复。 ADFS不会将claimtype发送为http://kentor.se/AuthServices/LogoutNameIdentifier或http://kentor.se/AuthServices/SessionIndex。我如何设置web.config(或者也许是adfs)来做到这一点?但adfs不在我身边。 –

+0

ADFS不发送它们,但默认的AuthServices ACS代码在登录过程中将它们添加到标识中。我在 – explunit

+0

上面的答案中添加了ClaimsAuthenticationManager的链接。另请参阅此处的一些讨论:https://github.com/KentorIT/authservices/issues/665 – explunit