Package io.undertow.server.session
Class SslSessionConfig
java.lang.Object
io.undertow.server.session.SslSessionConfig
- All Implemented Interfaces:
SessionConfig
Session config that stores the session ID in the current SSL session.
It allows for a fallback to be provided for non-ssl connections
- Author:
- Stuart Douglas
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.undertow.server.session.SessionConfig
SessionConfig.SessionCookieSource
-
Field Summary
Fields inherited from interface io.undertow.server.session.SessionConfig
ATTACHMENT_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionSslSessionConfig
(SessionConfig fallbackSessionConfig, SessionManager sessionManager) SslSessionConfig
(SessionManager sessionManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.findSessionId
(HttpServerExchange exchange) Retrieves a session id of an existing session from an exchange.rewriteUrl
(String originalUrl, String sessionId) sessionCookieSource
(HttpServerExchange exchange) void
setSessionId
(HttpServerExchange exchange, String sessionId) Attaches the session to the exchange.
-
Constructor Details
-
SslSessionConfig
-
SslSessionConfig
-
-
Method Details
-
setSessionId
Description copied from interface:SessionConfig
Attaches the session to the exchange. The method should attach the exchange under an attachment key, and should also modify the exchange to allow the session to be re-attached on the next request.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)
- Specified by:
setSessionId
in interfaceSessionConfig
- Parameters:
exchange
- The exchangesessionId
- The session
-
clearSession
Description copied from interface:SessionConfig
Clears this session from the exchange, removing the attachment and making any changes to the response necessary, such as clearing cookies.- Specified by:
clearSession
in interfaceSessionConfig
- Parameters:
exchange
- The exchangesessionId
- The session id
-
findSessionId
Description copied from interface:SessionConfig
Retrieves a session id of an existing session from an exchange.- Specified by:
findSessionId
in interfaceSessionConfig
- Parameters:
exchange
- The exchange- Returns:
- The session id, or null
-
sessionCookieSource
- Specified by:
sessionCookieSource
in interfaceSessionConfig
-
rewriteUrl
- Specified by:
rewriteUrl
in interfaceSessionConfig
-