我看到FedMetadata文档可以提供签名通知和订阅端点,并且Web.config定义了发行者在请求中的签名,但我找不到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));

希望这会有所帮助。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top