Class List Method List File List

# Class: VertxAuthOauth2::KeycloakAuth

Inherits:
  Object
  - Object
  - VertxAuthOauth2::KeycloakAuth
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/keycloak_auth.rb

## Overview

Simplified factory to create an for Keycloak.

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (::VertxAuthOauth2::OAuth2Auth) create(param_1 = nil, param_2 = nil, param_3 = nil, param_4 = nil)
  Create a OAuth2Auth provider for Keycloak.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    19
    20
    21
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/keycloak_auth.rb', line 19

    def @@j_api_type.accept?(obj)
      obj.class == KeycloakAuth
    end

### + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, config) + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, flow, config) + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, config, httpClientOptions) + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, flow, config, httpClientOptions)

Create a OAuth2Auth provider for Keycloak

Overloads:

- + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, config)

  Parameters:

  - vertx (`::Vertx::Vertx`)
  - config (`Hash{String => Object}`) —
    the json config file exported from Keycloak admin console
- + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, flow, config)

  Parameters:

  - vertx (`::Vertx::Vertx`)
  - flow (`:AUTH_CODE`, `:CLIENT`, `:PASSWORD`, `:AUTH_JWT`) —
    the oauth2 flow to use
  - config (`Hash{String => Object}`) —
    the json config file exported from Keycloak admin console
- + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, config, httpClientOptions)

  Parameters:

  - vertx (`::Vertx::Vertx`)
  - config (`Hash{String => Object}`) —
    the json config file exported from Keycloak admin console
  - httpClientOptions (`Hash`) —
    custom http client options
- + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx, flow, config, httpClientOptions)

  Parameters:

  - vertx (`::Vertx::Vertx`)
  - flow (`:AUTH_CODE`, `:CLIENT`, `:PASSWORD`, `:AUTH_JWT`) —
    the oauth2 flow to use
  - config (`Hash{String => Object}`) —
    the json config file exported from Keycloak admin console
  - httpClientOptions (`Hash`) —
    custom http client options

Returns:

- (`::VertxAuthOauth2::OAuth2Auth`)

Raises:

- (`ArgumentError`)

    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/keycloak_auth.rb', line 52

    def self.create(param_1=nil,param_2=nil,param_3=nil,param_4=nil)
      if param_1.class.method_defined?(:j_del) && param_2.class == Hash && !block_given? && param_3 == nil && param_4 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2)),::VertxAuthOauth2::OAuth2Auth)
      elsif param_1.class.method_defined?(:j_del) && param_2.class == Symbol && param_3.class == Hash && !block_given? && param_4 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2FlowType.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(param_1.j_del,Java::IoVertxExtAuthOauth2::OAuth2FlowType.valueOf(param_2.to_s),::Vertx::Util::Utils.to_json_object(param_3)),::VertxAuthOauth2::OAuth2Auth)
      elsif param_1.class.method_defined?(:j_del) && param_2.class == Hash && param_3.class == Hash && !block_given? && param_4 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2),Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(param_3))),::VertxAuthOauth2::OAuth2Auth)
      elsif param_1.class.method_defined?(:j_del) && param_2.class == Symbol && param_3.class == Hash && param_4.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2FlowType.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(param_1.j_del,Java::IoVertxExtAuthOauth2::OAuth2FlowType.valueOf(param_2.to_s),::Vertx::Util::Utils.to_json_object(param_3),Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(param_4))),::VertxAuthOauth2::OAuth2Auth)
      end
      raise ArgumentError, "Invalid arguments when calling create(#{param_1},#{param_2},#{param_3},#{param_4})"
    end

### + (`Object`) j_api_type

    28
    29
    30
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/keycloak_auth.rb', line 28

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    31
    32
    33
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/keycloak_auth.rb', line 31

    def self.j_class
      Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_class
    end

### + (`Object`) unwrap(obj)

    25
    26
    27
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/keycloak_auth.rb', line 25

    def @@j_api_type.unwrap(obj)
      obj.j_del
    end

### + (`Object`) wrap(obj)

    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/keycloak_auth.rb', line 22

    def @@j_api_type.wrap(obj)
      KeycloakAuth.new(obj)
    end