Class SessionStorage


  • public class SessionStorage
    extends Object
    The SessionStorage class provides support to store the authentication data in an HTTP Session. Derivative work from inner class SessionStorage from https://github.com/apache/sling-org-apache-sling-auth-form/blob/master/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java
    • Constructor Detail

      • SessionStorage

        public SessionStorage​(String sessionAttributeName)
    • Method Detail

      • setString

        public void setString​(javax.servlet.http.HttpServletRequest request,
                              String info)
        Setting String Attributes. Store string info in an http session attribute.
        Parameters:
        request - http request of the user
        info - set the value of the attribute
      • getString

        public String getString​(javax.servlet.http.HttpServletRequest request)
        Getting String Attributes
        Parameters:
        request - http request of the user
        Returns:
        value of the session attribute
      • clear

        public void clear​(javax.servlet.http.HttpServletRequest request)
        Remove this attribute from the http session
        Parameters:
        request - http request of the user