Class List Method List File List

# Class: VertxWeb::JWTAuthHandler

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

## Class Method Summary (collapse)

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

## Instance Method Summary (collapse)

- - (Object) add_authorities(authorities = nil)
- - (Object) add_authority(authority = nil)
- - (Object) handle(arg0 = nil)
- - (JWTAuthHandler) initialize(j_del) constructor
  A new instance of JWTAuthHandler.
- - (Object) j_del
- - (Object) set_audience(audience = nil)
- - (Object) set_ignore_expiration(ignoreExpiration = nil)
- - (Object) set_issuer(issuer = nil)

## Constructor Details

### - (`JWTAuthHandler`) initialize(j_del)

Returns a new instance of JWTAuthHandler

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

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

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

Raises:

- (`ArgumentError`)

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

    def self.create(authProvider=nil,skip=nil)
      if authProvider.class.method_defined?(:j_del) && !block_given? && skip == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::JWTAuthHandler.java_method(:create, [Java::IoVertxExtAuthJwt::JWTAuth.java_class]).call(authProvider.j_del),::VertxWeb::JWTAuthHandler)
      elsif authProvider.class.method_defined?(:j_del) && skip.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::JWTAuthHandler.java_method(:create, [Java::IoVertxExtAuthJwt::JWTAuth.java_class,Java::java.lang.String.java_class]).call(authProvider.j_del,skip),::VertxWeb::JWTAuthHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(authProvider,skip)"
    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/jwt_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/jwt_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/jwt_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/jwt_auth_handler.rb', line 17

    def j_del
      @j_del
    end

### - (`Object`) set_audience(audience = nil)

Raises:

- (`ArgumentError`)

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

    def set_audience(audience=nil)
      if audience.class == Array && !block_given?
        @j_del.java_method(:setAudience, [Java::JavaUtil::List.java_class]).call(audience.map { |element| element })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_audience(audience)"
    end

### - (`Object`) set_ignore_expiration(ignoreExpiration = nil)

Raises:

- (`ArgumentError`)

    83
    84
    85
    86
    87
    88
    89
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/jwt_auth_handler.rb', line 83

    def set_ignore_expiration(ignoreExpiration=nil)
      if (ignoreExpiration.class == TrueClass || ignoreExpiration.class == FalseClass) && !block_given?
        @j_del.java_method(:setIgnoreExpiration, [Java::boolean.java_class]).call(ignoreExpiration)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_ignore_expiration(ignoreExpiration)"
    end

### - (`Object`) set_issuer(issuer = nil)

Raises:

- (`ArgumentError`)

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

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