Exemple #1
0
        public IQuickspatchPrincipal GetCurrentUser()
        {
            var principal = (HttpContext.User as IQuickspatchPrincipal);

            if (principal == null)
            {
                FormAuthenticationService.SignOut();
            }

            return(principal);
        }
Exemple #2
0
        public void SignOut()
        {
            //Nghiep Test Event User Login
            //var user = GetCurrentUser().User;
            //if (user != null)
            //{
            //    _systemEventService.Add(new SystemEvent
            //    {
            //        Description = string.Format(SystemMessageLookup.GetMessage("SystemEventLogOut"), "User", user.UserName)
            //    });
            //}
            FormAuthenticationService.SignOut();

            if (FederatedAuthentication.WSFederationAuthenticationModule != null)
            {
                FederatedAuthentication.WSFederationAuthenticationModule.SignOut();
                FederatedAuthentication.WSFederationAuthenticationModule.SignOut(true);
                FederatedAuthentication.SessionAuthenticationModule.SignOut();
            }
        }