public static class BasicAccessTokenValidator.ErrorResponse extends Object
Constructor and Description |
---|
ErrorResponse(int statusCode,
String wwwAuthHeader,
String body)
Creates a new bearer token error response.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(javax.servlet.http.HttpServletResponse servletResponse)
Applies this error response to the specified HTTP servlet
response.
|
javax.ws.rs.WebApplicationException |
toWebAppException()
Returns a web application exception for this error response.
|
public ErrorResponse(int statusCode, String wwwAuthHeader, String body)
statusCode
- The HTTP status code.wwwAuthHeader
- The HTTP response
WWW-Authenticate
header,
null
if none.body
- The HTTP body (application/json).public javax.ws.rs.WebApplicationException toWebAppException()
public void apply(javax.servlet.http.HttpServletResponse servletResponse) throws IOException
servletResponse
- The HTTP servlet response. Must not
be null
.IOException
- If the error response couldn't be
written.Copyright © 2017 Connect2id. All rights reserved.