csharp 注销ACS

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 注销ACS相关的知识,希望对你有一定的参考价值。

public ActionResult LogOff()
{
    // Load Identity Configuration
    FederationConfiguration config = FederatedAuthentication.FederationConfiguration;

    // Get wtrealm from WsFederationConfiguation Section
    string wtrealm = config.WsFederationConfiguration.Realm;
    string wreply;

    // Construct wreply value from wtrealm (This will be the return URL to your app)
    wreply = wtrealm;

    // Read the ACS Ws-Federation endpoint from web.Config
    // something like "https://<your-namespace>.accesscontrol.windows.net/v2/wsfederation"
    string wsFederationEndpoint = ConfigurationManager.AppSettings["ida:Issuer"];

    SignOutRequestMessage signoutRequestMessage = new SignOutRequestMessage(new Uri(wsFederationEndpoint));

    signoutRequestMessage.Parameters.Add("wreply", wreply);
    signoutRequestMessage.Parameters.Add("wtrealm", wtrealm);

    FederatedAuthentication.SessionAuthenticationModule.SignOut();

    string signoutUrl = signoutRequestMessage.WriteQueryString();

    return this.Redirect(signoutUrl);
}

以上是关于csharp 注销ACS的主要内容,如果未能解决你的问题,请参考以下文章

csharp 注销应用程序用户数据解析脚本

docker 环境搭建

使用ACS人口普查API查询变量

ACS常用操作(实战)

oracle11g中SQL优化(SQL TUNING)新特性之Adaptive Cursor Sharing (ACS)

ACS130 Introduction to Systems