Class: VertxAuthCommon::AuthorizationContext

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/authorization_context.rb

Overview

The AuthorizationContext contains properties that can be used to match authorizations.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


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

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

+ (::VertxAuthCommon::AuthorizationContext) create(user)

Factory for Authorization Context

Parameters:

Returns:



52
53
54
55
56
57
58
59
60
61
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/authorization_context.rb', line 52

def self.create(*args)
  if args[0].class.method_defined?(:j_del) && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthAuthorization::AuthorizationContext.java_method(:create, [Java::IoVertxExtAuth::User.java_class]).call(args[0].j_del),::VertxAuthCommon::AuthorizationContext)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create(#{args[0]})"
  end
end

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



33
34
35
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/authorization_context.rb', line 33

def self.j_class
  Java::IoVertxExtAuthAuthorization::AuthorizationContext.java_class
end

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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

Instance Method Details

- (::VertxAuthCommon::User) user

Get the authenticated user

Returns:



65
66
67
68
69
70
71
72
73
74
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/authorization_context.rb', line 65

def user
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:user, []).call(),::VertxAuthCommon::User)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling user()"
  end
end

- (::Vertx::MultiMap) variables

Returns a Multimap containing variable names and values that can be resolved at runtime by {::VertxAuthCommon::Authorization}Authorizations

Returns:

  • (::Vertx::MultiMap)
    a Multimap containing variable names and values that can be resolved at runtime by {::VertxAuthCommon::Authorization}Authorizations


38
39
40
41
42
43
44
45
46
47
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/authorization_context.rb', line 38

def variables
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:variables, []).call(),::Vertx::MultiMap)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling variables()"
  end
end