org.glassfish.jersey.server.oauth1
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).
- Author:
- Martin Matula, Miroslav Fuksa (miroslav.fuksa at oracle.com)
- See Also:
- Serialized Form
|
Constructor Summary |
OAuth1Exception(javax.ws.rs.core.Response.Status status,
String wwwAuthHeader)
Create a new exception. |
|
Method Summary |
javax.ws.rs.core.Response |
getResponse()
|
javax.ws.rs.core.Response.Status |
getStatus()
Get the status of the error response. |
String |
getWwwAuthHeader()
Get the Authorization header of the request that cause the exception. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
OAuth1Exception
public OAuth1Exception(javax.ws.rs.core.Response.Status status,
String wwwAuthHeader)
- Create a new exception.
- Parameters:
status - Response status.wwwAuthHeader - Authorization header value of the request that cause the exception.
getStatus
public javax.ws.rs.core.Response.Status getStatus()
- Get the status of the error response.
- Returns:
- Response status code.
getWwwAuthHeader
public String getWwwAuthHeader()
- Get the
Authorization header of the request that cause the exception.
- Returns:
- Authorization header value.
getResponse
public javax.ws.rs.core.Response getResponse()
- Overrides:
getResponse in class javax.ws.rs.WebApplicationException
Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.