Class List Method List File List

# Class: VertxWeb::RedirectAuthHandler

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

## Class Method Summary (collapse)

- + (Object) create(authProvider = nil, loginRedirectURL = nil, returnURLParam = nil)

## Instance Method Summary (collapse)

- - (Object) add_authorities(authorities = nil)
- - (Object) add_authority(authority = nil)
- - (Object) handle(arg0 = nil)
- - (RedirectAuthHandler) initialize(j_del) constructor
  A new instance of RedirectAuthHandler.
- - (Object) j_del

## Constructor Details

### - (`RedirectAuthHandler`) initialize(j_del)

Returns a new instance of RedirectAuthHandler

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

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(authProvider = nil, loginRedirectURL = nil, returnURLParam = nil)

Raises:

- (`ArgumentError`)

    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/redirect_auth_handler.rb', line 53

    def self.create(authProvider=nil,loginRedirectURL=nil,returnURLParam=nil)
      if authProvider.class.method_defined?(:j_del) && !block_given? && loginRedirectURL == nil && returnURLParam == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::RedirectAuthHandler.java_method(:create, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(authProvider.j_del),::VertxWeb::AuthHandlerImpl)
      elsif authProvider.class.method_defined?(:j_del) && loginRedirectURL.class == String && !block_given? && returnURLParam == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::RedirectAuthHandler.java_method(:create, [Java::IoVertxExtAuth::AuthProvider.java_class,Java::java.lang.String.java_class]).call(authProvider.j_del,loginRedirectURL),::VertxWeb::AuthHandlerImpl)
      elsif authProvider.class.method_defined?(:j_del) && loginRedirectURL.class == String && returnURLParam.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::RedirectAuthHandler.java_method(:create, [Java::IoVertxExtAuth::AuthProvider.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(authProvider.j_del,loginRedirectURL,returnURLParam),::VertxWeb::AuthHandlerImpl)
      end
      raise ArgumentError, "Invalid arguments when calling create(authProvider,loginRedirectURL,returnURLParam)"
    end

## Instance Method Details

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

Raises:

- (`ArgumentError`)

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

    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`)

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

    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`) handle(arg0 = nil)

Raises:

- (`ArgumentError`)

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

    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

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

    def j_del
      @j_del
    end