Class HeaderWebSessionIdResolver
java.lang.Object
org.springframework.web.server.session.HeaderWebSessionIdResolver
- All Implemented Interfaces:
- WebSessionIdResolver
Request and response header-based 
WebSessionIdResolver.- Since:
- 5.0
- Author:
- Greg Turnquist, Rob Winch
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidexpireSession(ServerWebExchange exchange) Instruct the client to end the current session.Get the configured header name.resolveSessionIds(ServerWebExchange exchange) Resolve the session IDs associated with the request.voidsetHeaderName(String headerName) Set the name of the session header to use for the session ID.voidsetSessionId(ServerWebExchange exchange, String id) Send the given session ID to the client.
- 
Field Details- 
DEFAULT_HEADER_NAMEDefault value forsetHeaderName(String).- See Also:
 
 
- 
- 
Constructor Details- 
HeaderWebSessionIdResolverpublic HeaderWebSessionIdResolver()
 
- 
- 
Method Details- 
setHeaderNameSet the name of the session header to use for the session ID.The name is used to extract the session ID from the request headers as well to set the session ID on the response headers. By default set to DEFAULT_HEADER_NAME- Parameters:
- headerName- the header name
 
- 
getHeaderNameGet the configured header name.- Returns:
- the configured header name
 
- 
resolveSessionIdsDescription copied from interface:WebSessionIdResolverResolve the session IDs associated with the request.- Specified by:
- resolveSessionIdsin interface- WebSessionIdResolver
- Parameters:
- exchange- the current exchange
- Returns:
- the session IDs or an empty list
 
- 
setSessionIdDescription copied from interface:WebSessionIdResolverSend the given session ID to the client.- Specified by:
- setSessionIdin interface- WebSessionIdResolver
- Parameters:
- exchange- the current exchange
- id- the session ID
 
- 
expireSessionDescription copied from interface:WebSessionIdResolverInstruct the client to end the current session.- Specified by:
- expireSessionin interface- WebSessionIdResolver
- Parameters:
- exchange- the current exchange
 
 
-