Class OAuth2WebClient
- All Implemented Interfaces:
MutinyDelegate
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 Mutiny-ified interface.
- See Also:
-
OAuth2WebClient
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOAuth2WebClient(io.vertx.ext.web.client.OAuth2WebClient delegate) Create a new instance ofOAuth2WebClientdelegating to the given (non-null) instance ofOAuth2WebClient.OAuth2WebClient(Object delegate) -
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, io.vertx.ext.web.client.OAuth2WebClientOptions options) Create a session aware web client using the providedwebClientinstance.booleanio.vertx.ext.web.client.OAuth2WebClientGet the delegate instance.getUser()Get the authenticated user (if any) that is associated with this client.inthashCode()static OAuth2WebClientnewInstance(io.vertx.ext.web.client.OAuth2WebClient delegate) Creates a new instance of theOAuth2WebClient.toString()io.smallrye.mutiny.Uni<Boolean>updateSSLOptions(io.vertx.core.net.ClientSSLOptions arg0) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.io.smallrye.mutiny.Uni<Boolean>updateSSLOptions(io.vertx.core.net.ClientSSLOptions arg0, boolean arg1) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.updateSSLOptionsAndAwait(io.vertx.core.net.ClientSSLOptions arg0) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.updateSSLOptionsAndAwait(io.vertx.core.net.ClientSSLOptions arg0, boolean arg1) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.updateSSLOptionsAndForget(io.vertx.core.net.ClientSSLOptions arg0) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.updateSSLOptionsAndForget(io.vertx.core.net.ClientSSLOptions arg0, boolean arg1) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.withCredentials(io.vertx.ext.auth.authentication.Credentials credentials) Methods inherited from class io.vertx.mutiny.ext.web.client.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, wrap, wrap
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
OAuth2WebClient
public OAuth2WebClient(io.vertx.ext.web.client.OAuth2WebClient delegate) Create a new instance ofOAuth2WebClientdelegating to the given (non-null) instance ofOAuth2WebClient. -
OAuth2WebClient
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.client.OAuth2WebClient getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Overrides:
getDelegatein classWebClient- Returns:
- the delegate instance
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.ClientSSLOptions arg0) Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The boolean succeeded uni result indicates whether the update occurred.
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
updateSSLOptionsin classWebClient- Parameters:
options- the new SSL options- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebClient.updateSSLOptions(ClientSSLOptions)
-
updateSSLOptionsAndAwait
Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The boolean succeeded underlying uni result indicates whether the update occurred.
Unlike the bare Vert.x variant, this method returns a
Boolean. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
updateSSLOptionsAndAwaitin classWebClient- Parameters:
options- the new SSL options- Returns:
- The operation result
- See Also:
-
WebClient.updateSSLOptions(ClientSSLOptions)
-
updateSSLOptionsAndForget
Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The boolean succeeded underlying uni result indicates whether the update occurred.
Unlike the bare Vert.x variant, this method ignores the
Booleanresult or any failure.- Overrides:
updateSSLOptionsAndForgetin classWebClient- Parameters:
options- the new SSL options- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebClient.updateSSLOptions(ClientSSLOptions)
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.ClientSSLOptions arg0, boolean arg1) Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The
optionsobject is compared using itsequalsmethod against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, settingforcetotrueforces the update.The boolean succeeded uni result indicates whether the update occurred.
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
updateSSLOptionsin classWebClient- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
WebClient.updateSSLOptions(ClientSSLOptions, boolean)
-
updateSSLOptionsAndAwait
Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The
optionsobject is compared using itsequalsmethod against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, settingforcetotrueforces the update.The boolean succeeded underlying uni result indicates whether the update occurred.
Unlike the bare Vert.x variant, this method returns a
Boolean. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
updateSSLOptionsAndAwaitin classWebClient- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- The operation result
- See Also:
-
WebClient.updateSSLOptions(ClientSSLOptions, boolean)
-
updateSSLOptionsAndForget
public OAuth2WebClient updateSSLOptionsAndForget(io.vertx.core.net.ClientSSLOptions arg0, boolean arg1) Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The
optionsobject is compared using itsequalsmethod against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, settingforcetotrueforces the update.The boolean succeeded underlying uni result indicates whether the update occurred.
Unlike the bare Vert.x variant, this method ignores the
Booleanresult or any failure.- Overrides:
updateSSLOptionsAndForgetin classWebClient- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- The current instance to chain operations if needed.
- See Also:
-
WebClient.updateSSLOptions(ClientSSLOptions, boolean)
-
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, io.vertx.ext.web.client.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
-
withCredentials
-
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
-
newInstance
Creates a new instance of theOAuth2WebClient. -
hashCode
public int hashCode() -
equals
-
toString
-