Package io.vertx.rxjava3.ext.web.client
Class OAuth2WebClient
- java.lang.Object
-
- io.vertx.rxjava3.ext.web.client.WebClient
-
- io.vertx.rxjava3.ext.web.client.OAuth2WebClient
-
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
public class OAuth2WebClient extends WebClient implements io.vertx.lang.rx.RxDelegate
An asynchronous OAuth2/OIDC aware HTTP / HTTP/2 client calledWebClientOAuth2.This client wraps a
WebClientand makes it session aware adding features to it:- Request an
access_tokenif no user is created - Refresh
access_tokenif current user is expired
NOTE: This class has been automatically generated from the
originalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<OAuth2WebClient>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description OAuth2WebClient(OAuth2WebClient delegate)OAuth2WebClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OAuth2WebClientcreate(WebClient webClient, OAuth2Auth oAuth2Auth)Create a session aware web client using the providedwebClientinstance.static OAuth2WebClientcreate(WebClient webClient, OAuth2Auth oAuth2Auth, OAuth2WebClientOptions options)Create a session aware web client using the providedwebClientinstance.booleanequals(Object o)OAuth2WebClientgetDelegate()UsergetUser()Get the authenticated user (if any) that is associated with this client.inthashCode()static OAuth2WebClientnewInstance(OAuth2WebClient arg)StringtoString()OAuth2WebClientwithCredentials(Credentials credentials)Mark that request should be dispatched with authentication obtained from passedOAuth2Authprovider-
Methods inherited from class io.vertx.rxjava3.ext.web.client.WebClient
close, create, create, create, delete, delete, delete, delete, delete, delete, deleteAbs, deleteAbs, get, get, get, get, get, get, getAbs, getAbs, head, head, head, head, head, head, headAbs, headAbs, newInstance, patch, patch, patch, patch, patch, patch, patchAbs, patchAbs, post, post, post, post, post, post, postAbs, postAbs, put, put, put, put, put, put, putAbs, putAbs, request, request, request, request, request, request, request, request, request, request, request, request, request, request, requestAbs, requestAbs, requestAbs, requestAbs, rxUpdateSSLOptions, rxUpdateSSLOptions, updateSSLOptions, updateSSLOptions, wrap, wrap
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<OAuth2WebClient> __TYPE_ARG
-
-
Constructor Detail
-
OAuth2WebClient
public OAuth2WebClient(OAuth2WebClient delegate)
-
OAuth2WebClient
public OAuth2WebClient(Object delegate)
-
-
Method Detail
-
getDelegate
public OAuth2WebClient getDelegate()
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
getDelegatein classWebClient
-
create
public static OAuth2WebClient create(WebClient webClient, OAuth2Auth oAuth2Auth)
Create a session aware web client using the providedwebClientinstance.- Parameters:
webClient- the web client instanceoAuth2Auth- Configured oAuth2Auth provider to be used whenwithCredentials(io.vertx.ext.auth.authentication.Credentials)used- Returns:
- the created client
-
create
public static OAuth2WebClient create(WebClient webClient, OAuth2Auth oAuth2Auth, OAuth2WebClientOptions options)
Create a session aware web client using the providedwebClientinstance.- Parameters:
webClient- the web client instanceoAuth2Auth- Configured oAuth2Auth provider to be used whenwithCredentials(io.vertx.ext.auth.authentication.Credentials)usedoptions- extra configuration for this object- Returns:
- the created client
-
getUser
public User getUser()
Get the authenticated user (if any) that is associated with this client.- Returns:
- the current user associated with this client or null if no user is associated
-
withCredentials
public OAuth2WebClient withCredentials(Credentials credentials)
Mark that request should be dispatched with authentication obtained from passedOAuth2Authprovider- Parameters:
credentials-- Returns:
- a reference to this, so the API can be used fluently
-
newInstance
public static OAuth2WebClient newInstance(OAuth2WebClient arg)
-
-