Class List Method List File List

# Class: VertxWeb::OAuth2AuthHandler

Inherits:
  Object
  - Object
  - VertxWeb::OAuth2AuthHandler
  show all
Includes:
  AuthHandler
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb

## Class Method Summary (collapse)

- + (Object) create(authProvider = nil, uri = nil)

## Instance Method Summary (collapse)

- - (Object) add_authorities(authorities = nil)
- - (Object) add_authority(authority = nil)
- - (Object) auth_uri(redirectURL = nil, state = nil)
- - (Object) handle(arg0 = nil)
- - (OAuth2AuthHandler) initialize(j_del) constructor
  A new instance of OAuth2AuthHandler.
- - (Object) j_del
- - (Object) setup_callback(route = nil)

## Constructor Details

### - (`OAuth2AuthHandler`) initialize(j_del)

Returns a new instance of OAuth2AuthHandler

    13
    14
    15
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 13

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(authProvider = nil, uri = nil)

Raises:

- (`ArgumentError`)

    53
    54
    55
    56
    57
    58
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 53

    def self.create(authProvider=nil,uri=nil)
      if authProvider.class.method_defined?(:j_del) && uri.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::OAuth2AuthHandler.java_method(:create, [Java::IoVertxExtAuthOauth2::OAuth2Auth.java_class,Java::java.lang.String.java_class]).call(authProvider.j_del,uri),::VertxWeb::OAuth2AuthHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(authProvider,uri)"
    end

## Instance Method Details

### - (`Object`) add_authorities(authorities = nil)

Raises:

- (`ArgumentError`)

    42
    43
    44
    45
    46
    47
    48
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 42

    def add_authorities(authorities=nil)
      if authorities.class == Set && !block_given?
        @j_del.java_method(:addAuthorities, [Java::JavaUtil::Set.java_class]).call(Java::JavaUtil::LinkedHashSet.new(authorities.map { |element| element }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling add_authorities(authorities)"
    end

### - (`Object`) add_authority(authority = nil)

Raises:

- (`ArgumentError`)

    32
    33
    34
    35
    36
    37
    38
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 32

    def add_authority(authority=nil)
      if authority.class == String && !block_given?
        @j_del.java_method(:addAuthority, [Java::java.lang.String.java_class]).call(authority)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling add_authority(authority)"
    end

### - (`Object`) auth_uri(redirectURL = nil, state = nil)

Raises:

- (`ArgumentError`)

    63
    64
    65
    66
    67
    68
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 63

    def auth_uri(redirectURL=nil,state=nil)
      if redirectURL.class == String && state.class == String && !block_given?
        return @j_del.java_method(:authURI, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(redirectURL,state)
      end
      raise ArgumentError, "Invalid arguments when calling auth_uri(redirectURL,state)"
    end

### - (`Object`) handle(arg0 = nil)

Raises:

- (`ArgumentError`)

    23
    24
    25
    26
    27
    28
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 23

    def handle(arg0=nil)
      if arg0.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(arg0.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling handle(arg0)"
    end

### - (`Object`) j_del

    18
    19
    20
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 18

    def j_del
      @j_del
    end

### - (`Object`) setup_callback(route = nil)

Raises:

- (`ArgumentError`)

    72
    73
    74
    75
    76
    77
    78
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/o_auth2_auth_handler.rb', line 72

    def setup_callback(route=nil)
      if route.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:setupCallback, [Java::IoVertxExtWeb::Route.java_class]).call(route.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling setup_callback(route)"
    end