org.jboss.resteasy.auth.oauth

## Class OAuthException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.jboss.resteasy.auth.oauth.OAuthException

- All Implemented Interfaces:
    Serializable

      public class OAuthException
      extends Exception

  Use this exception to throw exceptions from your OAuthProvider to specify the HTTP status code
  Author:
    Stéphane Épardaud
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuthException(int httpCode, String message)` Builds a new OAuth exception which will result in sending the specified HTTP status code to the Client.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getHttpCode()` Returns the HTTP status code to return to the OAuth Client

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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

    - #### OAuthException

          public OAuthException(int httpCode,
                        String message)

      Builds a new OAuth exception which will result in sending the specified HTTP status code to the Client.
      Parameters:
        `httpCode` - the HTTP status code to return to the OAuth Client
        `message` - the message describing the problem, also returned to the OAuth Client

  - ### Method Detail

    - #### getHttpCode

          public int getHttpCode()

      Returns the HTTP status code to return to the OAuth Client

Copyright © 2014. All Rights Reserved.