Package com.atlassian.confluence.util
Class CookieUtil
java.lang.Object
com.atlassian.confluence.util.CookieUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getSameSiteAttributeFromTomcatContext
(javax.servlet.http.HttpServletRequest request) Retrieves the `SameSite` attribute value from the Tomcat context by accessing the internal `Rfc6265CookieProcessor` object of the currently running application.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
CookieUtil
public CookieUtil()
-
-
Method Details
-
getSameSiteAttributeFromTomcatContext
public static String getSameSiteAttributeFromTomcatContext(javax.servlet.http.HttpServletRequest request) Retrieves the `SameSite` attribute value from the Tomcat context by accessing the internal `Rfc6265CookieProcessor` object of the currently running application. This method uses reflection to access private fields in the servlet context to navigate to the `StandardContext` instance, which contains the `CookieProcessor`. The `CookieProcessor` is then queried for its `SameSite` attribute value. If an error occurs or the value cannot be retrieved, a default value is returned.
-