Class 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 value JwtConfig.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 Detail

      • CookieUtil

        public CookieUtil()
    • Method Detail

      • configure

        public static void configure​(javax.servlet.SessionCookieConfig config,
                                     String cookieName)
        Configures the cookies
        Parameters:
        config - cookie configuration
        cookieName - the name of the cookies
        See Also:
        SessionCookieConfig.setName(String), SessionCookieConfig.setMaxAge(int)