org.springframework.web.server.session

Class HeaderWebSessionIdResolver

  • java.lang.Object
    • org.springframework.web.server.session.HeaderWebSessionIdResolver
    • Constructor Detail

      • HeaderWebSessionIdResolver

        public HeaderWebSessionIdResolver()
    • Method Detail

      • setHeaderName

        public void setHeaderName(java.lang.String headerName)
        Set 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
      • getHeaderName

        public java.lang.String getHeaderName()
        Return the configured header name.
        Returns:
        the configured header name
      • resolveSessionIds

        public java.util.List<java.lang.String> resolveSessionIds(ServerWebExchange exchange)
        Description copied from interface: WebSessionIdResolver
        Resolve the session id's associated with the request.
        Specified by:
        resolveSessionIds in interface WebSessionIdResolver
        Parameters:
        exchange - the current exchange
        Returns:
        the session id's or an empty list