# Class NegotiateRequestWrapper

java.lang.Object
waffle.servlet.NegotiateRequestWrapper

public class NegotiateRequestWrapper extends Object
Negotiate Request wrapper.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`BASIC_AUTH`
`static final String`
`CLIENT_CERT_AUTH`
`static final String`
`DIGEST_AUTH`
`static final String`
`FORM_AUTH`

## Constructor Summary

Constructors
Constructor
Description
`NegotiateRequestWrapper(javax.servlet.http.HttpServletRequest newRequest, WindowsPrincipal newPrincipal)`
Instantiates a new negotiate request wrapper.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`authenticate(javax.servlet.http.HttpServletResponse arg0)`
`String`
`changeSessionId()`
`javax.servlet.AsyncContext`
`getAsyncContext()`
`javax.servlet.AsyncContext`
`getAsyncContext()`
`Object`
`getAttribute(String arg0)`
`Object`
`getAttribute(String arg0)`
`Enumeration<String>`
`getAttributeNames()`
`Enumeration<String>`
`getAttributeNames()`
`String`
`getAuthType()`
Authentication type.
`String`
`getCharacterEncoding()`
`String`
`getCharacterEncoding()`
`int`
`getContentLength()`
`int`
`getContentLength()`
`long`
`getContentLengthLong()`
`long`
`getContentLengthLong()`
`String`
`getContentType()`
`String`
`getContentType()`
`String`
`getContextPath()`
`javax.servlet.http.Cookie[]`
`getCookies()`
`long`
`getDateHeader(String arg0)`
`javax.servlet.DispatcherType`
`getDispatcherType()`
`javax.servlet.DispatcherType`
`getDispatcherType()`
`String`
`getHeader(String arg0)`
`Enumeration<String>`
`getHeaderNames()`
`Enumeration<String>`
`getHeaders(String arg0)`
`javax.servlet.http.HttpServletMapping`
`getHttpServletMapping()`
`javax.servlet.ServletInputStream`
`getInputStream()`
`javax.servlet.ServletInputStream`
`getInputStream()`
`int`
`getIntHeader(String arg0)`
`String`
`getLocalAddr()`
`String`
`getLocalAddr()`
`Locale`
`getLocale()`
`Locale`
`getLocale()`
`Enumeration<Locale>`
`getLocales()`
`Enumeration<Locale>`
`getLocales()`
`String`
`getLocalName()`
`String`
`getLocalName()`
`int`
`getLocalPort()`
`int`
`getLocalPort()`
`String`
`getMethod()`
`String`
`getParameter(String arg0)`
`String`
`getParameter(String arg0)`
`Map<String,String[]>`
`getParameterMap()`
`Map<String,String[]>`
`getParameterMap()`
`Enumeration<String>`
`getParameterNames()`
`Enumeration<String>`
`getParameterNames()`
`String[]`
`getParameterValues(String arg0)`
`String[]`
`getParameterValues(String arg0)`
`javax.servlet.http.Part`
`getPart(String arg0)`
`Collection<javax.servlet.http.Part>`
`getParts()`
`String`
`getPathInfo()`
`String`
`getPathTranslated()`
`String`
`getProtocol()`
`String`
`getProtocol()`
`String`
`getQueryString()`
`BufferedReader`
`getReader()`
`BufferedReader`
`getReader()`
`String`
`getRealPath(String arg0)`
Deprecated.
`String`
`getRealPath(String arg0)`
Deprecated.
`String`
`getRemoteAddr()`
`String`
`getRemoteAddr()`
`String`
`getRemoteHost()`
`String`
`getRemoteHost()`
`int`
`getRemotePort()`
`int`
`getRemotePort()`
`String`
`getRemoteUser()`
Remote username.
`javax.servlet.ServletRequest`
`getRequest()`
`javax.servlet.RequestDispatcher`
`getRequestDispatcher(String arg0)`
`javax.servlet.RequestDispatcher`
`getRequestDispatcher(String arg0)`
`String`
`getRequestedSessionId()`
`String`
`getRequestURI()`
`StringBuffer`
`getRequestURL()`
`String`
`getScheme()`
`String`
`getScheme()`
`String`
`getServerName()`
`String`
`getServerName()`
`int`
`getServerPort()`
`int`
`getServerPort()`
`javax.servlet.ServletContext`
`getServletContext()`
`javax.servlet.ServletContext`
`getServletContext()`
`String`
`getServletPath()`
`javax.servlet.http.HttpSession`
`getSession()`
`javax.servlet.http.HttpSession`
`getSession(boolean arg0)`
`Map<String,String>`
`getTrailerFields()`
`Principal`
`getUserPrincipal()`
User principal.
`boolean`
`isAsyncStarted()`
`boolean`
`isAsyncStarted()`
`boolean`
`isAsyncSupported()`
`boolean`
`isAsyncSupported()`
`boolean`
`isRequestedSessionIdFromCookie()`
`boolean`
`isRequestedSessionIdFromUrl()`
Deprecated.
`boolean`
`isRequestedSessionIdFromURL()`
`boolean`
`isRequestedSessionIdValid()`
`boolean`
`isSecure()`
`boolean`
`isSecure()`
`boolean`
`isTrailerFieldsReady()`
`boolean`
`isUserInRole(String role)`
Returns true if the user is in a given role.
`boolean`
`isWrapperFor(Class<?> arg0)`
`boolean`
`isWrapperFor(javax.servlet.ServletRequest arg0)`
`void`
`login(String arg0, String arg1)`
`void`
`logout()`
`javax.servlet.http.PushBuilder`
`newPushBuilder()`
`void`
`removeAttribute(String arg0)`
`void`
`removeAttribute(String arg0)`
`void`
`setAttribute(String arg0, Object arg1)`
`void`
`setAttribute(String arg0, Object arg1)`
`void`
`setCharacterEncoding(String arg0)`
`void`
`setCharacterEncoding(String arg0)`
`void`
`setRequest(javax.servlet.ServletRequest arg0)`
`javax.servlet.AsyncContext`
`startAsync()`
`javax.servlet.AsyncContext`
`startAsync()`
`javax.servlet.AsyncContext`
`startAsync(javax.servlet.ServletRequest arg0, javax.servlet.ServletResponse arg1)`
`javax.servlet.AsyncContext`
`startAsync(javax.servlet.ServletRequest arg0, javax.servlet.ServletResponse arg1)`
`<T extends javax.servlet.http.HttpUpgradeHandler>
T`
`upgrade(Class<T> arg0)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### BASIC_AUTH

static final String BASIC_AUTH

See Also:
  - Constant Field Values

### FORM_AUTH

static final String FORM_AUTH

See Also:
  - Constant Field Values

### CLIENT_CERT_AUTH

static final String CLIENT_CERT_AUTH

See Also:
  - Constant Field Values

### DIGEST_AUTH

static final String DIGEST_AUTH

See Also:
  - Constant Field Values

## Constructor Details

### NegotiateRequestWrapper

public NegotiateRequestWrapper(javax.servlet.http.HttpServletRequest newRequest, WindowsPrincipal newPrincipal)
Instantiates a new negotiate request wrapper.

Parameters:
  `newRequest` - the new request
  `newPrincipal` - the new principal

## Method Details

### getUserPrincipal

public Principal getUserPrincipal()
User principal.

Returns:
  the user principal

### getAuthType

public String getAuthType()
Authentication type.

Returns:
  the auth type

### getRemoteUser

public String getRemoteUser()
Remote username.

Returns:
  the remote user

### isUserInRole

public boolean isUserInRole(String role)
Returns true if the user is in a given role.

Parameters:
  `role` - the role
Returns:
  true, if is user in role

### getCookies

public javax.servlet.http.Cookie[] getCookies()

### getDateHeader

public long getDateHeader(String arg0)

### getHeader

public String getHeader(String arg0)

### getHeaders

public Enumeration<String> getHeaders(String arg0)

### getHeaderNames

public Enumeration<String> getHeaderNames()

### getIntHeader

public int getIntHeader(String arg0)

### getHttpServletMapping

public javax.servlet.http.HttpServletMapping getHttpServletMapping()

### getMethod

public String getMethod()

### getPathInfo

public String getPathInfo()

### getPathTranslated

public String getPathTranslated()

### getContextPath

public String getContextPath()

### getQueryString

public String getQueryString()

### getRequestedSessionId

public String getRequestedSessionId()

### getRequestURI

public String getRequestURI()

### getRequestURL

public StringBuffer getRequestURL()

### getServletPath

public String getServletPath()

### getSession

public javax.servlet.http.HttpSession getSession(boolean arg0)

### getSession

public javax.servlet.http.HttpSession getSession()

### changeSessionId

public String changeSessionId()

### isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()

### isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()

### isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()

### isRequestedSessionIdFromUrl

@Deprecated public boolean isRequestedSessionIdFromUrl()
Deprecated.

### authenticate

public boolean authenticate(javax.servlet.http.HttpServletResponse arg0) throws IOException, javax.servlet.ServletException

Throws:
  `IOException`
  `javax.servlet.ServletException`

### login

public void login(String arg0, String arg1) throws javax.servlet.ServletException

Throws:
  `javax.servlet.ServletException`

### logout

public void logout() throws javax.servlet.ServletException

Throws:
  `javax.servlet.ServletException`

### getParts

public Collection<javax.servlet.http.Part> getParts() throws IOException, javax.servlet.ServletException

Throws:
  `IOException`
  `javax.servlet.ServletException`

### getPart

public javax.servlet.http.Part getPart(String arg0) throws IOException, javax.servlet.ServletException

Throws:
  `IOException`
  `javax.servlet.ServletException`

### upgrade

public <T extends javax.servlet.http.HttpUpgradeHandler> T upgrade(Class<T> arg0) throws IOException, javax.servlet.ServletException

Throws:
  `IOException`
  `javax.servlet.ServletException`

### newPushBuilder

public javax.servlet.http.PushBuilder newPushBuilder()

### getTrailerFields

public Map<String,String> getTrailerFields()

### isTrailerFieldsReady

public boolean isTrailerFieldsReady()

### getAttribute

Object getAttribute(String arg0)

### getAttributeNames

Enumeration<String> getAttributeNames()

### getCharacterEncoding

String getCharacterEncoding()

### setCharacterEncoding

void setCharacterEncoding(String arg0) throws UnsupportedEncodingException

Throws:
  `UnsupportedEncodingException`

### getContentLength

int getContentLength()

### getContentLengthLong

long getContentLengthLong()

### getContentType

String getContentType()

### getInputStream

javax.servlet.ServletInputStream getInputStream() throws IOException

Throws:
  `IOException`

### getParameter

String getParameter(String arg0)

### getParameterNames

Enumeration<String> getParameterNames()

### getParameterValues

String[] getParameterValues(String arg0)

### getParameterMap

Map<String,String[]> getParameterMap()

### getProtocol

String getProtocol()

### getScheme

String getScheme()

### getServerName

String getServerName()

### getServerPort

int getServerPort()

### getReader

BufferedReader getReader() throws IOException

Throws:
  `IOException`

### getRemoteAddr

String getRemoteAddr()

### getRemoteHost

String getRemoteHost()

### setAttribute

void setAttribute(String arg0, Object arg1)

### removeAttribute

void removeAttribute(String arg0)

### getLocale

Locale getLocale()

### getLocales

Enumeration<Locale> getLocales()

### isSecure

boolean isSecure()

### getRequestDispatcher

javax.servlet.RequestDispatcher getRequestDispatcher(String arg0)

### getRealPath

String getRealPath(String arg0)
Deprecated.

### getRemotePort

int getRemotePort()

### getLocalName

String getLocalName()

### getLocalAddr

String getLocalAddr()

### getLocalPort

int getLocalPort()

### getServletContext

javax.servlet.ServletContext getServletContext()

### startAsync

javax.servlet.AsyncContext startAsync() throws IllegalStateException

Throws:
  `IllegalStateException`

### startAsync

javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest arg0, javax.servlet.ServletResponse arg1) throws IllegalStateException

Throws:
  `IllegalStateException`

### isAsyncStarted

boolean isAsyncStarted()

### isAsyncSupported

boolean isAsyncSupported()

### getAsyncContext

javax.servlet.AsyncContext getAsyncContext()

### getDispatcherType

javax.servlet.DispatcherType getDispatcherType()

### getRequest

public javax.servlet.ServletRequest getRequest()

### setRequest

public void setRequest(javax.servlet.ServletRequest arg0)

### getAttribute

public Object getAttribute(String arg0)

### getAttributeNames

public Enumeration<String> getAttributeNames()

### getCharacterEncoding

public String getCharacterEncoding()

### setCharacterEncoding

public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException

Throws:
  `UnsupportedEncodingException`

### getContentLength

public int getContentLength()

### getContentLengthLong

public long getContentLengthLong()

### getContentType

public String getContentType()

### getInputStream

public javax.servlet.ServletInputStream getInputStream() throws IOException

Throws:
  `IOException`

### getParameter

public String getParameter(String arg0)

### getParameterMap

public Map<String,String[]> getParameterMap()

### getParameterNames

public Enumeration<String> getParameterNames()

### getParameterValues

public String[] getParameterValues(String arg0)

### getProtocol

public String getProtocol()

### getScheme

public String getScheme()

### getServerName

public String getServerName()

### getServerPort

public int getServerPort()

### getReader

public BufferedReader getReader() throws IOException

Throws:
  `IOException`

### getRemoteAddr

public String getRemoteAddr()

### getRemoteHost

public String getRemoteHost()

### setAttribute

public void setAttribute(String arg0, Object arg1)

### removeAttribute

public void removeAttribute(String arg0)

### getLocale

public Locale getLocale()

### getLocales

public Enumeration<Locale> getLocales()

### isSecure

public boolean isSecure()

### getRequestDispatcher

public javax.servlet.RequestDispatcher getRequestDispatcher(String arg0)

### getRealPath

@Deprecated public String getRealPath(String arg0)
Deprecated.

### getRemotePort

public int getRemotePort()

### getLocalName

public String getLocalName()

### getLocalAddr

public String getLocalAddr()

### getLocalPort

public int getLocalPort()

### getServletContext

public javax.servlet.ServletContext getServletContext()

### startAsync

public javax.servlet.AsyncContext startAsync() throws IllegalStateException

Throws:
  `IllegalStateException`

### startAsync

public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest arg0, javax.servlet.ServletResponse arg1) throws IllegalStateException

Throws:
  `IllegalStateException`

### isAsyncStarted

public boolean isAsyncStarted()

### isAsyncSupported

public boolean isAsyncSupported()

### getAsyncContext

public javax.servlet.AsyncContext getAsyncContext()

### isWrapperFor

public boolean isWrapperFor(javax.servlet.ServletRequest arg0)

### isWrapperFor

public boolean isWrapperFor(Class<?> arg0)

### getDispatcherType

public javax.servlet.DispatcherType getDispatcherType()