rya*_*lcs 5 web-config wif asp.net-mvc-3 ws-federation
我看到FedMetadata文档可以提供注销通知和订阅端点,web.config定义了登录请求的发布者URL,但我无法找到WIF知道发送注销请求的位置.如果我使用的STS为登录和签出请求定义了不同的端点,我如何在代码中访问它或在web.config中设置它?
默认情况下,WIF 将重定向到与登录时使用的相同的 STS 端点以进行注销。要定向到不同的端点,您需要使用以下方法覆盖注销操作FederatedSignOut:
WSFederationAuthenticationModule authModule = FederatedAuthentication.WSFederationAuthenticationModule;
string signoutEndpoint = "http://STS/yourendpoint/"; // This can be stored in your configuration app settings
string signoutUrl = WSFederationAuthenticationModule.GetFederationPassiveSignOutUrl(signoutEndpoint, authModule.Realm, null);
WSFederationAuthenticationModule.FederatedSignOut(new Uri(signoutUrl), new Uri(currentPage));
Run Code Online (Sandbox Code Playgroud)
希望这有帮助。
| 归档时间: |
|
| 查看次数: |
1427 次 |
| 最近记录: |