# OAuthClient.Callback

Summary:[Ctors](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.Callback#pubctors)\|[Methods](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.Callback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.Callback#inhmethods)  

# OAuthClient.Callback

`
public
static

abstract
class
OAuthClient.Callback
`  
`

extends `[Object](http://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|--------------------------------------------------------------|
| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.wearable.authentication.OAuthClient.Callback |

<br />

*** ** * ** ***

<br />

**This class is deprecated.**   
use`androidx.wear.phone.interactions.authentication.RemoteAuthClient`provided by the[Jetpack Wear Phone Interactions](https://developer.android.com/jetpack/androidx/releases/wear)library instead.

This callback is notified when an async OAuth request completes.

Your app should update its UI to let the user know of the success or failure.

## Summary

|                                                           ### Public constructors                                                           ||
|------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Callback](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.Callback.html#Callback())`() ` |

|                                                                                                                                                                                                                  ### Public methods                                                                                                                                                                                                                   ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onAuthorizationError](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.Callback.html#onAuthorizationError(int))`(int errorCode) ` Called when an async OAuth request fails.                                                                                                                                                                                                          |
| ` abstract void` | ` `[onAuthorizationResponse](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.Callback.html#onAuthorizationResponse(android.net.Uri,%20android.net.Uri))`(`[Uri](http://developer.android.com/reference/android/net/Uri.html)` requestUrl, `[Uri](http://developer.android.com/reference/android/net/Uri.html)` responseUrl) ` Called when an async oauth request completes succesfully. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                               | | ` boolean`                                                                         | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                            | ` finalize() `                                                                            | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                            | | ` int`                                                                             | ` hashCode() `                                                                            | | ` final void`                                                                      | ` notify() `                                                                              | | ` final void`                                                                      | ` notifyAll() `                                                                           | | ` `[String](http://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                            | | ` final void`                                                                      | ` wait(long arg0, int arg1) `                                                             | | ` final void`                                                                      | ` wait(long arg0) `                                                                       | | ` final void`                                                                      | ` wait() `                                                                                | ||

## Public constructors

### Callback

```
public Callback ()
```

<br />

<br />

## Public methods

### onAuthorizationError

```
public abstract void onAuthorizationError (int errorCode)
```

Called when an async OAuth request fails.

See[OAuthClient.sendAuthorizationRequest(Uri, OAuthClient.Callback)](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.html#sendAuthorizationRequest(android.net.Uri,%20android.support.wearable.authentication.OAuthClient.Callback)).

<br />

|        Parameters         ||
|-------------|--------------|
| `errorCode` | `int` <br /> |

### onAuthorizationResponse

```
public abstract void onAuthorizationResponse (Uri requestUrl, 
                Uri responseUrl)
```

Called when an async oauth request completes succesfully.

See[OAuthClient.sendAuthorizationRequest(Uri, OAuthClient.Callback)](https://developer.android.com/reference/android/support/wearable/authentication/OAuthClient.html#sendAuthorizationRequest(android.net.Uri,%20android.support.wearable.authentication.OAuthClient.Callback)).

<br />

|         Parameters          ||
|---------------|--------------|
| `requestUrl`  | `Uri` <br /> |
| `responseUrl` | `Uri` <br /> |