io.vertx.reactivex.ext.auth.oauth2

## Class OAuth2RBAC

- java.lang.Object
- - io.vertx.reactivex.ext.auth.oauth2.OAuth2RBAC

-     public class OAuth2RBAC
      extends Object

  Functional interface that allows users to implement custom RBAC verifiers for OAuth2/OpenId Connect. Users are to implement the `isAuthorized` method to verify authorities. For provides that do not export the permissions/roles in the token, this interface allows you to communicate with 3rd party services such as graph APIs to collect the required data. The contract is that once an authority is checked for a given user, it's value is cached during the execution of the request. If a user is stored to a persistent storage, or the token is introspected, the cache is cleared and a new call will be handled to the implementation.

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuth2RBAC(OAuth2RBAC delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `OAuth2RBAC` | `getDelegate()`
    `int` | `hashCode()`
    `void` | `isAuthorized(AccessToken user, String authority, Handler<AsyncResult<Boolean>> handler)` This method should verify if the user has the given authority and return either a boolean value or an error.
    `static OAuth2RBAC` | `newInstance(OAuth2RBAC arg)`
    `Single<Boolean>` | `rxIsAuthorized(AccessToken user, String authority)` This method should verify if the user has the given authority and return either a boolean value or an error.
    `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<OAuth2RBAC> __TYPE_ARG

  - ### Constructor Detail

    - #### OAuth2RBAC

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

    - #### isAuthorized

          public void isAuthorized(AccessToken user,
                                   String authority,
                                   Handler<AsyncResult<Boolean>> handler)

      This method should verify if the user has the given authority and return either a boolean value or an error. Note that false and errors are not the same. A user might not have a given authority but that doesn't mean that there was an error during the call.
      Parameters:
        `user` - the given user to assert on
        `authority` - the authority to lookup
        `handler` - the result handler.

    - #### rxIsAuthorized

          public Single<Boolean> rxIsAuthorized(AccessToken user,
                                                String authority)

      This method should verify if the user has the given authority and return either a boolean value or an error. Note that false and errors are not the same. A user might not have a given authority but that doesn't mean that there was an error during the call.
      Parameters:
        `user` - the given user to assert on
        `authority` - the authority to lookup
      Returns:

    - #### newInstance

          public static OAuth2RBAC newInstance(OAuth2RBAC arg)

Copyright © 2018 Eclipse. All rights reserved.