Class OAuth1Exception
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.ws.rs.WebApplicationException
org.glassfish.jersey.server.oauth1.OAuth1Exception
- All Implemented Interfaces:
Serializable
public class OAuth1Exception
extends javax.ws.rs.WebApplicationException
Web application exception
that is mapped either
to Response.Status.BAD_REQUEST
(e.g. if problem with OAuth
parameters occurs) or
Response.Status.UNAUTHORIZED
(e.g. if signature is incorrect).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth1Exception
(javax.ws.rs.core.Response.Status status, String wwwAuthHeader) Create a new exception. -
Method Summary
Modifier and TypeMethodDescriptionprivate static javax.ws.rs.core.Response
createResponse
(javax.ws.rs.core.Response.Status status, String wwwAuthHeader) javax.ws.rs.core.Response.Status
Get the status of the error response.Get theWWW-Authenticate
header of the request that cause the exception.Methods inherited from class javax.ws.rs.WebApplicationException
getResponse
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OAuth1Exception
Create a new exception.- Parameters:
status
- Response status.wwwAuthHeader
-Authorization
header value of the request that cause the exception.
-
-
Method Details
-
getStatus
public javax.ws.rs.core.Response.Status getStatus()Get the status of the error response.- Returns:
- Response status code.
-
getWwwAuthHeader
Get theWWW-Authenticate
header of the request that cause the exception.- Returns:
WWW-Authenticate
header value.
-
createResponse
private static javax.ws.rs.core.Response createResponse(javax.ws.rs.core.Response.Status status, String wwwAuthHeader)
-