Interface SessionStateCleanable


public interface SessionStateCleanable
A base interface to perform session cleanup on ApplicationSessionStateSupport. The cleanSessionState(org.sourceid.saml20.adapter.state.ApplicationSessionStateSupport, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method is called when the user's idle or max timeouts have been exceeded. Implementations of this class should remove all attributes tied to the specific application session.
Since:
9.1
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    cleanSessionState(ApplicationSessionStateSupport applicationSessionStateSupport, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
    Clean session state of the attributes that are no longer necessary.
    void
    cleanSessionState(ApplicationSessionStateSupport applicationSessionStateSupport, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 13.1.
  • Method Details

    • cleanSessionState

      @Deprecated(since="13.1", forRemoval=true) void cleanSessionState(ApplicationSessionStateSupport applicationSessionStateSupport, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clean session state of the attributes that are no longer necessary. For example:
       
        new ApplicationSessionStateSupport("MyApplicationKey", (sessionStateSupport, req, resp) -> sessionStateSupport.removeAttribute("AttributeKeyToRemove", req, resp));
       
       
      Parameters:
      applicationSessionStateSupport - the ApplicationSessionStateSupport instance that is calling cleanSessionState.
      req - The HttpServletRequest
      resp - The HttpServletResponse
    • cleanSessionState

      default void cleanSessionState(ApplicationSessionStateSupport applicationSessionStateSupport, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
      Clean session state of the attributes that are no longer necessary. For example:
       
        new ApplicationSessionStateSupport("MyApplicationKey", (sessionStateSupport, req, resp) -> sessionStateSupport.removeAttribute("AttributeKeyToRemove", req, resp));
       
       
      Parameters:
      applicationSessionStateSupport - the ApplicationSessionStateSupport instance that is calling cleanSessionState.
      req - The HttpServletRequest
      resp - The HttpServletResponse
      Since:
      13.1