public void Process(DoLogoutPipelineArgs args)
        {
            if (args != null && WsFederatedSiteInfo.FastIsFederatedCheck(Context.Site))
            {
                Item       startItem  = Context.Database.GetItem(Context.Site.StartPath);
                UrlOptions urlOptions = UrlOptions.DefaultOptions;
                urlOptions.AlwaysIncludeServerUrl = true;

                args.OwinAuthenticationProperties              = new AuthenticationProperties();
                args.OwinAuthenticationProperties.RedirectUri  = LinkManager.GetItemUrl(startItem, urlOptions);
                args.OwinAuthenticationProperties.AllowRefresh = false;
            }
            else if (args != null && OpenIdConnectSiteInfo.FastUsesOpenIdConnectCheck(Context.Site))
            {
                OpenIdConnectSiteInfo site = new OpenIdConnectSiteInfo(Context.Site);

                args.OwinAuthenticationProperties              = new AuthenticationProperties();
                args.OwinAuthenticationProperties.RedirectUri  = site.PostlogoutRedirectUri;
                args.OwinAuthenticationProperties.AllowRefresh = false;
            }
            else
            {
                // No OWIN imlementation found, continue process
            }
        }
Exemple #2
0
        public void Process(DoLogoutPipelineArgs args)
        {
            if (args != null)
            {
                string[] authTypes =
                    args.Request.GetOwinContext()
                    .Authentication.GetAuthenticationTypes()
                    .Select(at => at.AuthenticationType)
                    .ToArray();

                if (args.OwinAuthenticationProperties != null)
                {
                    args.Request.GetOwinContext()
                    .Authentication.SignOut(
                        args.OwinAuthenticationProperties,
                        authTypes);
                }
                else
                {
                    args.Request.GetOwinContext()
                    .Authentication.SignOut(authTypes);
                }
            }
        }
Exemple #3
0
 public void Process(DoLogoutPipelineArgs args)
 {
     HttpContext.Current.Session.Abandon();
 }
Exemple #4
0
 public void Process(DoLogoutPipelineArgs args)
 {
     AuthenticationManager.Logout();
 }