io.vertx.ext.auth.oauth2

## Interface OAuth2RBAC

- Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

  Deprecated.
  use the new Authorization API `AuthorizationProvider`

      @FunctionalInterface
       @Deprecated
      public interface OAuth2RBAC

  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.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `default Future<Boolean>` | `isAuthorized(AccessToken user, String authority)` Deprecated. This method should verify if the user has the given authority and return either a boolean value or an error.
    `void` | `isAuthorized(AccessToken user, String authority, Handler<AsyncResult<Boolean>> handler)` Deprecated. This method should verify if the user has the given authority and return either a boolean value or an error.

- - ### Method Detail

    - #### isAuthorized

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

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

    - #### isAuthorized

          default Future<Boolean> isAuthorized(AccessToken user,
                                               String authority)

      Deprecated.
      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:
        future with the result.
      See Also:
        `isAuthorized(AccessToken, String, Handler)`

Copyright © 2020 Eclipse. All rights reserved.