Package io.vertx.rxjava3.ext.web.handler

## Class AuthorizationHandler

- java.lang.Object
- - io.vertx.rxjava3.ext.web.handler.AuthorizationHandler

- All Implemented Interfaces:
    `Handler<RoutingContext>`, `io.vertx.lang.rx.RxDelegate`

      public class AuthorizationHandler
      extends Object
      implements io.vertx.lang.rx.RxDelegate, Handler<RoutingContext>

  Base interface for authorization handlers that provide authorization support.

  AuthorizationHandlerImpl usually requires a `AuthenticationHandler` to be on the routing chain before it or a custom handler that has previously set a `User` in the `RoutingContext`

  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<AuthorizationHandler>` | `__TYPE_ARG` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `AuthorizationHandler` | `addAuthorizationProvider​(AuthorizationProvider authorizationProvider)` | Adds a provider that shall be used to retrieve the required authorizations for the user to attest.
    `static AuthorizationHandler` | `create()` | create the handler that will check the attribute based authorization.
    `static AuthorizationHandler` | `create​(Authorization authorization)` | create the handler that will check the specified authorization Note that to check several authorizations, you can specify a sub-interface such as `AndAuthorization` or `OrAuthorization`
    `boolean` | `equals​(Object o)` |
    `AuthorizationHandler` | `getDelegate()` |
    `void` | `handle​(RoutingContext event)` | Something has happened, so handle it.
    `int` | `hashCode()` |
    `static AuthorizationHandler` | `newInstance​(AuthorizationHandler arg)` |
    `String` | `toString()` |

    - ### 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<AuthorizationHandler> __TYPE_ARG

  - ### Constructor Detail

    - #### AuthorizationHandler

          public AuthorizationHandler​(AuthorizationHandler delegate)

    - #### AuthorizationHandler

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

      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`

    - #### handle

          public void handle​(RoutingContext event)

      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Parameters:
        `event` - the event to handle

    - #### create

          public static AuthorizationHandler create​(Authorization authorization)

      create the handler that will check the specified authorization Note that to check several authorizations, you can specify a sub-interface such as `AndAuthorization` or `OrAuthorization`
      Parameters:
        `authorization` - the authorization to attest.
      Returns:
        fluent self.

    - #### create

          public static AuthorizationHandler create()

      create the handler that will check the attribute based authorization. In this mode, the required authorization is computed from the request itself or the metadata of the route. The important keys are:
      - `X-ABAC-Domain` - The domain of the permission, a domain is a the first segment of `domain:operation`
      - `X-ABAC-Operation` - The operation of the permission, the operation is a the second segment of `domain:operation`
      - `X-ABAC-Resource` - This is usually is a opaque string to mark the resource to access
      When any of these metadata values are missing they are replaced at runtime with their default values:
      - `X-ABAC-Domain` - Always `web`
      - `X-ABAC-Operation` - The request HTTP `HttpMethod` from
      - `X-ABAC-Resource` - The normalized request path from
      Returns:
        fluent self.

    - #### addAuthorizationProvider

          public AuthorizationHandler addAuthorizationProvider​(AuthorizationProvider authorizationProvider)

      Adds a provider that shall be used to retrieve the required authorizations for the user to attest. Multiple calls are allowed to retrieve authorizations from many sources.
      Parameters:
        `authorizationProvider` - a provider.
      Returns:
        fluent self.

    - #### newInstance

          public static AuthorizationHandler newInstance​(AuthorizationHandler arg)