public class TokenRefreshInterceptor extends Object implements Interceptor
Interceptor.RequestTags| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHORIZATION |
static String |
NAME |
| Constructor and Description |
|---|
TokenRefreshInterceptor(Config config,
HttpClient.Factory factory,
Instant latestRefreshTimestamp) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Boolean> |
afterFailure(BasicBuilder headerBuilder,
HttpResponse<?> response,
Interceptor.RequestTags tags)
Called after a websocket failure or by default from a normal request
|
void |
before(BasicBuilder headerBuilder,
HttpRequest request,
Interceptor.RequestTags tags)
Called before a request to allow for the manipulation of the request
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafter, afterFailure, consumerpublic static final String AUTHORIZATION
public static final String NAME
public TokenRefreshInterceptor(Config config, HttpClient.Factory factory, Instant latestRefreshTimestamp)
public void before(BasicBuilder headerBuilder, HttpRequest request, Interceptor.RequestTags tags)
Interceptorbefore in interface InterceptorheaderBuilder - used to modify the requestrequest - the current requestpublic CompletableFuture<Boolean> afterFailure(BasicBuilder headerBuilder, HttpResponse<?> response, Interceptor.RequestTags tags)
InterceptorafterFailure in interface InterceptorheaderBuilder - used to modify the requestresponse - the failed responseCopyright © 2015–2023 Red Hat. All rights reserved.