io.vertx.rxjava.ext.web.handler

## Class OAuth2AuthHandler

- java.lang.Object
- - io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler

- All Implemented Interfaces:
    Handler<RoutingContext>, AuthHandler

      public class OAuth2AuthHandler
      extends Object
      implements AuthHandler

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

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuth2AuthHandler(OAuth2AuthHandler delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AuthHandler` | `addAuthorities(Set<String> authorities)` Add a set of required authorities for this auth handler
    `AuthHandler` | `addAuthority(String authority)` Add a required authority for this auth handler
    `String` | `authURI(String redirectURL, String state)` Build the authorization URL.
    `static OAuth2AuthHandler` | `create(OAuth2Auth authProvider, String uri)` Create a OAuth2 auth handler
    `Object` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)` Something has happened, so handle it.
    `static OAuth2AuthHandler` | `newInstance(OAuth2AuthHandler arg)`
    `OAuth2AuthHandler` | `setupCallback(Route route)` add the callback handler to a given route.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

      `newInstance`

- - ### Constructor Detail

    - #### OAuth2AuthHandler

          public OAuth2AuthHandler(OAuth2AuthHandler delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

      Specified by:
        `getDelegate` in interface `AuthHandler`

    - #### handle

          public void handle(RoutingContext arg0)

      Description copied from interface: `Handler`
      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Specified by:
        `handle` in interface `AuthHandler`
      Parameters:
        `arg0` - the event to handle

    - #### addAuthority

          public AuthHandler addAuthority(String authority)

      Add a required authority for this auth handler
      Specified by:
        `addAuthority` in interface `AuthHandler`
      Parameters:
        `authority` - the authority
      Returns:
        a reference to this, so the API can be used fluently

    - #### addAuthorities

          public AuthHandler addAuthorities(Set<String> authorities)

      Add a set of required authorities for this auth handler
      Specified by:
        `addAuthorities` in interface `AuthHandler`
      Parameters:
        `authorities` - the set of authorities
      Returns:
        a reference to this, so the API can be used fluently

    - #### create

          public static OAuth2AuthHandler create(OAuth2Auth authProvider,
                                                 String uri)

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

    - #### authURI

          public 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

          public OAuth2AuthHandler setupCallback(Route route)

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

    - #### newInstance

          public static OAuth2AuthHandler newInstance(OAuth2AuthHandler arg)

Copyright © 2016. All rights reserved.