def reissueQueueCookie(self, event_id, cookie_validity_minutes, cookie_domain, is_cookie_http_only, is_cookie_secure, secret_key): cookie_key = UserInQueueStateCookieRepository.getCookieKey(event_id) cookie_value = self.httpContextProvider.getCookie(cookie_key) if cookie_value is None: return cookie_name_value_map = UserInQueueStateCookieRepository.__getCookieNameValueMap(cookie_value) if (not UserInQueueStateCookieRepository.__isCookieValid( secret_key, cookie_name_value_map, event_id, cookie_validity_minutes, True)): return fixed_cookie_validity_minutes = "" if "FixedValidityMins" in cookie_name_value_map: fixed_cookie_validity_minutes = cookie_name_value_map[ "FixedValidityMins"] cookie_value = UserInQueueStateCookieRepository.__createCookieValue( event_id, cookie_name_value_map["QueueId"], fixed_cookie_validity_minutes, cookie_name_value_map["RedirectType"], secret_key) self.httpContextProvider.setCookie( cookie_key, cookie_value, QueueitHelpers.getCookieExpirationDate(), cookie_domain, is_cookie_http_only, is_cookie_secure)
def reissueQueueCookie(self, eventId, cookieValidityMinutes, cookieDomain, secretKey): cookieKey = UserInQueueStateCookieRepository.getCookieKey(eventId) cookieValue = self.httpContextProvider.getCookie(cookieKey) if (cookieValue == None): return cookieNameValueMap = UserInQueueStateCookieRepository.__getCookieNameValueMap( cookieValue) if (not UserInQueueStateCookieRepository.__isCookieValid( secretKey, cookieNameValueMap, eventId, cookieValidityMinutes, True)): return fixedCookieValidityMinutes = "" if ("FixedValidityMins" in cookieNameValueMap): fixedCookieValidityMinutes = cookieNameValueMap[ "FixedValidityMins"] cookieValue = UserInQueueStateCookieRepository.__createCookieValue( eventId, cookieNameValueMap["QueueId"], fixedCookieValidityMinutes, cookieNameValueMap["RedirectType"], secretKey) self.httpContextProvider.setCookie( cookieKey, cookieValue, QueueitHelpers.getCookieExpirationDate(), cookieDomain)
def store(self, eventId, queueId, fixedCookieValidityMinutes, cookieDomain, redirectType, secretKey): cookieKey = UserInQueueStateCookieRepository.getCookieKey(eventId) cookieValue = UserInQueueStateCookieRepository.__createCookieValue( eventId, queueId, Utils.toString(fixedCookieValidityMinutes), redirectType, secretKey) self.httpContextProvider.setCookie( cookieKey, cookieValue, QueueitHelpers.getCookieExpirationDate(), cookieDomain)
def store(self, event_id, queue_id, fixed_cookie_validity_minutes, cookie_domain, is_cookie_http_only, is_cookie_secure, redirect_type, secret_key): cookie_key = UserInQueueStateCookieRepository.getCookieKey(event_id) cookie_value = UserInQueueStateCookieRepository.__createCookieValue( event_id, queue_id, Utils.toString(fixed_cookie_validity_minutes), redirect_type, secret_key) self.httpContextProvider.setCookie( cookie_key, cookie_value, QueueitHelpers.getCookieExpirationDate(), cookie_domain, is_cookie_http_only, is_cookie_secure)