Package io.varhttp

Class VarHttpServletRequest

java.lang.Object
jakarta.servlet.ServletRequestWrapper
jakarta.servlet.http.HttpServletRequestWrapper
io.varhttp.VarHttpServletRequest
All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest, jakarta.servlet.ServletRequest

public class VarHttpServletRequest extends jakarta.servlet.http.HttpServletRequestWrapper
  • Field Summary

    Fields inherited from interface jakarta.servlet.http.HttpServletRequest

    BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
  • Constructor Summary

    Constructors
    Constructor
    Description
    VarHttpServletRequest(VarConfig config, jakarta.servlet.http.HttpServletRequest request)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    authenticate(jakarta.servlet.http.HttpServletResponse response)
     
     
     
     
    jakarta.servlet.http.HttpSession
     
    jakarta.servlet.http.HttpSession
    getSession(boolean create)
     
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    void
    login(String username, String password)
     
    void
     

    Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapper

    getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRequestURI, getRequestURL, getServletPath, getTrailerFields, isTrailerFieldsReady, newPushBuilder, upgrade

    Methods inherited from class jakarta.servlet.ServletRequestWrapper

    getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jakarta.servlet.ServletRequest

    getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
  • Constructor Details

    • VarHttpServletRequest

      public VarHttpServletRequest(VarConfig config, jakarta.servlet.http.HttpServletRequest request)
  • Method Details

    • isSecure

      public boolean isSecure()
      Specified by:
      isSecure in interface jakarta.servlet.ServletRequest
      Overrides:
      isSecure in class jakarta.servlet.ServletRequestWrapper
    • getRemoteUser

      public String getRemoteUser()
      Specified by:
      getRemoteUser in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getRemoteUser in class jakarta.servlet.http.HttpServletRequestWrapper
    • isUserInRole

      public boolean isUserInRole(String role)
      Specified by:
      isUserInRole in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      isUserInRole in class jakarta.servlet.http.HttpServletRequestWrapper
    • getUserPrincipal

      public Principal getUserPrincipal()
      Specified by:
      getUserPrincipal in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getUserPrincipal in class jakarta.servlet.http.HttpServletRequestWrapper
    • getRequestedSessionId

      public String getRequestedSessionId()
      Specified by:
      getRequestedSessionId in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getRequestedSessionId in class jakarta.servlet.http.HttpServletRequestWrapper
    • getSession

      public jakarta.servlet.http.HttpSession getSession(boolean create)
      Specified by:
      getSession in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getSession in class jakarta.servlet.http.HttpServletRequestWrapper
    • getSession

      public jakarta.servlet.http.HttpSession getSession()
      Specified by:
      getSession in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getSession in class jakarta.servlet.http.HttpServletRequestWrapper
    • changeSessionId

      public String changeSessionId()
      Specified by:
      changeSessionId in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      changeSessionId in class jakarta.servlet.http.HttpServletRequestWrapper
    • isRequestedSessionIdValid

      public boolean isRequestedSessionIdValid()
      Specified by:
      isRequestedSessionIdValid in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      isRequestedSessionIdValid in class jakarta.servlet.http.HttpServletRequestWrapper
    • isRequestedSessionIdFromCookie

      public boolean isRequestedSessionIdFromCookie()
      Specified by:
      isRequestedSessionIdFromCookie in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      isRequestedSessionIdFromCookie in class jakarta.servlet.http.HttpServletRequestWrapper
    • isRequestedSessionIdFromURL

      public boolean isRequestedSessionIdFromURL()
      Specified by:
      isRequestedSessionIdFromURL in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      isRequestedSessionIdFromURL in class jakarta.servlet.http.HttpServletRequestWrapper
    • authenticate

      public boolean authenticate(jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Specified by:
      authenticate in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      authenticate in class jakarta.servlet.http.HttpServletRequestWrapper
      Throws:
      IOException
      jakarta.servlet.ServletException
    • login

      public void login(String username, String password) throws jakarta.servlet.ServletException
      Specified by:
      login in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      login in class jakarta.servlet.http.HttpServletRequestWrapper
      Throws:
      jakarta.servlet.ServletException
    • logout

      public void logout() throws jakarta.servlet.ServletException
      Specified by:
      logout in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      logout in class jakarta.servlet.http.HttpServletRequestWrapper
      Throws:
      jakarta.servlet.ServletException