Deprecated
in favor of RefreshAuthTokenWrapper -- versions after 1.25.1 do not use RefreshAuthTokenWrappingAsyncHandler anymore
This is to account for scenarios where we have a valid/non-expired token but the permissions for the instance have changed since the token was issued and so on the server-side the presented token is considered invalid.
| Modifier and Type | Field and Description |
|---|---|
| private final RefreshableOnNotAuthenticatedProvider | |
| private int | |
| private final AsyncHandler | |
| private static final Logger | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | RefreshAuthTokenWrappingAsyncHandler(RefreshableOnNotAuthenticatedProvider<?> authDetailsProvider, AsyncHandler<REQUEST, RESPONSE> innerHandler)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | onError(REQUEST
The request that was made. request, Throwable The error that was received. error)Implements com. Called if the request could not be completed successfully. |
| public void | onSuccess(REQUEST
The request that was made. request, RESPONSE The response that was received. response)Implements com. Called if the request was successfully completed. |
| public abstract void | retryCall()
If we need to retry the request (i.e. on a 401), this method contains the information on how to do that. |
| authDetailsProvider | back to summary |
|---|---|
| private final RefreshableOnNotAuthenticatedProvider<?> authDetailsProvider | |
| currentAttempt | back to summary |
|---|---|
| private int currentAttempt | |
| innerHandler | back to summary |
|---|---|
| private final AsyncHandler<REQUEST, RESPONSE> innerHandler | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| NUM_TRIES_ALLOWED | back to summary |
|---|---|
| private static final int NUM_TRIES_ALLOWED | |
| RefreshAuthTokenWrappingAsyncHandler | back to summary |
|---|---|
| public RefreshAuthTokenWrappingAsyncHandler(RefreshableOnNotAuthenticatedProvider<?> authDetailsProvider, AsyncHandler<REQUEST, RESPONSE> innerHandler) | |
| onError | back to summary |
|---|---|
| public void onError(REQUEST request, Throwable error) Implements com. Doc from com. Called if the request could not be completed successfully. | |
| onSuccess | back to summary |
|---|---|
| public void onSuccess(REQUEST request, RESPONSE response) Implements com. Doc from com. Called if the request was successfully completed.
| |
| retryCall | back to summary |
|---|---|
| public abstract void retryCall() If we need to retry the request (i.e. on a 401), this method contains the information on how to do that. This method will be leveraged by the onError callback of this handler. | |