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.

      @FunctionalInterface
      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
    Modifier and Type | Method and Description
    --- | ---
    `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.

- - ### Method Detail

    - #### isAuthorized

          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.

Copyright © 2018 Eclipse. All rights reserved.