Class CookieUtil
- java.lang.Object
-
- com.activeviam.risk.security.impl.CookieUtil
-
public class CookieUtil extends Object
Utility class to configure the cookies.For now the configuration consists of
The name of the cookie
The life time of the cookie (either defined by the property
JwtConfig.EXPIRATION_PROPERTY
in src/main/resources/jwt.properties or using the default valueJwtConfig.DEFAULT_EXPIRATION
)This class is used, in particular, to align the lifetime of the cookie with that of the JWT token. Must be done when there are several servers (AP, Content server, ActiveMonitor) with the same URL but running on different ports. Cookies ignore the port (See RFC 6265).
- Author:
- ActiveViam
-
-
Constructor Summary
Constructors Constructor Description CookieUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
configure(javax.servlet.SessionCookieConfig config, String cookieName)
Configures the cookies
-
-
-
Method Detail
-
configure
public static void configure(javax.servlet.SessionCookieConfig config, String cookieName)
Configures the cookies- Parameters:
config
- cookie configurationcookieName
- the name of the cookies- See Also:
SessionCookieConfig.setName(String)
,SessionCookieConfig.setMaxAge(int)
-
-