Class RoleBasedAuthorization

  • All Implemented Interfaces:
    io.vertx.lang.rx.RxDelegate, Authorization

    public class RoleBasedAuthorization
    extends Object
    implements io.vertx.lang.rx.RxDelegate, Authorization
    Represents a role. Note that this role can optionally be assigned to a specific resource

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

    • Constructor Detail

      • RoleBasedAuthorization

        public RoleBasedAuthorization​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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.
      • 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.
      • getRole

        public String getRole()
        returns the role
        Returns:
      • getResource

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

        public RoleBasedAuthorization setResource​(String resource)
        sets an optional resource that the role is assigned-on
        Parameters:
        resource -
        Returns: