public static CookieGenerationContext buildCookieGenerationContext(final TicketGrantingCookieProperties cookie) {
        val rememberMeMaxAge = getCookieMaxAge(cookie.getRememberMeMaxAge());
        val builder = buildCookieGenerationContextBuilder(cookie);
        return builder.rememberMeMaxAge(rememberMeMaxAge).build();
    }
Build cookie generation context.

@param cookie the cookie
@return the cookie generation context
core/cas-server-core-cookie-api/src/main/java/org/apereo/cas/web/support/CookieUtils.java