org.glassfish.jersey.server.oauth1
Class OAuth1Exception

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.ws.rs.WebApplicationException
                  extended by 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.