io.vertx.rxjava3.ext.auth.authorization

## Class Authorization

- java.lang.Object
- - io.vertx.rxjava3.ext.auth.authorization.Authorization

- Direct Known Subclasses:
    AndAuthorization, NotAuthorization, OrAuthorization, PermissionBasedAuthorization, RoleBasedAuthorization, WildcardPermissionBasedAuthorization

      public class Authorization
      extends Object

  Interface representing any kind of authorization such as:
  - Role based authorization
  - Permission based authorization
  - Logical authorization (AND, OR, NOT)
  - Time based authorization (ie: allow access the last 5 days of the month, from 8am till 10am, etc.)
  - Context based authorization (ie: allow access if the ip address is 'xxx.xxx.xxx.xxx')
  - Custom based authorization (ie: based on a script or hard-coded code specific to an application)
  - etc.
  The following implementations are provided out of the box:
  - `AndAuthorization`
  - `NotAuthorization`
  - `OrAuthorization`
  - `PermissionBasedAuthorization`
  - `RoleBasedAuthorization`
  - `WildcardPermissionBasedAuthorization`

  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 and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<Authorization>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Authorization(Authorization delegate)`
    `Authorization(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Authorization` | `getDelegate()`
    `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 Authorization` | `newInstance(Authorization arg)`
    `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<Authorization> __TYPE_ARG

  - ### Constructor Detail

    - #### Authorization

          public Authorization(Authorization delegate)

    - #### Authorization

          public Authorization(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 Authorization getDelegate()

    - #### match

          public boolean match(AuthorizationContext context)

      this methods verifies whether or not the authorization match the specified context.
      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
      Parameters:
        `authorization` - the authorization.
      Returns:
        true if implies the argument.

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

    - #### newInstance

          public static Authorization newInstance(Authorization arg)

Copyright © 2023 Eclipse. All rights reserved.