use of lucee.runtime.listener.CookieData in project Lucee by lucee.
the class Cookie method doStartTag.
@Override
public int doStartTag() throws PageException {
Key key = KeyImpl.getInstance(name);
String appName = Login.getApplicationName(pageContext.getApplicationContext());
boolean isAppName = false;
if (KeyConstants._CFID.equalsIgnoreCase(key) || KeyConstants._CFTOKEN.equalsIgnoreCase(key) || (isAppName = key.equals(appName))) {
ApplicationContext ac = pageContext.getApplicationContext();
if (ac instanceof ApplicationContextSupport) {
ApplicationContextSupport acs = (ApplicationContextSupport) ac;
CookieData data = isAppName ? acs.getAuthCookie() : acs.getSessionCookie();
if (data != null && data.isDisableUpdate())
throw new ExpressionException("customize " + key + " is disabled!");
}
}
pageContext.cookieScope().setCookie(key, value, expires, secure, path, domain, httponly, preservecase, encode);
return SKIP_BODY;
}
Aggregations