Class AuthenticationProvider

java.lang.Object
io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
All Implemented Interfaces:
MutinyDelegate
Direct Known Subclasses:
AuthProvider, ChainAuth, HotpAuth, HtdigestAuth, HtpasswdAuth, JDBCAuthentication, JWTAuth, LdapAuthentication, MongoAuthentication, OAuth2Auth, PropertyFileAuthentication, SqlAuthentication, TotpAuth, WebAuthn

public class AuthenticationProvider extends Object implements MutinyDelegate
User-facing interface for authenticating users.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • AuthenticationProvider

      public AuthenticationProvider(io.vertx.ext.auth.authentication.AuthenticationProvider delegate)
    • AuthenticationProvider

      public AuthenticationProvider(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.auth.authentication.AuthenticationProvider getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • toString

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • authenticate

      @CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<User> authenticate(io.vertx.core.json.JsonObject credentials)
      Deprecated.
      For type safety this method should be avoided and #authenticate(Credentials, Handler) should be used instead.
      Authenticate a user.

      The first argument is a JSON object containing information for authenticating the user. What this actually contains depends on the specific implementation. In the case of a simple username/password based authentication it is likely to contain a JSON object with the following structure:

         {
           "username": "tim",
           "password": "mypassword"
         }
       
      For other types of authentication it contain different information - for example a JWT token or OAuth bearer token.

      If the user is successfully authenticated a object is passed to the handler in an . The user object can then be used for authorisation.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      credentials - The credentials
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • authenticateAndAwait

      @Deprecated public User authenticateAndAwait(io.vertx.core.json.JsonObject credentials)
      Deprecated.
      For type safety this method should be avoided and #authenticate(Credentials, Handler) should be used instead.
      Blocking variant of authenticate(JsonObject).

      This method waits 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 a RuntimeException).

      Parameters:
      credentials - The credentials
      Returns:
      the User instance produced by the operation.
    • authenticateAndForget

      @Deprecated public void authenticateAndForget(io.vertx.core.json.JsonObject credentials)
      Deprecated.
      For type safety this method should be avoided and #authenticate(Credentials, Handler) should be used instead.
      Variant of authenticate(JsonObject) that ignores the result of the operation.

      This method subscribes on the result of authenticate(JsonObject), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from authenticate(JsonObject) but you don't need to compose it with other operations.

      Parameters:
      credentials - The credentials
    • authenticate

      @CheckReturnValue public io.smallrye.mutiny.Uni<User> authenticate(io.vertx.ext.auth.authentication.Credentials credentials)
      Authenticate a user.

      The first argument is a Credentials object containing information for authenticating the user. What this actually contains depends on the specific implementation. If the user is successfully authenticated a object is passed to the handler in an . The user object can then be used for authorisation.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      credentials - The credentials
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • authenticateAndAwait

      public User authenticateAndAwait(io.vertx.ext.auth.authentication.Credentials credentials)
      Blocking variant of authenticate(Credentials).

      This method waits 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 a RuntimeException).

      Parameters:
      credentials - The credentials
      Returns:
      the User instance produced by the operation.
    • authenticateAndForget

      public void authenticateAndForget(io.vertx.ext.auth.authentication.Credentials credentials)
      Variant of authenticate(Credentials) that ignores the result of the operation.

      This method subscribes on the result of authenticate(Credentials), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from authenticate(Credentials) but you don't need to compose it with other operations.

      Parameters:
      credentials - The credentials
    • newInstance

      public static AuthenticationProvider newInstance(io.vertx.ext.auth.authentication.AuthenticationProvider arg)