- java.lang.Object
-
- io.vertx.core.AbstractVerticle
-
- vertx.effect.VertxModule
-
- vertx.effect.core.AbstractHttpClientModule
-
- vertx.effect.httpclient.HttpClientModule
-
- vertx.effect.core.OauthModule
-
- All Implemented Interfaces:
io.vertx.core.Verticle
- Direct Known Subclasses:
AuthorizationCodeModule
,ClientCredentialsModule
public abstract class OauthModule extends HttpClientModule
-
-
Field Summary
Fields Modifier and Type Field Description protected String
accessToken
protected BiFunction<io.vertx.core.MultiMap,HttpClientModule,Val<jsonvalues.JsObj>>
accessTokenReq
protected int
accessTokenReqAttempts
protected String
authorizationHeaderName
protected Function<String,String>
authorizationHeaderValue
λc<ConnectReq,jsonvalues.JsObj>
connectOauth
λc<DeleteReq,jsonvalues.JsObj>
deleteOauth
λc<GetReq,jsonvalues.JsObj>
getOauth
λc<HeadReq,jsonvalues.JsObj>
headOauth
λc<OptionsReq,jsonvalues.JsObj>
optionsOauth
λc<PatchReq,jsonvalues.JsObj>
patchOauth
λc<PostReq,jsonvalues.JsObj>
postOauth
λc<PutReq,jsonvalues.JsObj>
putOauth
protected λ<jsonvalues.JsObj,String>
readNewAccessTokenAfterRefresh
protected Predicate<jsonvalues.JsObj>
refreshTokenPredicate
protected Predicate<Throwable>
retryAccessTokenReqPredicate
protected Predicate<Throwable>
retryReqPredicate
λc<TraceReq,jsonvalues.JsObj>
traceOauth
-
Fields inherited from class vertx.effect.httpclient.HttpClientModule
connect, delete, get, head, options, patch, post, put, trace
-
Fields inherited from class vertx.effect.core.AbstractHttpClientModule
httpClient, httpClientAddress, httpOptions
-
Fields inherited from class vertx.effect.VertxModule
deploymentOptions, vertxRef
-
-
Constructor Summary
Constructors Constructor Description OauthModule(io.vertx.core.http.HttpClientOptions options, String address, String authorizationHeaderName, Function<String,String> authorizationHeaderValue, λ<jsonvalues.JsObj,String> readNewAccessTokenAfterRefresh, Predicate<jsonvalues.JsObj> refreshTokenPredicate, Predicate<Throwable> retryAccessTokenReqPredicate, Predicate<Throwable> retryReqPredicate, int accessTokenReqAttempts, int reqAttempts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <I extends HttpReq<I>>
λc<I,jsonvalues.JsObj>oauth(λc<I,jsonvalues.JsObj> req, int reqAttempts, boolean refreshToken)
protected <I extends HttpReq<I>>
λc<I,jsonvalues.JsObj>resilientReq(λc<I,jsonvalues.JsObj> req, int reqAttempts)
-
Methods inherited from class vertx.effect.core.AbstractHttpClientModule
deploy, initialize
-
Methods inherited from class vertx.effect.VertxModule
ask, ask, deploy, deploy, deploy, deploy, deployConsumer, deployConsumer, deployVerticle, deployVerticle, start, tell, tell, trace, trace
-
-
-
-
Field Detail
-
accessToken
protected String accessToken
-
accessTokenReq
protected BiFunction<io.vertx.core.MultiMap,HttpClientModule,Val<jsonvalues.JsObj>> accessTokenReq
-
readNewAccessTokenAfterRefresh
protected final λ<jsonvalues.JsObj,String> readNewAccessTokenAfterRefresh
-
accessTokenReqAttempts
protected final int accessTokenReqAttempts
-
authorizationHeaderName
protected final String authorizationHeaderName
-
refreshTokenPredicate
protected final Predicate<jsonvalues.JsObj> refreshTokenPredicate
-
connectOauth
public final λc<ConnectReq,jsonvalues.JsObj> connectOauth
-
optionsOauth
public final λc<OptionsReq,jsonvalues.JsObj> optionsOauth
-
-
Constructor Detail
-
OauthModule
public OauthModule(io.vertx.core.http.HttpClientOptions options, String address, String authorizationHeaderName, Function<String,String> authorizationHeaderValue, λ<jsonvalues.JsObj,String> readNewAccessTokenAfterRefresh, Predicate<jsonvalues.JsObj> refreshTokenPredicate, Predicate<Throwable> retryAccessTokenReqPredicate, Predicate<Throwable> retryReqPredicate, int accessTokenReqAttempts, int reqAttempts)
-
-