if (defaultSessionConfig != null) { config = new ServletSessionConfig(); if (defaultSessionConfig.getName() != null) { config.setName(defaultSessionConfig.getName()); if (defaultSessionConfig.getDomain() != null) { config.setDomain(defaultSessionConfig.getDomain()); if (defaultSessionConfig.getHttpOnly() != null) { config.setHttpOnly(defaultSessionConfig.getHttpOnly()); if (defaultSessionConfig.getSecure() != null) { config.setSecure(defaultSessionConfig.getSecure()); if (defaultSessionConfig.getMaxAge() != null) { config.setMaxAge(defaultSessionConfig.getMaxAge()); if (defaultSessionConfig.getComment() != null) { config.setComment(defaultSessionConfig.getComment());
public SessionCookieConfig getConfig(final OperationContext context, final ModelNode model) throws OperationFailedException { if(!model.isDefined()) { return null; } ModelNode nameValue = NAME.resolveModelAttribute(context, model); ModelNode domainValue = DOMAIN.resolveModelAttribute(context, model); ModelNode commentValue = COMMENT.resolveModelAttribute(context, model); ModelNode secureValue = SECURE.resolveModelAttribute(context, model); ModelNode httpOnlyValue = HTTP_ONLY.resolveModelAttribute(context, model); ModelNode maxAgeValue = MAX_AGE.resolveModelAttribute(context, model); final String name = nameValue.isDefined() ? nameValue.asString() : null; final String domain = domainValue.isDefined() ? domainValue.asString() : null; final String comment = commentValue.isDefined() ? commentValue.asString() : null; final Boolean secure = secureValue.isDefined() ? secureValue.asBoolean() : null; final Boolean httpOnly = httpOnlyValue.isDefined() ? httpOnlyValue.asBoolean() : null; final Integer maxAge = maxAgeValue.isDefined() ? maxAgeValue.asInt() : null; return new SessionCookieConfig(name, domain, comment, httpOnly, secure, maxAge); }
/** * {@inheritDoc} * * @return overridden session cookie name if defined, otherwise {@link io.undertow.server.session.SessionCookieConfig#DEFAULT_SESSION_ID} */ @Override public String getSessionCookieName() { SessionCookieConfig override = server.getServletContainer().getSessionCookieConfig(); if (override == null || override.getName() == null) { return io.undertow.server.session.SessionCookieConfig.DEFAULT_SESSION_ID; } return override.getName(); }
if (defaultSessionConfig != null) { config = new ServletSessionConfig(); if (defaultSessionConfig.getName() != null) { config.setName(defaultSessionConfig.getName()); if (defaultSessionConfig.getDomain() != null) { config.setDomain(defaultSessionConfig.getDomain()); if (defaultSessionConfig.getHttpOnly() != null) { config.setHttpOnly(defaultSessionConfig.getHttpOnly()); if (defaultSessionConfig.getSecure() != null) { config.setSecure(defaultSessionConfig.getSecure()); if (defaultSessionConfig.getMaxAge() != null) { config.setMaxAge(defaultSessionConfig.getMaxAge()); if (defaultSessionConfig.getComment() != null) { config.setComment(defaultSessionConfig.getComment());
public SessionCookieConfig getConfig(final OperationContext context, final ModelNode model) throws OperationFailedException { if(!model.isDefined()) { return null; } ModelNode nameValue = NAME.resolveModelAttribute(context, model); ModelNode domainValue = DOMAIN.resolveModelAttribute(context, model); ModelNode commentValue = COMMENT.resolveModelAttribute(context, model); ModelNode secureValue = SECURE.resolveModelAttribute(context, model); ModelNode httpOnlyValue = HTTP_ONLY.resolveModelAttribute(context, model); ModelNode maxAgeValue = MAX_AGE.resolveModelAttribute(context, model); final String name = nameValue.isDefined() ? nameValue.asString() : null; final String domain = domainValue.isDefined() ? domainValue.asString() : null; final String comment = commentValue.isDefined() ? commentValue.asString() : null; final Boolean secure = secureValue.isDefined() ? secureValue.asBoolean() : null; final Boolean httpOnly = httpOnlyValue.isDefined() ? httpOnlyValue.asBoolean() : null; final Integer maxAge = maxAgeValue.isDefined() ? maxAgeValue.asInt() : null; return new SessionCookieConfig(name, domain, comment, httpOnly, secure, maxAge); }
if (defaultSessionConfig != null) { config = new ServletSessionConfig(); if (defaultSessionConfig.getName() != null) { config.setName(defaultSessionConfig.getName()); if (defaultSessionConfig.getDomain() != null) { config.setDomain(defaultSessionConfig.getDomain()); if (defaultSessionConfig.getHttpOnly() != null) { config.setHttpOnly(defaultSessionConfig.getHttpOnly()); if (defaultSessionConfig.getSecure() != null) { config.setSecure(defaultSessionConfig.getSecure()); if (defaultSessionConfig.getMaxAge() != null) { config.setMaxAge(defaultSessionConfig.getMaxAge()); if (defaultSessionConfig.getComment() != null) { config.setComment(defaultSessionConfig.getComment());
public SessionCookieConfig getConfig(final OperationContext context, final ModelNode model) throws OperationFailedException { if(!model.isDefined()) { return null; } ModelNode nameValue = NAME.resolveModelAttribute(context, model); ModelNode domainValue = DOMAIN.resolveModelAttribute(context, model); ModelNode commentValue = COMMENT.resolveModelAttribute(context, model); ModelNode secureValue = SECURE.resolveModelAttribute(context, model); ModelNode httpOnlyValue = HTTP_ONLY.resolveModelAttribute(context, model); ModelNode maxAgeValue = MAX_AGE.resolveModelAttribute(context, model); final String name = nameValue.isDefined() ? nameValue.asString() : null; final String domain = domainValue.isDefined() ? domainValue.asString() : null; final String comment = commentValue.isDefined() ? commentValue.asString() : null; final Boolean secure = secureValue.isDefined() ? secureValue.asBoolean() : null; final Boolean httpOnly = httpOnlyValue.isDefined() ? httpOnlyValue.asBoolean() : null; final Integer maxAge = maxAgeValue.isDefined() ? maxAgeValue.asInt() : null; return new SessionCookieConfig(name, domain, comment, httpOnly, secure, maxAge); }