Beispiel #1
0
        public override void Process(HttpRequestArgs args)
        {
            // Only act on requests against the logout URL
            if (!args.Context.Request.Url.AbsoluteUri.StartsWith(Settings.LogoutUrl))
            {
                return;
            }

            // Temporary so we can test log in and out with different user. Probably can delete this whole thing later.
            // unless we need to add a log out button.
            Sitecore.Security.Authentication.AuthenticationManager.Logout();

            _userDataService.DeleteUserIdamDataCookie(args.Context);
            _userDataService.DeleteAccountBalancesFromSession(args.Context);

            // Redirect the user to the SSO logout URL.
            WebUtil.Redirect(Settings.LogoutEndpoint);
        }
 private void LogoutAndClearUserData(HttpContext context)
 {
     AuthenticationManager.Logout();
     _userDataService.DeleteUserIdamDataCookie(context);
     _userDataService.DeleteAccountBalancesFromSession(context);
 }