Package org.springframework.web.server.session

# Interface WebSessionIdResolver

All Known Implementing Classes:
  `CookieWebSessionIdResolver`, `HeaderWebSessionIdResolver`

public interface WebSessionIdResolver
Contract for session ID resolution strategies. Allows for session ID resolution through the request and for sending the session ID or expiring the session through the response.

Since:
  5.0
Author:
  Rossen Stoyanchev
See Also:
  - `CookieWebSessionIdResolver`

## Method Summary

Modifier and Type
Method
Description
`void`
`expireSession(ServerWebExchange exchange)`
Instruct the client to end the current session.
`List<String>`
`resolveSessionIds(ServerWebExchange exchange)`
Resolve the session IDs associated with the request.
`void`
`setSessionId(ServerWebExchange exchange, String sessionId)`
Send the given session ID to the client.

## Method Details

### resolveSessionIds

List<String> resolveSessionIds(ServerWebExchange exchange)
Resolve the session IDs associated with the request.

Parameters:
  `exchange` - the current exchange
Returns:
  the session IDs or an empty list

### setSessionId

void setSessionId(ServerWebExchange exchange, String sessionId)
Send the given session ID to the client.

Parameters:
  `exchange` - the current exchange
  `sessionId` - the session ID

### expireSession

void expireSession(ServerWebExchange exchange)
Instruct the client to end the current session.

Parameters:
  `exchange` - the current exchange