Class JEEContext

java.lang.Object
org.pac4j.jee.context.JEEContext
All Implemented Interfaces:
org.pac4j.core.context.WebContext

@Deprecated public class JEEContext extends Object implements org.pac4j.core.context.WebContext
Deprecated.
This implementation uses the JEE HttpServletRequest and HttpServletResponse. You should upgrade to the new pac4j-jakartaee module.
Since:
1.4.0
Author:
Jerome Leleu
  • Constructor Details

    • 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 Details

    • getRequestParameter

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

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

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

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

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

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

      public 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(String name, String value)
      Deprecated.
      Specified by:
      setResponseHeader in interface org.pac4j.core.context.WebContext
    • getResponseHeader

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

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

      public 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 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 String getRequestURL()
      Deprecated.
      Specified by:
      getRequestURL in interface org.pac4j.core.context.WebContext
    • getFullRequestURL

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

      public 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 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 String getRequestContent()
      Deprecated.
      Specified by:
      getRequestContent in interface org.pac4j.core.context.WebContext
    • getProtocol

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