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:
java.io.Serializable
public class OAuth1Exception extends javax.ws.rs.WebApplicationException
Web application exception
that is mapped either toResponse.Status.BAD_REQUEST
(e.g. if problem with OAuth parameters occurs) orResponse.Status.UNAUTHORIZED
(e.g. if signature is incorrect).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OAuth1Exception(javax.ws.rs.core.Response.Status status, java.lang.String wwwAuthHeader)
Create a new exception.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static javax.ws.rs.core.Response
createResponse(javax.ws.rs.core.Response.Status status, java.lang.String wwwAuthHeader)
javax.ws.rs.core.Response.Status
getStatus()
Get the status of the error response.java.lang.String
getWwwAuthHeader()
Get theWWW-Authenticate
header of the request that cause the exception.
-
-
-
Method Detail
-
getStatus
public javax.ws.rs.core.Response.Status getStatus()
Get the status of the error response.- Returns:
- Response status code.
-
getWwwAuthHeader
public java.lang.String 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, java.lang.String wwwAuthHeader)
-
-