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
An asynchronous OAuth2/OIDC aware HTTP / HTTP/2 client called
WebClientOAuth2.
This client wraps a WebClient and 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 original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.booleangetUser()Get the authenticated user (if any) that is associated with this client.inthashCode()static OAuth2WebClienttoString()withCredentials(Credentials credentials) Mark that request should be dispatched with authentication obtained from passedOAuth2AuthproviderMethods inherited from class WebClient
close, create, create, create, create, 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, request, requestAbs, requestAbs, requestAbs, requestAbs, rxUpdateSSLOptions, rxUpdateSSLOptions, updateSSLOptions, updateSSLOptions, wrap, wrap
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
OAuth2WebClient
-
OAuth2WebClient
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
getDelegatein classWebClient
-
create
Create a session aware web client using the providedwebClientinstance.- Parameters:
webClient- the web client instanceoAuth2Auth- Configured oAuth2Auth provider to be used whenwithCredentials(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(Credentials)usedoptions- extra configuration for this object- Returns:
- the created client
-
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
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
-