Class List Method List File List

# Class: VertxAuthOauth2::KeycloakRBAC

Inherits:
  Object
  - Object
  - VertxAuthOauth2::KeycloakRBAC
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_rbac.rb

## Overview

Implementation of the Keycloak RBAC handler.

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (::VertxAuthOauth2::OAuth2RBAC) create(options = nil)
  Factory method to create a RBAC handler for tokens adhering to the Keycloak token format.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Class Method Details

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

Returns:

- (`Boolean`)

    18
    19
    20
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_rbac.rb', line 18

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

### + (`::VertxAuthOauth2::OAuth2RBAC`) create(options = nil)

Factory method to create a RBAC handler for tokens adhering to the Keycloak token format.

Parameters:

- options (`Hash`) (defaults to: `nil`)

Returns:

- (`::VertxAuthOauth2::OAuth2RBAC`) —
  a RBAC validator

Raises:

- (`ArgumentError`)

    36
    37
    38
    39
    40
    41
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_rbac.rb', line 36

    def self.create(options=nil)
      if options.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Rbac::KeycloakRBAC.java_method(:create, [Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.java_class]).call(Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxAuthOauth2::OAuth2RBAC)
      end
      raise ArgumentError, "Invalid arguments when calling create(#{options})"
    end

### + (`Object`) j_api_type

    27
    28
    29
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_rbac.rb', line 27

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    30
    31
    32
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_rbac.rb', line 30

    def self.j_class
      Java::IoVertxExtAuthOauth2Rbac::KeycloakRBAC.java_class
    end

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

    24
    25
    26
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_rbac.rb', line 24

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

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

    21
    22
    23
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_rbac.rb', line 21

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