|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
net.sf.jguard.jee.authentication.http.JGuardServletRequestWrapper
public class JGuardServletRequestWrapper
wrap the ServletRequest object to 'decorate' it to respect the JAAS mechanism present in j2se.
| Field Summary |
|---|
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
JGuardServletRequestWrapper(String applicationName,
AuthenticationManager authenticationManager,
javax.servlet.http.HttpServletRequest req,
LoginContextWrapper loginContextWrapper)
|
|
| Method Summary | |
|---|---|
String |
getHeader(String headerName)
|
String |
getRemoteUser()
return login of the user. |
Principal |
getUserPrincipal()
return a SubjectAsPrincipal object which wrap the Subject in a Principal. |
boolean |
isUserInRole(String role)
wrap the isUserInRole method to check against all the RolePrincipal's set of the Subject object. |
void |
setHeader(String headerName,
String headerValue)
|
| Methods inherited from class javax.servlet.http.HttpServletRequestWrapper |
|---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid |
| Methods inherited from class javax.servlet.ServletRequestWrapper |
|---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, 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, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
| Constructor Detail |
|---|
@Inject
public JGuardServletRequestWrapper(String applicationName,
AuthenticationManager authenticationManager,
javax.servlet.http.HttpServletRequest req,
LoginContextWrapper loginContextWrapper)
| Method Detail |
|---|
public boolean isUserInRole(String role)
RolePrincipal's set of the Subject object.
isUserInRole in interface javax.servlet.http.HttpServletRequestisUserInRole in class javax.servlet.http.HttpServletRequestWrapperrole - : name of the principal(role) we are looking for
public Principal getUserPrincipal()
getUserPrincipal in interface javax.servlet.http.HttpServletRequestgetUserPrincipal in class javax.servlet.http.HttpServletRequestWrapperpublic String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestgetRemoteUser in class javax.servlet.http.HttpServletRequestWrapper
public void setHeader(String headerName,
String headerValue)
public String getHeader(String headerName)
getHeader in interface javax.servlet.http.HttpServletRequestgetHeader in class javax.servlet.http.HttpServletRequestWrapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||