Class AuthorizationProvider

java.lang.Object
io.vertx.mutiny.ext.auth.authorization.AuthorizationProvider
All Implemented Interfaces:
MutinyDelegate
Direct Known Subclasses:
JDBCAuthorization, JWTAuthorization, KeycloakAuthorization, MicroProfileAuthorization, MongoAuthorization, PropertyFileAuthorization, ScopeAuthorization, SqlAuthorization

public class AuthorizationProvider extends Object implements MutinyDelegate
The role of an AuthorizationProvider is to return a set of Authorization. Note that each AuthorizationProvider must provide its own unique Id

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

  • Field Details

  • Constructor Details

    • AuthorizationProvider

      public AuthorizationProvider(io.vertx.ext.auth.authorization.AuthorizationProvider delegate)
    • AuthorizationProvider

      public AuthorizationProvider(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.auth.authorization.AuthorizationProvider 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
    • create

      public static AuthorizationProvider create(String id, Set<Authorization> authorizations)
      Parameters:
      id -
      authorizations -
      Returns:
    • getId

      public String getId()
      Returns:
    • getAuthorizations

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> getAuthorizations(User user)
      Updates the user with the set of authorizations.

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

      Parameters:
      user - user to lookup and update
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • getAuthorizationsAndAwait

      public Void getAuthorizationsAndAwait(User user)
      Blocking variant of getAuthorizations(io.vertx.mutiny.ext.auth.User).

      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:
      user - user to lookup and update
      Returns:
      the Void instance produced by the operation.
    • getAuthorizationsAndForget

      public void getAuthorizationsAndForget(User user)
      Variant of getAuthorizations(io.vertx.mutiny.ext.auth.User) that ignores the result of the operation.

      This method subscribes on the result of getAuthorizations(io.vertx.mutiny.ext.auth.User), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from getAuthorizations(io.vertx.mutiny.ext.auth.User) but you don't need to compose it with other operations.

      Parameters:
      user - user to lookup and update
    • newInstance

      public static AuthorizationProvider newInstance(io.vertx.ext.auth.authorization.AuthorizationProvider arg)