public class PicketLinkHttpServletRequest extends HttpServletRequestWrapper
PicketLink wrapper to HttpServletRequest instances.
This class provides a better integration with Servlet API.
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH| Constructor and Description |
|---|
PicketLinkHttpServletRequest(HttpServletRequest request,
Identity identity,
DefaultLoginCredentials credentials,
PartitionManager partitionManager,
ELProcessor elProcessor) |
| Modifier and Type | Method and Description |
|---|---|
String |
getRequestURI()
The default behavior of this method is to return getRequestURI()
on the wrapped request object.
|
Principal |
getUserPrincipal()
The default behavior of this method is to return getUserPrincipal()
on the wrapped request object.
|
boolean |
isUserInRole(String roleName)
The default behavior of this method is to return isUserInRole(String role)
on the wrapped request object.
|
void |
login(String username,
String password)
The default behavior of this method is to call login on the wrapped
request object.
|
void |
logout()
The default behavior of this method is to call login on the wrapped
request object.
|
authenticate, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValidgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncpublic PicketLinkHttpServletRequest(HttpServletRequest request, Identity identity, DefaultLoginCredentials credentials, PartitionManager partitionManager, ELProcessor elProcessor)
public void login(String username, String password) throws ServletException
HttpServletRequestWrapperlogin in interface HttpServletRequestlogin in class HttpServletRequestWrapperusername - The String value corresponding to
the login identifier of the user.password - The password String corresponding
to the identified user.ServletException - if the configured login mechanism
does not support username
password authentication, or if a
non-null caller identity had
already been established (prior
to the call to login), or if
validation of the provided
username and password fails.public void logout()
throws ServletException
HttpServletRequestWrapperlogout in interface HttpServletRequestlogout in class HttpServletRequestWrapperServletException - if logout failspublic Principal getUserPrincipal()
HttpServletRequestWrappergetUserPrincipal in interface HttpServletRequestgetUserPrincipal in class HttpServletRequestWrapperjava.security.Principal containing
the name of the user making this request;
null if the user has not been
authenticatedpublic String getRequestURI()
HttpServletRequestWrappergetRequestURI in interface HttpServletRequestgetRequestURI in class HttpServletRequestWrapperString containing
the part of the URL from the
protocol name up to the query stringHttpUtils.getRequestURL(javax.servlet.http.HttpServletRequest)public boolean isUserInRole(String roleName)
HttpServletRequestWrapperisUserInRole in interface HttpServletRequestisUserInRole in class HttpServletRequestWrapperroleName - a String specifying the name
of the roleboolean indicating whether
the user making this request belongs to a given role;
false if the user has not been
authenticatedCopyright © 2018 JBoss by Red Hat. All rights reserved.