Class: VertxAuthOauth2::KeycloakAuthorization

Inherits:
VertxAuthCommon::AuthorizationProvider show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_authorization.rb

Overview

Implementation of the Keycloak Authorization Provider.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Methods inherited from VertxAuthCommon::AuthorizationProvider

#get_authorizations, #get_id

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


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

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

+ (::VertxAuthOauth2::KeycloakAuthorization) create

Factory method to create an Authorization Provider for tokens adhering to the Keycloak token format. When the user is known to not be a JWT, (e.g.: a OAuth2 response token) then the root claim is expected to be the extracted from the user under the key: accessToken.

Returns:



40
41
42
43
44
45
46
47
48
49
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_authorization.rb', line 40

def self.create
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Authorization::KeycloakAuthorization.java_method(:create, []).call(),::VertxAuthOauth2::KeycloakAuthorization)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create()"
  end
end

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/keycloak_authorization.rb', line 32

def self.j_class
  Java::IoVertxExtAuthOauth2Authorization::KeycloakAuthorization.java_class
end

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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