Exemple #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);
            }
        }
Exemple #2
0
        private void SaveSessionHeaderInfoFromRoute(string channelId)
        {
            if (!string.IsNullOrEmpty(channelId))
            {
                if (SessionHeaderInfo == null)
                {
                    SessionHeaderInfo = new Model.Common.SessionHeaderInfo(Host);
                }
                SetSessionRouteChannelInfo(channelId);
            }

            SessionCookieHelper <ISessionHeaderInfo> .Save(SessionHeaderInfo, Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName, Constants.SecurityKey.key, Constants.SecurityKey.IV);
        }
Exemple #3
0
        private void SaveSessionHeaderInfo(string channelId, string promotionCode)
        {
            if (!string.IsNullOrEmpty(channelId))
            {
                if (SessionHeaderInfo == null)
                {
                    SessionHeaderInfo = new Model.Common.SessionHeaderInfo(Host);
                }
                SessionHeaderInfo.ChannelId     = channelId;
                SessionHeaderInfo.PromotionCode = promotionCode;
            }

            SessionCookieHelper <ISessionHeaderInfo> .Save(SessionHeaderInfo, Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName, Constants.SecurityKey.key, Constants.SecurityKey.IV);
        }