use of com.sun.enterprise.web.session.WebSessionCookieConfig.CookieSecureType in project Payara by payara.
the class PwcCoyoteRequest method configureSessionCookie.
/*
* Configures the given JSESSIONID cookie with the cookie-properties from
* sun-web.xml.
*
* @param cookie The JSESSIONID cookie to be configured
*/
@Override
public void configureSessionCookie(Cookie cookie) {
super.configureSessionCookie(cookie);
PwcWebModule wm = (PwcWebModule) getContext();
WebSessionCookieConfig cookieConfig = (WebSessionCookieConfig) wm.getSessionCookieConfig();
CookieSecureType type = cookieConfig.getSecure();
if (CookieSecureType.TRUE == type) {
cookie.setSecure(true);
} else if (CookieSecureType.FALSE == type) {
cookie.setSecure(false);
} else {
cookie.setSecure(isSecure());
}
}
Aggregations