
public class WikiRequestWrapper extends javax.servlet.http.HttpServletRequestWrapper
| Constructor and Description |
|---|
WikiRequestWrapper(WikiEngine engine,
javax.servlet.http.HttpServletRequest request)
Constructs a new wrapped request.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getRemoteUser()
Returns the remote user for the HTTP request, taking into account both
container and JSPWiki custom authentication status.
|
Principal |
getUserPrincipal()
Returns the user principal for the HTTP request, taking into account both
container and JSPWiki custom authentication status.
|
boolean |
isUserInRole(String role)
Determines whether the current user possesses a supplied role, taking
into account both container and JSPWIki custom authentication status.
|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValidgetAttribute, 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, setRequestclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttribute, 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, setCharacterEncodingpublic WikiRequestWrapper(WikiEngine engine, javax.servlet.http.HttpServletRequest request)
engine - the wiki enginerequest - the request to wrappublic String getRemoteUser()
WikiSession.isAuthenticated() returns true,
this method returns the name of the principal returned by
WikiSession.getLoginPrincipal().getRemoteUser in interface javax.servlet.http.HttpServletRequestgetRemoteUser in class javax.servlet.http.HttpServletRequestWrapperpublic Principal getUserPrincipal()
WikiSession.isAuthenticated() returns
true, this method returns the value of
WikiSession.getLoginPrincipal().getUserPrincipal in interface javax.servlet.http.HttpServletRequestgetUserPrincipal in class javax.servlet.http.HttpServletRequestWrapperpublic boolean isUserInRole(String role)
true. If not, this method
iterates through the built-in Role objects (e.g., ANONYMOUS,
ASSERTED, AUTHENTICATED) returned by WikiSession.getRoles() and
checks to see if any of these principals' names match the supplied role.isUserInRole in interface javax.servlet.http.HttpServletRequestisUserInRole in class javax.servlet.http.HttpServletRequestWrapperCopyright © 2001-2018 The Apache Software Foundation. All rights reserved.