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
-
public class OAuth2WebClient extends WebClient
An asynchronous OAuth2/OIDC aware HTTP / HTTP/2 client calledWebClientOAuth2
.This client wraps a
WebClient
and makes it session aware adding features to it:- Request an
access_token
if no user is created - Refresh
access_token
if current user is expired
NOTE: This class has been automatically generated from the
original
non RX-ified interface using Vert.x codegen. - Request an
-
-
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 OAuth2WebClient
create(WebClient webClient, OAuth2Auth oAuth2Auth)
Create a session aware web client using the providedwebClient
instance.static OAuth2WebClient
create(WebClient webClient, OAuth2Auth oAuth2Auth, OAuth2WebClientOptions options)
Create a session aware web client using the providedwebClient
instance.boolean
equals(Object o)
OAuth2WebClient
getDelegate()
User
getUser()
Get the authenticated user (if any) that is associated with this client.int
hashCode()
static OAuth2WebClient
newInstance(OAuth2WebClient arg)
String
toString()
OAuth2WebClient
withCredentials(Credentials credentials)
Mark that request should be dispatched with authentication obtained from passedOAuth2Auth
provider-
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()
- Overrides:
getDelegate
in classWebClient
-
create
public static OAuth2WebClient create(WebClient webClient, OAuth2Auth oAuth2Auth)
Create a session aware web client using the providedwebClient
instance.- Parameters:
webClient
- the web client instanceoAuth2Auth
- Configured oAuth2Auth provider to be used whenwithCredentials(io.vertx.rxjava3.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 providedwebClient
instance.- Parameters:
webClient
- the web client instanceoAuth2Auth
- Configured oAuth2Auth provider to be used whenwithCredentials(io.vertx.rxjava3.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 passedOAuth2Auth
provider- Parameters:
credentials
-- Returns:
- a reference to this, so the API can be used fluently
-
newInstance
public static OAuth2WebClient newInstance(OAuth2WebClient arg)
-
-