public class SslSessionConfig extends Object implements SessionConfig
It allows for a fallback to be provided for non-ssl connections
SessionConfig.SessionCookieSource
ATTACHMENT_KEY
Constructor and Description |
---|
SslSessionConfig(SessionConfig fallbackSessionConfig,
SessionManager sessionManager) |
SslSessionConfig(SessionManager sessionManager) |
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.
|
public SslSessionConfig(SessionConfig fallbackSessionConfig, SessionManager sessionManager)
public SslSessionConfig(SessionManager sessionManager)
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 rewriteUrl(String originalUrl, String sessionId)
rewriteUrl
in interface SessionConfig
Copyright © 2019 JBoss by Red Hat. All rights reserved.