Package: io.vertx.groovy.ext.web.handler

## [Groovy] Class OAuth2AuthHandler

- io.vertx.groovy.ext.web.handler.OAuth2AuthHandler

- All Implemented Interfaces and Traits:
    AuthHandler

      @groovy.transform.CompileStatic
      class OAuth2AuthHandler
      extends java.lang.Object

  An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `OAuth2AuthHandler (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `AuthHandler` | `addAuthorities(java.util.Set<java.lang.String> authorities)` Add a set of required authorities for this auth handler
    `AuthHandler` | `addAuthority(java.lang.String authority)` Add a required authority for this auth handler
    `java.lang.String` | `authURI(java.lang.String redirectURL, java.lang.String state)` Build the authorization URL.
    `static OAuth2AuthHandler` | `create(OAuth2Auth authProvider, java.lang.String uri)` Create a OAuth2 auth handler
    `java.lang.Object` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)`
    `OAuth2AuthHandler` | `setupCallback(Route route)` add the callback handler to a given route.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### OAuth2AuthHandler(java.lang.Object delegate)

  - ### Method Detail

    - #### AuthHandler addAuthorities(java.util.Set<java.lang.String> authorities)

      Add a set of required authorities for this auth handler

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `authorities` - the set of authorities

    - #### AuthHandler addAuthority(java.lang.String authority)

      Add a required authority for this auth handler

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `authority` - the authority

    - #### java.lang.String authURI(java.lang.String redirectURL, java.lang.String state)

      Build the authorization URL.

      Returns:
        the redirect URL
      Parameters:
        `redirectURL` - where is the callback mounted.
        `state` - state opaque token to avoid forged requests

    - #### static OAuth2AuthHandler create(OAuth2Auth authProvider, java.lang.String uri)

      Create a OAuth2 auth handler

      Returns:
        the auth handler
      Parameters:
        `authProvider` - the auth provider to use
        uri

    - #### java.lang.Object getDelegate()

    - #### void handle(RoutingContext arg0)

    - #### OAuth2AuthHandler setupCallback(Route route)

      add the callback handler to a given route.

      Returns:
        self
      Parameters:
        `route` - a given route e.g.: `/callback`