JSecurity

org.jsecurity.web.servlet
Class JSecurityHttpServletRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.jsecurity.web.servlet.JSecurityHttpServletRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public class JSecurityHttpServletRequest
extends HttpServletRequestWrapper

TODO class JavaDoc

Since:
0.2
Author:
Les Hazlewood

Field Summary
static String COOKIE_SESSION_ID_SOURCE
           
static String EXPIRED_SESSION_KEY
          Key that may be used to alert that the request's referenced JSecurity Session has expired prior to request processing.
protected  boolean httpSessions
           
static String REFERENCED_SESSION_ID
           
static String REFERENCED_SESSION_ID_IS_VALID
           
static String REFERENCED_SESSION_ID_SOURCE
           
static String REFERENCED_SESSION_IS_NEW
           
protected  ServletContext servletContext
           
protected  HttpSession session
           
static String SESSION_ID_NAME
           
static String URL_SESSION_ID_SOURCE
           
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
JSecurityHttpServletRequest(HttpServletRequest wrapped, ServletContext servletContext, boolean httpSessions)
           
 
Method Summary
 String getRemoteUser()
           
 String getRequestedSessionId()
           
 HttpSession getSession()
           
 HttpSession getSession(boolean create)
           
protected  Subject getSubject()
           
protected  Object getSubjectPrincipal()
           
 Principal getUserPrincipal()
           
 boolean isHttpSessions()
           
 boolean isRequestedSessionIdFromCookie()
           
 boolean isRequestedSessionIdFromUrl()
           
 boolean isRequestedSessionIdFromURL()
           
 boolean isRequestedSessionIdValid()
           
 boolean isUserInRole(String s)
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestURI, getRequestURL, getServletPath
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Field Detail

COOKIE_SESSION_ID_SOURCE

public static final String COOKIE_SESSION_ID_SOURCE
See Also:
Constant Field Values

URL_SESSION_ID_SOURCE

public static final String URL_SESSION_ID_SOURCE
See Also:
Constant Field Values

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

SESSION_ID_NAME

public static final String SESSION_ID_NAME
See Also:
Constant Field Values

EXPIRED_SESSION_KEY

public static final String EXPIRED_SESSION_KEY
Key that may be used to alert that the request's referenced JSecurity Session has expired prior to request processing.


servletContext

protected ServletContext servletContext

session

protected HttpSession session

httpSessions

protected boolean httpSessions
Constructor Detail

JSecurityHttpServletRequest

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

isHttpSessions

public boolean isHttpSessions()

getRemoteUser

public String getRemoteUser()
Specified by:
getRemoteUser in interface HttpServletRequest
Overrides:
getRemoteUser in class HttpServletRequestWrapper

getSubject

protected Subject getSubject()

getSubjectPrincipal

protected Object getSubjectPrincipal()

isUserInRole

public boolean isUserInRole(String s)
Specified by:
isUserInRole in interface HttpServletRequest
Overrides:
isUserInRole in class HttpServletRequestWrapper

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface HttpServletRequest
Overrides:
getUserPrincipal in class HttpServletRequestWrapper

getRequestedSessionId

public String getRequestedSessionId()
Specified by:
getRequestedSessionId in interface HttpServletRequest
Overrides:
getRequestedSessionId in class HttpServletRequestWrapper

getSession

public HttpSession getSession(boolean create)
Specified by:
getSession in interface HttpServletRequest
Overrides:
getSession in class HttpServletRequestWrapper

getSession

public HttpSession getSession()
Specified by:
getSession in interface HttpServletRequest
Overrides:
getSession in class HttpServletRequestWrapper

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Specified by:
isRequestedSessionIdValid in interface HttpServletRequest
Overrides:
isRequestedSessionIdValid in class HttpServletRequestWrapper

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Specified by:
isRequestedSessionIdFromCookie in interface HttpServletRequest
Overrides:
isRequestedSessionIdFromCookie in class HttpServletRequestWrapper

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Specified by:
isRequestedSessionIdFromURL in interface HttpServletRequest
Overrides:
isRequestedSessionIdFromURL in class HttpServletRequestWrapper

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Specified by:
isRequestedSessionIdFromUrl in interface HttpServletRequest
Overrides:
isRequestedSessionIdFromUrl in class HttpServletRequestWrapper

JSecurity

Copyright © 2004-2008 JSecurity.