public static class MasterAccessTokenValidator.ErrorResponse extends Object
Constructor | Description |
---|---|
ErrorResponse(int statusCode,
String wwwAuthHeader,
String bodyErrorCode,
String bodyErrorDesc) |
Creates a new bearer token error response.
|
Modifier and Type | Method | 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 bodyErrorCode, String bodyErrorDesc)
statusCode
- The HTTP status code.wwwAuthHeader
- The HTTP response
WWW-Authenticate
header,
null
if none.bodyErrorCode
- The error code for the body JSON
object.bodyErrorDesc
- The error description for the body JSON
object.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 © 2018 Connect2id. All rights reserved.