Class JEEContext

  • All Implemented Interfaces:
    org.pac4j.core.context.WebContext

    @Deprecated
    public class JEEContext
    extends java.lang.Object
    implements org.pac4j.core.context.WebContext
    Deprecated.
    Use the pac4j-javaee dependency instead.
    • Constructor Summary

      Constructors 
      Constructor Description
      JEEContext​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Deprecated.
      Build a JEE context from the current HTTP request and response.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addResponseCookie​(org.pac4j.core.context.Cookie cookie)
      Deprecated.
       
      java.lang.String getFullRequestURL()
      Deprecated.
       
      javax.servlet.http.HttpServletRequest getNativeRequest()
      Deprecated.
      Return the native HTTP request.
      javax.servlet.http.HttpServletResponse getNativeResponse()
      Deprecated.
      Return the native HTTP response.
      java.lang.String getPath()
      Deprecated.
      This is not implemented using HttpServletRequest.getServletPath() or HttpServletRequest.getPathInfo() because they both have strange behaviours in different contexts (inside servlets, inside filters, various container implementation, etc)
      java.lang.String getProtocol()
      Deprecated.
       
      java.lang.String getRemoteAddr()
      Deprecated.
       
      java.util.Optional getRequestAttribute​(java.lang.String name)
      Deprecated.
       
      java.lang.String getRequestContent()
      Deprecated.
       
      java.util.Collection<org.pac4j.core.context.Cookie> getRequestCookies()
      Deprecated.
       
      java.util.Optional<java.lang.String> getRequestHeader​(java.lang.String name)
      Deprecated.
       
      java.lang.String getRequestMethod()
      Deprecated.
       
      java.util.Optional<java.lang.String> getRequestParameter​(java.lang.String name)
      Deprecated.
       
      java.util.Map<java.lang.String,​java.lang.String[]> getRequestParameters()
      Deprecated.
       
      java.lang.String getRequestURL()
      Deprecated.
       
      java.util.Optional<java.lang.String> getResponseHeader​(java.lang.String name)
      Deprecated.
       
      java.lang.String getScheme()
      Deprecated.
       
      java.lang.String getServerName()
      Deprecated.
       
      int getServerPort()
      Deprecated.
       
      boolean isSecure()
      Deprecated.
       
      void setRequestAttribute​(java.lang.String name, java.lang.Object value)
      Deprecated.
       
      void setResponseContentType​(java.lang.String content)
      Deprecated.
       
      void setResponseHeader​(java.lang.String name, java.lang.String value)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JEEContext

        public JEEContext​(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
        Deprecated.
        Build a JEE context from the current HTTP request and response.
        Parameters:
        request - the current request
        response - the current response
    • Method Detail

      • getRequestParameter

        public java.util.Optional<java.lang.String> getRequestParameter​(java.lang.String name)
        Deprecated.
        Specified by:
        getRequestParameter in interface org.pac4j.core.context.WebContext
      • getRequestAttribute

        public java.util.Optional getRequestAttribute​(java.lang.String name)
        Deprecated.
        Specified by:
        getRequestAttribute in interface org.pac4j.core.context.WebContext
      • setRequestAttribute

        public void setRequestAttribute​(java.lang.String name,
                                        java.lang.Object value)
        Deprecated.
        Specified by:
        setRequestAttribute in interface org.pac4j.core.context.WebContext
      • getRequestParameters

        public java.util.Map<java.lang.String,​java.lang.String[]> getRequestParameters()
        Deprecated.
        Specified by:
        getRequestParameters in interface org.pac4j.core.context.WebContext
      • getRequestHeader

        public java.util.Optional<java.lang.String> getRequestHeader​(java.lang.String name)
        Deprecated.
        Specified by:
        getRequestHeader in interface org.pac4j.core.context.WebContext
      • getRequestMethod

        public java.lang.String getRequestMethod()
        Deprecated.
        Specified by:
        getRequestMethod in interface org.pac4j.core.context.WebContext
      • getRemoteAddr

        public java.lang.String getRemoteAddr()
        Deprecated.
        Specified by:
        getRemoteAddr in interface org.pac4j.core.context.WebContext
      • getNativeRequest

        public javax.servlet.http.HttpServletRequest getNativeRequest()
        Deprecated.
        Return the native HTTP request.
        Returns:
        the native HTTP request
      • getNativeResponse

        public javax.servlet.http.HttpServletResponse getNativeResponse()
        Deprecated.
        Return the native HTTP response.
        Returns:
        the native HTTP response
      • setResponseHeader

        public void setResponseHeader​(java.lang.String name,
                                      java.lang.String value)
        Deprecated.
        Specified by:
        setResponseHeader in interface org.pac4j.core.context.WebContext
      • getResponseHeader

        public java.util.Optional<java.lang.String> getResponseHeader​(java.lang.String name)
        Deprecated.
        Specified by:
        getResponseHeader in interface org.pac4j.core.context.WebContext
      • setResponseContentType

        public void setResponseContentType​(java.lang.String content)
        Deprecated.
        Specified by:
        setResponseContentType in interface org.pac4j.core.context.WebContext
      • getServerName

        public java.lang.String getServerName()
        Deprecated.
        Specified by:
        getServerName in interface org.pac4j.core.context.WebContext
      • getServerPort

        public int getServerPort()
        Deprecated.
        Specified by:
        getServerPort in interface org.pac4j.core.context.WebContext
      • getScheme

        public java.lang.String getScheme()
        Deprecated.
        Specified by:
        getScheme in interface org.pac4j.core.context.WebContext
      • isSecure

        public boolean isSecure()
        Deprecated.
        Specified by:
        isSecure in interface org.pac4j.core.context.WebContext
      • getRequestURL

        public java.lang.String getRequestURL()
        Deprecated.
        Specified by:
        getRequestURL in interface org.pac4j.core.context.WebContext
      • getFullRequestURL

        public java.lang.String getFullRequestURL()
        Deprecated.
        Specified by:
        getFullRequestURL in interface org.pac4j.core.context.WebContext
      • getRequestCookies

        public java.util.Collection<org.pac4j.core.context.Cookie> getRequestCookies()
        Deprecated.
        Specified by:
        getRequestCookies in interface org.pac4j.core.context.WebContext
      • addResponseCookie

        public void addResponseCookie​(org.pac4j.core.context.Cookie cookie)
        Deprecated.
        Specified by:
        addResponseCookie in interface org.pac4j.core.context.WebContext
      • getPath

        public java.lang.String getPath()
        Deprecated.
        This is not implemented using HttpServletRequest.getServletPath() or HttpServletRequest.getPathInfo() because they both have strange behaviours in different contexts (inside servlets, inside filters, various container implementation, etc)
        Specified by:
        getPath in interface org.pac4j.core.context.WebContext
      • getRequestContent

        public java.lang.String getRequestContent()
        Deprecated.
        Specified by:
        getRequestContent in interface org.pac4j.core.context.WebContext
      • getProtocol

        public java.lang.String getProtocol()
        Deprecated.
        Specified by:
        getProtocol in interface org.pac4j.core.context.WebContext