Class ShiroHttpServletRequest



  • public class ShiroHttpServletRequest
    extends HttpServletRequestWrapper
    A ShiroHttpServletRequest wraps the Servlet container's original ServletRequest instance, but ensures that all HttpServletRequest invocations that require Shiro's support ( getRemoteUser, getSession, etc) can be executed first by Shiro as necessary before allowing the underlying Servlet container instance's method to be invoked.
    Since:
    0.2
    • Field Detail

      • REFERENCED_SESSION_ID

        public static final String REFERENCED_SESSION_ID
      • REFERENCED_SESSION_ID_IS_VALID

        public static final String REFERENCED_SESSION_ID_IS_VALID
      • REFERENCED_SESSION_IS_NEW

        public static final String REFERENCED_SESSION_IS_NEW
      • REFERENCED_SESSION_ID_SOURCE

        public static final String REFERENCED_SESSION_ID_SOURCE
      • IDENTITY_REMOVED_KEY

        public static final String IDENTITY_REMOVED_KEY
      • servletContext

        protected ServletContext servletContext
      • session

        protected HttpSession session
      • httpSessions

        protected boolean httpSessions
    • Constructor Detail

      • ShiroHttpServletRequest

        public ShiroHttpServletRequest(HttpServletRequest wrapped,
                                       ServletContext servletContext,
                                       boolean httpSessions)
    • Method Detail

      • isHttpSessions

        public boolean isHttpSessions()
      • getRemoteUser

        public String getRemoteUser()
      • getSubject

        protected Subject getSubject()
      • getSubjectPrincipal

        protected Object getSubjectPrincipal()
      • isUserInRole

        public boolean isUserInRole(String s)
      • getUserPrincipal

        public Principal getUserPrincipal()
      • getRequestedSessionId

        public String getRequestedSessionId()
      • getSession

        public HttpSession getSession(boolean create)
      • getSession

        public HttpSession getSession()
      • isRequestedSessionIdValid

        public boolean isRequestedSessionIdValid()
      • isRequestedSessionIdFromCookie

        public boolean isRequestedSessionIdFromCookie()
      • isRequestedSessionIdFromURL

        public boolean isRequestedSessionIdFromURL()
      • isRequestedSessionIdFromUrl

        public boolean isRequestedSessionIdFromUrl()