- java.lang.Object
-
- vertx.effect.core.OauthBuilder<AuthorizationCodeFlowBuilder>
-
- vertx.effect.httpclient.oauth.AuthorizationCodeFlowBuilder
-
public class AuthorizationCodeFlowBuilder extends OauthBuilder<AuthorizationCodeFlowBuilder>
-
-
Field Summary
-
Fields inherited from class vertx.effect.core.OauthBuilder
accessTokenRetryPolicy, address, authorizationHeaderName, authorizationHeaderValue, options, readNewAccessTokenAfterRefresh, refreshTokenPredicate
-
-
Constructor Summary
Constructors Constructor Description AuthorizationCodeFlowBuilder(io.vertx.core.http.HttpClientOptions options, String address, Function<String,BiFunction<io.vertx.core.MultiMap,HttpClientModule,Val<jsonvalues.JsObj>>> refreshAccessTokenReq)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizationCodeModulecreateFromAuthReq(BiFunction<HttpClientModule,jsonvalues.JsObj,Val<jsonvalues.JsObj>> authenticateReq)AuthorizationCodeModulecreateFromRefreshToken(String refreshToken)AuthorizationCodeFlowBuilderreadTokensAfterAuthentication(λ<jsonvalues.JsObj,io.vavr.Tuple2<String,String>> readTokensAfterAuthentication)-
Methods inherited from class vertx.effect.core.OauthBuilder
accessTokenReqRetryPolicy, authorizationHeaderName, authorizationHeaderValue, readAccessTokenAfterRefresh, refreshTokenPredicate
-
-
-
-
Constructor Detail
-
AuthorizationCodeFlowBuilder
public AuthorizationCodeFlowBuilder(io.vertx.core.http.HttpClientOptions options, String address, Function<String,BiFunction<io.vertx.core.MultiMap,HttpClientModule,Val<jsonvalues.JsObj>>> refreshAccessTokenReq)
-
-
Method Detail
-
readTokensAfterAuthentication
public AuthorizationCodeFlowBuilder readTokensAfterAuthentication(λ<jsonvalues.JsObj,io.vavr.Tuple2<String,String>> readTokensAfterAuthentication)
-
createFromRefreshToken
public AuthorizationCodeModule createFromRefreshToken(String refreshToken)
-
createFromAuthReq
public AuthorizationCodeModule createFromAuthReq(BiFunction<HttpClientModule,jsonvalues.JsObj,Val<jsonvalues.JsObj>> authenticateReq)
- Parameters:
authenticateReq- a function that makes the authenticate request to get the access token and the refresh token. It takes two arguments, the HttpClientModule is the module that is being defined and will perform the authenticate request and a JsObj with all the required info to do the authentication ( in most cases a code and a redirect_uri ) that will be passed in when callingAuthorizationCodeModule.authenticate(JsObj).- Returns:
- an AuthorizationCodeModule instance
- See Also:
Spotify.authenticateReq(String, String)
-
-