Class CookieUtils


  • public class CookieUtils
    extends Object
    Deprecated.
    As of OpenSSO version 8.0 CookieUtils
    Implements utility methods for handling Cookie.
    • Constructor Summary

      Constructors 
      Constructor Description
      CookieUtils()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static String checkDoubleQuote​(String cookie)
      Deprecated.
      Check cookie value whether it has double quote or not.
      static String getAmCookieName()
      Deprecated.
      Gets property value of "com.iplanet.am.cookie.name"
      static String getAmPCookieName()
      Deprecated.
      Gets property value of "com.iplanet.am.pcookie.name"
      static Set getCdssoCookiedomain()
      Deprecated.
      Gets property value of "com.iplanet.services.cdsso.cookiedomain"
      static jakarta.servlet.http.Cookie[] getCookieArrayFromReq​(jakarta.servlet.http.HttpServletRequest req)
      Deprecated.
      Gets Array of cookie in servlet request
      static jakarta.servlet.http.Cookie getCookieFromReq​(jakarta.servlet.http.HttpServletRequest req, String name)
      Deprecated.
      Gets cookie object that has mached name in servlet request
      static String getCookieValue​(jakarta.servlet.http.Cookie cookie)
      Deprecated.
      Gets normalized value of cookie
      static String getCookieValueFromReq​(jakarta.servlet.http.HttpServletRequest req, String name)
      Deprecated.
      Gets value of cookie that has mached name in servlet request
      static String getFedCookieName()
      Deprecated.
      Gets property value of "com.sun.identity.federation.fedCookieName"
      static boolean isCookieSecure()
      Deprecated.
      Gets property value of "com.iplanet.am.cookie.secure"
      static jakarta.servlet.http.Cookie newCookie​(String name, String value)
      Deprecated.
      Constructs a cookie with a specified name and value.
      static jakarta.servlet.http.Cookie newCookie​(String name, String value, int maxAge)
      Deprecated.
      Constructs a cookie with a specified name and value and sets the maximum age of the cookie in seconds.
      static jakarta.servlet.http.Cookie newCookie​(String name, String value, int maxAge, String path, String domain)
      Deprecated.
      Constructs a cookie with a specified name and value and sets the maximum age of the cookie in seconds and sets a path for the cookie to which the client should return the cookie and sets the domain within which this cookie should be presented.
      static jakarta.servlet.http.Cookie newCookie​(String name, String value, String path)
      Deprecated.
      Constructs a cookie with a specified name and value and sets a path for the cookie to which the client should return the cookie.
      static jakarta.servlet.http.Cookie newCookie​(String name, String value, String path, String domain)
      Deprecated.
      Constructs a cookie with a specified name and value and sets a path for the cookie to which the client should return the cookie and sets the domain within which this cookie should be presented.
    • Constructor Detail

      • CookieUtils

        public CookieUtils()
        Deprecated.
    • Method Detail

      • getAmCookieName

        public static String getAmCookieName()
        Deprecated.
        Gets property value of "com.iplanet.am.cookie.name"
        Returns:
        the property value of "com.iplanet.am.cookie.name"
      • getAmPCookieName

        public static String getAmPCookieName()
        Deprecated.
        Gets property value of "com.iplanet.am.pcookie.name"
        Returns:
        the property value of "com.iplanet.am.pcookie.name"
      • getCdssoCookiedomain

        public static Set getCdssoCookiedomain()
        Deprecated.
        Gets property value of "com.iplanet.services.cdsso.cookiedomain"
        Returns:
        the property value of "com.iplanet.services.cdsso.cookiedomain"
      • getFedCookieName

        public static String getFedCookieName()
        Deprecated.
        Gets property value of "com.sun.identity.federation.fedCookieName"
        Returns:
        the property value of "com.sun.identity.federation.fedCookieName"
      • isCookieSecure

        public static boolean isCookieSecure()
        Deprecated.
        Gets property value of "com.iplanet.am.cookie.secure"
        Returns:
        the property value of "com.iplanet.am.cookie.secure"
      • getCookieValueFromReq

        public static String getCookieValueFromReq​(jakarta.servlet.http.HttpServletRequest req,
                                                   String name)
        Deprecated.
        Gets value of cookie that has mached name in servlet request
        Parameters:
        req - request
        name - name in servlet request
        Returns:
        value of that name of cookie
      • getCookieFromReq

        public static jakarta.servlet.http.Cookie getCookieFromReq​(jakarta.servlet.http.HttpServletRequest req,
                                                                   String name)
        Deprecated.
        Gets cookie object that has mached name in servlet request
        Parameters:
        req - request
        name - name in servlet request
        Returns:
        value of that name of cookie
      • getCookieValue

        public static String getCookieValue​(jakarta.servlet.http.Cookie cookie)
        Deprecated.
        Gets normalized value of cookie
        Parameters:
        cookie - cookie object
        Returns:
        value
      • getCookieArrayFromReq

        public static jakarta.servlet.http.Cookie[] getCookieArrayFromReq​(jakarta.servlet.http.HttpServletRequest req)
        Deprecated.
        Gets Array of cookie in servlet request
        Parameters:
        req - request
      • newCookie

        public static jakarta.servlet.http.Cookie newCookie​(String name,
                                                            String value)
        Deprecated.
        Constructs a cookie with a specified name and value.
        Parameters:
        name - a String specifying the name of the cookie
        value - a String specifying the value of the cookie
        Returns:
        constructed cookie
      • newCookie

        public static jakarta.servlet.http.Cookie newCookie​(String name,
                                                            String value,
                                                            int maxAge)
        Deprecated.
        Constructs a cookie with a specified name and value and sets the maximum age of the cookie in seconds.
        Parameters:
        name - a String specifying the name of the cookie
        value - a String specifying the value of the cookie
        maxAge - an integer specifying the maximum age of the cookie in seconds; if negative, means the cookie is not stored; if zero, deletes the cookie
        Returns:
        constructed cookie
      • newCookie

        public static jakarta.servlet.http.Cookie newCookie​(String name,
                                                            String value,
                                                            String path)
        Deprecated.
        Constructs a cookie with a specified name and value and sets a path for the cookie to which the client should return the cookie.
        Parameters:
        name - a String specifying the name of the cookie
        value - a String specifying the value of the cookie
        path - a String specifying a path
        Returns:
        constructed cookie
      • newCookie

        public static jakarta.servlet.http.Cookie newCookie​(String name,
                                                            String value,
                                                            String path,
                                                            String domain)
        Deprecated.
        Constructs a cookie with a specified name and value and sets a path for the cookie to which the client should return the cookie and sets the domain within which this cookie should be presented.
        Parameters:
        name - a String specifying the name of the cookie
        value - a String specifying the value of the cookie
        path - a String specifying a path
        domain - a String containing the domain name within which this cookie is visible; form is according to RFC 2109
        Returns:
        constructed cookie
      • newCookie

        public static jakarta.servlet.http.Cookie newCookie​(String name,
                                                            String value,
                                                            int maxAge,
                                                            String path,
                                                            String domain)
        Deprecated.
        Constructs a cookie with a specified name and value and sets the maximum age of the cookie in seconds and sets a path for the cookie to which the client should return the cookie and sets the domain within which this cookie should be presented.
        Parameters:
        name - a String specifying the name of the cookie
        value - a String specifying the value of the cookie
        maxAge - an integer specifying the maximum age of the cookie in seconds; if negative, means the cookie is not stored; if zero, deletes the cookie
        path - a String specifying a path
        domain - a String containing the domain name within which this cookie is visible; form is according to RFC 2109
        Returns:
        constructed cookie
      • checkDoubleQuote

        public static String checkDoubleQuote​(String cookie)
        Deprecated.
        Check cookie value whether it has double quote or not. Remove start / ending double quote from cookie and returns cookie value only.
        Parameters:
        cookie - a String value of cookie
        Returns:
        cookie value without double quote