public class SessionCookieConfig extends Object implements SessionConfig
SessionConfig.SessionCookieSource
Modifier and Type | Field and Description |
---|---|
static String | DEFAULT_SESSION_ID |
ATTACHMENT_KEY
Constructor and Description |
---|
SessionCookieConfig() |
public static final String DEFAULT_SESSION_ID
public String rewriteUrl(String originalUrl, String sessionId)
rewriteUrl
in interface SessionConfig
public void setSessionId(HttpServerExchange exchange, String sessionId)
SessionConfig
Generally this will involve setting a cookie
Once a session has been attached it must be possible to retrieve it via SessionConfig.findSessionId(io.undertow.server.HttpServerExchange)
setSessionId
in interface SessionConfig
exchange
- The exchangesessionId
- The sessionpublic void clearSession(HttpServerExchange exchange, String sessionId)
SessionConfig
clearSession
in interface SessionConfig
exchange
- The exchangesessionId
- The session idpublic String findSessionId(HttpServerExchange exchange)
SessionConfig
findSessionId
in interface SessionConfig
exchange
- The exchangepublic SessionConfig.SessionCookieSource sessionCookieSource(HttpServerExchange exchange)
sessionCookieSource
in interface SessionConfig
public String getCookieName()
public SessionCookieConfig setCookieName(String cookieName)
public String getPath()
public SessionCookieConfig setPath(String path)
public String getDomain()
public SessionCookieConfig setDomain(String domain)
public boolean isDiscard()
public SessionCookieConfig setDiscard(boolean discard)
public boolean isSecure()
public SessionCookieConfig setSecure(boolean secure)
public boolean isHttpOnly()
public SessionCookieConfig setHttpOnly(boolean httpOnly)
public int getMaxAge()
public SessionCookieConfig setMaxAge(int maxAge)
public String getComment()
public SessionCookieConfig setComment(String comment)
Copyright © 2017 JBoss by Red Hat. All rights reserved.