io.vertx.ext.web.handler

## Interface OAuth2AuthHandler

- All Superinterfaces:
    AuthHandler, Handler<RoutingContext>

      public interface OAuth2AuthHandler
      extends AuthHandler

  An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.
  Author:
    Paulo Lopes

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `authURI(String redirectURL, String state)` Build the authorization URL.
    `static OAuth2AuthHandler` | `create(OAuth2Auth authProvider, String uri)` Create a OAuth2 auth handler
    `OAuth2AuthHandler` | `setupCallback(Route route)` add the callback handler to a given route.

    - ### Methods inherited from interface io.vertx.ext.web.handler.AuthHandler

      `addAuthorities, addAuthority`

    - ### Methods inherited from interface io.vertx.core.Handler

      `handle`

- - ### Method Detail

    - #### create

          static OAuth2AuthHandler create(OAuth2Auth authProvider,
                                          String uri)

      Create a OAuth2 auth handler
      Parameters:
        `authProvider` - the auth provider to use
      Returns:
        the auth handler

    - #### authURI

          String authURI(String redirectURL,
                         String state)

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

    - #### setupCallback

          OAuth2AuthHandler setupCallback(Route route)

      add the callback handler to a given route.
      Parameters:
        `route` - a given route e.g.: `/callback`
      Returns:
        self

Copyright © 2016. All rights reserved.