Package io.vertx.rxjava.ext.auth.authorization

## Class WildcardPermissionBasedAuthorization

- java.lang.Object
- - io.vertx.rxjava.ext.auth.authorization.WildcardPermissionBasedAuthorization

- All Implemented Interfaces:
    `Authorization`

      public class WildcardPermissionBasedAuthorization
      extends Object
      implements Authorization

  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 RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<WildcardPermissionBasedAuthorization>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `WildcardPermissionBasedAuthorization​(WildcardPermissionBasedAuthorization delegate)` |
    `WildcardPermissionBasedAuthorization​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static WildcardPermissionBasedAuthorization` | `create​(String permission)` |
    `boolean` | `equals​(Object o)` |
    `WildcardPermissionBasedAuthorization` | `getDelegate()` |
    `String` | `getPermission()` | return the value of the wildcard permission
    `String` | `getResource()` | returns an optional resource that the permission is assigned-on
    `int` | `hashCode()` |
    `boolean` | `match​(AuthorizationContext context)` | this methods verifies whether or not the authorization match the specified context.
    `boolean` | `match​(User user)` | this methods verifies whether or not the authorization match the specified user.
    `static WildcardPermissionBasedAuthorization` | `newInstance​(WildcardPermissionBasedAuthorization arg)` |
    `WildcardPermissionBasedAuthorization` | `setResource​(String resource)` | sets an optional resource that the permission is assigned-on
    `JsonObject` | `toJson()` |
    `String` | `toString()` |
    `boolean` | `verify​(Authorization authorization)` | this method verifies whether or not the authorization implies the specified authorization.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<WildcardPermissionBasedAuthorization> __TYPE_ARG

  - ### Constructor Detail

    - #### WildcardPermissionBasedAuthorization

          public WildcardPermissionBasedAuthorization​(WildcardPermissionBasedAuthorization delegate)

    - #### WildcardPermissionBasedAuthorization

          public WildcardPermissionBasedAuthorization​(Object delegate)

  - ### Method Detail

    - #### 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`

    - #### getDelegate

          public WildcardPermissionBasedAuthorization getDelegate()

      Specified by:
        `getDelegate` in interface `Authorization`

    - #### 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.

    - #### toJson

          public JsonObject toJson()

      Specified by:
        `toJson` in interface `Authorization`

    - #### 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
      Parameters:
        `resource` -
      Returns:

    - #### 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 `Authorization.match(io.vertx.rxjava.ext.auth.authorization.AuthorizationContext)`
      Parameters:
        `user` - the user.
      Returns:
        true if there's a match

    - #### newInstance

          public static WildcardPermissionBasedAuthorization newInstance​(WildcardPermissionBasedAuthorization arg)