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
    --- | ---
    `static OAuth2AuthHandler` | `create(OAuth2Auth authProvider)` Create a OAuth2 auth handler without host pinning.
    `static OAuth2AuthHandler` | `create(OAuth2Auth authProvider, String callbackURL)` Create a OAuth2 auth handler with host pinning
    `OAuth2AuthHandler` | `extraParams(JsonObject extraParams)` Extra parameters needed to be passed while requesting a token.
    `OAuth2AuthHandler` | `setupCallback(Route route)` add the callback handler to a given route.

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

      `addAuthorities, addAuthority, authorize, parseCredentials`

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

      `handle`

- - ### Method Detail

    - #### create

          static OAuth2AuthHandler create(OAuth2Auth authProvider,
                                          String callbackURL)

      Create a OAuth2 auth handler with host pinning
      Parameters:
        `authProvider` - the auth provider to use
        `callbackURL` - the callback URL you entered in your provider admin console, usually it should be something like: `https://myserver:8888/callback`
      Returns:
        the auth handler

    - #### create

          static OAuth2AuthHandler create(OAuth2Auth authProvider)

      Create a OAuth2 auth handler without host pinning. Most providers will not look to the redirect url but always redirect to the preconfigured callback. So this factory does not provide a callback url.
      Parameters:
        `authProvider` - the auth provider to use
      Returns:
        the auth handler

    - #### extraParams

          OAuth2AuthHandler extraParams(JsonObject extraParams)

      Extra parameters needed to be passed while requesting a token.
      Parameters:
        `extraParams` - extra optional parameters.
      Returns:
        self

    - #### setupCallback

          OAuth2AuthHandler setupCallback(Route route)

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

Copyright © 2018 Eclipse. All rights reserved.