Class CookieConfiguration
java.lang.Object
org.apache.camel.component.platform.http.cookie.CookieConfiguration
Attributes that are set when creating Cookies.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe CookieSameSitepolicy that declares whether a Cookie should be sent with cross-site requests. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final Stringstatic final CookieConfiguration.CookieSameSitestatic final boolean -
Constructor Summary
ConstructorsConstructorDescriptionCookieConfiguration(String cookiePath, String cookieDomain, Long cookieMaxAge, boolean cookieSecure, boolean cookieHttpOnly, CookieConfiguration.CookieSameSite cookieSameSite) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidsetCookieDomain(String cookieDomain) Sets which server can receive cookies.voidsetCookieHttpOnly(boolean cookieHttpOnly) Sets whether to prevent client side scripts from accessing created cookies.voidsetCookieMaxAge(Long cookieMaxAge) Sets the maximum cookie age in seconds.voidsetCookiePath(String cookiePath) Sets the URL path that must exist in the requested URL in order to send the Cookie.voidsetCookieSameSite(CookieConfiguration.CookieSameSite cookieSameSite) Sets whether to prevent the browser from sending cookies along with cross-site requests.voidsetCookieSecure(boolean cookieSecure) Sets whether the cookie is only sent to the server with an encrypted request over HTTPS.
-
Field Details
-
DEFAULT_PATH
- See Also:
-
DEFAULT_SECURE_FLAG
public static final boolean DEFAULT_SECURE_FLAG- See Also:
-
DEFAULT_HTTP_ONLY_FLAG
public static final boolean DEFAULT_HTTP_ONLY_FLAG- See Also:
-
DEFAULT_SAME_SITE
-
-
Constructor Details
-
CookieConfiguration
public CookieConfiguration() -
CookieConfiguration
public CookieConfiguration(String cookiePath, String cookieDomain, Long cookieMaxAge, boolean cookieSecure, boolean cookieHttpOnly, CookieConfiguration.CookieSameSite cookieSameSite)
-
-
Method Details
-
setCookiePath
Sets the URL path that must exist in the requested URL in order to send the Cookie. -
getCookiePath
-
setCookieDomain
Sets which server can receive cookies. -
getCookieDomain
-
setCookieMaxAge
Sets the maximum cookie age in seconds. -
getCookieMaxAge
-
setCookieSecure
public void setCookieSecure(boolean cookieSecure) Sets whether the cookie is only sent to the server with an encrypted request over HTTPS. -
isCookieSecure
public boolean isCookieSecure() -
setCookieHttpOnly
public void setCookieHttpOnly(boolean cookieHttpOnly) Sets whether to prevent client side scripts from accessing created cookies. -
isCookieHttpOnly
public boolean isCookieHttpOnly() -
setCookieSameSite
Sets whether to prevent the browser from sending cookies along with cross-site requests. -
getCookieSameSite
-