Beispiel #1
0
        private void ReadSessionHeaderInfo()
        {
            SessionHeaderInfo = SessionCookieHelper <ISessionHeaderInfo> .Get(Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName, Constants.SecurityKey.key, Constants.SecurityKey.IV);

            if (SessionHeaderInfo != null && !string.IsNullOrEmpty(Host) && string.Compare(SessionHeaderInfo.HeaderId, Host, true) != 0)
            {
                SessionHeaderInfo = null;
                SessionCookieHelper <ISessionHeaderInfo> .Clear(Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName);
            }
        }
Beispiel #2
0
 public static ICurrentUser GetUser()
 {
     return(SessionCookieHelper <ICurrentUser> .Get(Constants.SecurityKey.LoginedUserInfo_SessionName, Constants.SecurityKey.LoginedUserInfo_CookieName, Constants.SecurityKey.key, Constants.SecurityKey.IV));
 }