Class WildcardPermissionBasedAuthorization

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

public class WildcardPermissionBasedAuthorization extends Object implements Authorization, MutinyDelegate
Represents a wildcard permission (ie: 'manage:order:*' '*:orders', '*', etc.) Note that it can optionally be assigned to a specific resource

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

Author:
Stephane Bastian
See Also:
  • WildcardPermissionBasedAuthorization
  • Field Details

  • Constructor Details

    • WildcardPermissionBasedAuthorization

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

      public WildcardPermissionBasedAuthorization(Object delegate)
  • Method Details

    • getDelegate

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

      public static WildcardPermissionBasedAuthorization create(String permission)
    • getPermission

      public String getPermission()
      return the value of the wildcard permission
      Returns:
    • getResource

      public String getResource()
      returns an optional resource that the permission is assigned-on
      Returns:
    • setResource

      public WildcardPermissionBasedAuthorization setResource(String resource)
      sets an optional resource that the permission is assigned-on
      Returns:
    • verify

      public boolean verify(Authorization arg0)
      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.
    • match

      public boolean match(AuthorizationContext arg0)
      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.
    • toJson

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

      public boolean match(User arg0)
      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.
    • newInstance

      public static WildcardPermissionBasedAuthorization newInstance(io.vertx.ext.auth.authorization.WildcardPermissionBasedAuthorization delegate)
      Creates a new instance of the WildcardPermissionBasedAuthorization.
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object