public final class ServletUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Authorization |
getAuthorization(javax.servlet.http.HttpServletRequest request)
Parse an
HttpServletRequest to create an Authorization |
static RequestContent |
getRequestContent(javax.servlet.http.HttpServletRequest request)
Parse an
HttpServletRequest to build the RequestContent |
static RequestContent |
getRequestContent(javax.servlet.http.HttpServletRequest request,
Collection<String> ignoreHeaders)
Parse an
HttpServletRequest to build the RequestContent |
static boolean |
sendChallenge(javax.servlet.http.HttpServletResponse resp,
Challenge challenge)
Handle an
HttpServletResponse which has failed authentication by sending a
Challenge header |
public static Authorization getAuthorization(javax.servlet.http.HttpServletRequest request)
HttpServletRequest
to create an Authorization
request
- the HTTP RequestAuthorization
public static RequestContent getRequestContent(javax.servlet.http.HttpServletRequest request)
HttpServletRequest
to build the RequestContent
request
- the HTTP RequestRequestContent
public static RequestContent getRequestContent(javax.servlet.http.HttpServletRequest request, Collection<String> ignoreHeaders)
HttpServletRequest
to build the RequestContent
request
- the HTTP RequestignoreHeaders
- a collection of header names to ignore, in case they have been added by proxiespublic static boolean sendChallenge(javax.servlet.http.HttpServletResponse resp, Challenge challenge) throws IOException
HttpServletResponse
which has failed authentication by sending a
Challenge
headerresp
- the HTTP Responsechallenge
- the Server challenge parametersIOException
- if anything went wrongCopyright © 2013-2017. All Rights Reserved.