public class HeaderWebSessionIdResolver extends Object implements WebSessionIdResolver
WebSessionIdResolver
.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HEADER_NAME
Default value for
setHeaderName(String) . |
Constructor and Description |
---|
HeaderWebSessionIdResolver() |
Modifier and Type | Method and Description |
---|---|
void |
expireSession(ServerWebExchange exchange)
Instruct the client to end the current session.
|
String |
getHeaderName()
Return the configured header name.
|
List<String> |
resolveSessionIds(ServerWebExchange exchange)
Resolve the session id's associated with the request.
|
void |
setHeaderName(String headerName)
Set the name of the session header to use for the session id.
|
void |
setSessionId(ServerWebExchange exchange,
String id)
Send the given session id to the client.
|
public static final String DEFAULT_HEADER_NAME
setHeaderName(String)
.public void setHeaderName(String headerName)
By default set to DEFAULT_HEADER_NAME
headerName
- the header namepublic String getHeaderName()
public List<String> resolveSessionIds(ServerWebExchange exchange)
WebSessionIdResolver
resolveSessionIds
in interface WebSessionIdResolver
exchange
- the current exchangepublic void setSessionId(ServerWebExchange exchange, String id)
WebSessionIdResolver
setSessionId
in interface WebSessionIdResolver
exchange
- the current exchangeid
- the session idpublic void expireSession(ServerWebExchange exchange)
WebSessionIdResolver
expireSession
in interface WebSessionIdResolver
exchange
- the current exchange