|
|||||||
| 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.sourceforge.spnego.SpnegoHttpServletRequest
final class SpnegoHttpServletRequest
Wrap ServletRequest so we can do our own handling of the principal and auth types.
Also, see the documentation on the DelegateServletRequest class.
Finally, a credential delegation example can be found on http://spnego.sourceforge.net
| Field Summary | |
|---|---|
private SpnegoPrincipal |
principal
Client Principal. |
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
SpnegoHttpServletRequest(javax.servlet.http.HttpServletRequest request,
SpnegoPrincipal spnegoPrincipal)
Creates Servlet Request specifying KerberosPrincipal of user. |
|
| Method Summary | |
|---|---|
String |
getAuthType()
Returns "Negotiate" or "Basic" else default auth type. |
GSSCredential |
getDelegatedCredential()
Return the client's/requester's delegated credential or null. |
String |
getRemoteUser()
Returns authenticated username (sans domain/realm) else default username. |
Principal |
getUserPrincipal()
Returns KerberosPrincipal of user. |
| Methods inherited from class javax.servlet.http.HttpServletRequestWrapper |
|---|
getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
| 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 |
|---|
private final transient SpnegoPrincipal principal
| Constructor Detail |
|---|
SpnegoHttpServletRequest(javax.servlet.http.HttpServletRequest request,
SpnegoPrincipal spnegoPrincipal)
request - spnegoPrincipal - | Method Detail |
|---|
public String getAuthType()
getAuthType in interface javax.servlet.http.HttpServletRequestgetAuthType in class javax.servlet.http.HttpServletRequestWrapperHttpServletRequest.getAuthType()public GSSCredential getDelegatedCredential()
getDelegatedCredential in interface DelegateServletRequestpublic String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestgetRemoteUser in class javax.servlet.http.HttpServletRequestWrapperHttpServletRequest.getRemoteUser()public Principal getUserPrincipal()
getUserPrincipal in interface javax.servlet.http.HttpServletRequestgetUserPrincipal in class javax.servlet.http.HttpServletRequestWrapperHttpServletRequest.getUserPrincipal()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||