Package io.vertx.ext.auth.abac

## Interface Attribute

-     public interface Attribute

  An attribute is a simple matcher for policies. A Attribute is created from a JsonPointer to the `User` object and a logical operator:
  - `has(String, Object)` - the value must be in the JsonArray or JsonObject
  - `eq(String, Object)` - the value must be equals to the pointed location
  - `ne(String, Object)` - the value must not be equals to the pointed location

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Attribute` | `create​(Function<User,​Boolean> function)` | A custom function to be used during matching.
    `static Attribute` | `eq​(String pointer, Object value)` | Verifies whether the attribute matches the specified.
    `static Attribute` | `has​(String pointer, Object value)` | Verifies whether the attribute matches the specified.
    `boolean` | `match​(User user)` | Verifies whether the attribute matches the specified user.
    `static Attribute` | `ne​(String pointer, Object value)` | Verifies whether the attribute matches the specified.
    `JsonObject` | `toJson()` |

- - ### Method Detail

    - #### has

          static Attribute has​(String pointer,
                               Object value)

      Verifies whether the attribute matches the specified. The value must be in the JsonArray or JsonObject referenced by the json pointer.

    - #### eq

          static Attribute eq​(String pointer,
                              Object value)

      Verifies whether the attribute matches the specified. The value must be equal to the value referenced by the json pointer.

    - #### ne

          static Attribute ne​(String pointer,
                              Object value)

      Verifies whether the attribute matches the specified. The value must not be equal to the value referenced by the json pointer.

    - #### create

          static Attribute create​(Function<User,​Boolean> function)

      A custom function to be used during matching.

    - #### match

          boolean match​(User user)

      Verifies whether the attribute matches the specified user.
      Parameters:
        `user` - the user.
      Returns:
        true if there's a match

    - #### toJson

          JsonObject toJson()