Esempio n. 1
0
        public async Task <IActionResult> Logout(LogoutRequest request)
        {
            LogoutResponse response = await _authService.LogoutAysnc(request);

            if (response.IsValid())
            {
                return(Ok(response));
            }

            return(BadRequest(response.GetErrors()));
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AccountSettings accountSettings = new AccountSettings();

            LogoutResponse samlResponse = new LogoutResponse(accountSettings);
            samlResponse.LoadXmlFromBase64(Request.Form["SAMLResponse"]);
            if(samlResponse.IsValid())
            {
                HttpContext.Current.Session["user"] = "";
                lblMsg.Text = "<h1>You are logged out</h1>";
            }
            else
            {
                lblMsg.Text = "Logout failed";
            }
            //Response.Write(samlResponse.ToString());
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AccountSettings accountSettings = new AccountSettings();

            LogoutResponse samlResponse = new LogoutResponse(accountSettings);

            samlResponse.LoadXmlFromBase64(Request.Form["SAMLResponse"]);
            if (samlResponse.IsValid())
            {
                HttpContext.Current.Session["user"] = "";
                lblMsg.Text = "<h1>You are logged out</h1>";
            }
            else
            {
                lblMsg.Text = "Logout failed";
            }
            //Response.Write(samlResponse.ToString());
        }