Class Authorization.AuthorizationImpl

java.lang.Object
io.vertx.mutiny.ext.auth.authorization.Authorization.AuthorizationImpl
All Implemented Interfaces:
MutinyDelegate, Authorization
Enclosing interface:
Authorization

public static class Authorization.AuthorizationImpl extends Object implements Authorization
  • Constructor Details

    • AuthorizationImpl

      public AuthorizationImpl(io.vertx.ext.auth.authorization.Authorization delegate)
      Create a new instance of Authorization.AuthorizationImpl delegating to the given (non-null) instance of Authorization.
  • Method Details

    • getDelegate

      public io.vertx.ext.auth.authorization.Authorization 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:
      getDelegate in interface Authorization
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • match

      public boolean match(AuthorizationContext context)
      this methods verifies whether or not the authorization match the specified context.
      Specified by:
      match in interface Authorization
      Parameters:
      context - the context.
      Returns:
      true if there's a match.
    • match

      public boolean match(User user)
      this methods verifies whether or not the authorization match the specified user. Internally a basic context is created with the user and the method delegates to match(AuthorizationContext)
      Specified by:
      match in interface Authorization
      Parameters:
      user - the user.
      Returns:
      true if there's a match
    • verify

      public boolean verify(Authorization authorization)
      this method verifies whether or not the authorization implies the specified authorization.
      Note that it doesn't always mean an exact match. For instance, in the case of a WildcardPermissionBasedAuthorization, this method may return true even if the permissions are different
      WildcardPermissionBasedAuthorization.create('*').verify(WildcardPermissionBasedAuthorization.create('anypermission')) would return true
      Specified by:
      verify in interface Authorization
      Parameters:
      authorization - the authorization.
      Returns:
      true if implies the argument.
    • toJson

      public io.vertx.core.json.JsonObject toJson()
      Specified by:
      toJson in interface Authorization