public interface SessionConfig
Generally this will just set a cookie.
Modifier and Type | Interface and Description |
---|---|
static class |
SessionConfig.SessionCookieSource |
Modifier and Type | Field and Description |
---|---|
static AttachmentKey<SessionConfig> |
ATTACHMENT_KEY |
Modifier and Type | Method and Description |
---|---|
void |
clearSession(HttpServerExchange exchange,
String sessionId)
Clears this session from the exchange, removing the attachment and making any changes to the response necessary,
such as clearing cookies.
|
String |
findSessionId(HttpServerExchange exchange)
Retrieves a session id of an existing session from an exchange.
|
String |
rewriteUrl(String originalUrl,
String sessionId) |
SessionConfig.SessionCookieSource |
sessionCookieSource(HttpServerExchange exchange) |
void |
setSessionId(HttpServerExchange exchange,
String sessionId)
Attaches the session to the exchange.
|
static final AttachmentKey<SessionConfig> ATTACHMENT_KEY
void setSessionId(HttpServerExchange exchange, String sessionId)
Generally this will involve setting a cookie
Once a session has been attached it must be possible to retrieve it via
findSessionId(io.undertow.server.HttpServerExchange)
exchange
- The exchangesessionId
- The sessionvoid clearSession(HttpServerExchange exchange, String sessionId)
exchange
- The exchangesessionId
- The session idString findSessionId(HttpServerExchange exchange)
exchange
- The exchangeSessionConfig.SessionCookieSource sessionCookieSource(HttpServerExchange exchange)
Copyright © 2021 JBoss by Red Hat. All rights reserved.