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
    void
    cleanSessionState(ApplicationSessionStateSupport applicationSessionStateSupport, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
    Clean session state of the attributes that are no longer necessary.
  • Method Details

    • cleanSessionState

      void cleanSessionState(ApplicationSessionStateSupport applicationSessionStateSupport, javax.servlet.http.HttpServletRequest req, javax.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