java.lang.Object
io.vertx.mutiny.ext.web.client.WebClient
io.vertx.mutiny.ext.web.client.OAuth2WebClient
All Implemented Interfaces:
io.smallrye.mutiny.vertx.MutinyDelegate

public class OAuth2WebClient extends WebClient implements io.smallrye.mutiny.vertx.MutinyDelegate
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_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 Mutiny-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.smallrye.mutiny.vertx.TypeArg<OAuth2WebClient> __TYPE_ARG
  • Constructor Details

    • OAuth2WebClient

      public OAuth2WebClient(io.vertx.ext.web.client.OAuth2WebClient delegate)
    • OAuth2WebClient

      public OAuth2WebClient(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.client.OAuth2WebClient getDelegate()
      Specified by:
      getDelegate in interface io.smallrye.mutiny.vertx.MutinyDelegate
      Overrides:
      getDelegate in class WebClient
    • toString

      public String toString()
      Overrides:
      toString in class WebClient
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class WebClient
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class WebClient
    • create

      public static OAuth2WebClient create(WebClient webClient, io.vertx.mutiny.ext.auth.oauth2.OAuth2Auth oAuth2Auth)
      Parameters:
      webClient - the web client instance
      oAuth2Auth - Configured oAuth2Auth provider to be used when withCredentials(io.vertx.ext.auth.authentication.Credentials) used
      Returns:
      the created client
    • create

      public static OAuth2WebClient create(WebClient webClient, io.vertx.mutiny.ext.auth.oauth2.OAuth2Auth oAuth2Auth, io.vertx.ext.web.client.OAuth2WebClientOptions options)
      Parameters:
      webClient - the web client instance
      oAuth2Auth - Configured oAuth2Auth provider to be used when withCredentials(io.vertx.ext.auth.authentication.Credentials) used
      options - extra configuration for this object
      Returns:
      the created client
    • getUser

      public io.vertx.mutiny.ext.auth.User getUser()
      Returns:
      the current user associated with this client or null if no user is associated
    • withCredentials

      public OAuth2WebClient withCredentials(io.vertx.ext.auth.authentication.Credentials credentials)
      Parameters:
      credentials -
      Returns:
      a reference to this, so the API can be used fluently
    • newInstance

      public static OAuth2WebClient newInstance(io.vertx.ext.web.client.OAuth2WebClient arg)