Class: VertxAuthShiro::ShiroAuth
- Inherits:
-
VertxAuthCommon::AuthProvider
- Object
- VertxAuthCommon::AuthProvider
- VertxAuthShiro::ShiroAuth
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-shiro/shiro_auth.rb
Overview
Factory interface for creating Apache Shiro based VertxAuthCommon::AuthProvider instances.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (::VertxAuthShiro::ShiroAuth) create(*args)
Create a Shiro auth provider.
-
+ (Object) DEFAULT_ROLE_PREFIX
The default role prefix.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (::VertxAuthShiro::ShiroAuth) setRolePrefix(rolePrefix)
Set the role prefix to distinguish from permissions when checking for isPermitted requests.
Methods inherited from VertxAuthCommon::AuthProvider
Class Method Details
+ (Boolean) accept?(obj)
21 22 23 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-shiro/shiro_auth.rb', line 21 def @@j_api_type.accept?(obj) obj.class == ShiroAuth end |
+ (::VertxAuthShiro::ShiroAuth) create(vertx, options) + (::VertxAuthShiro::ShiroAuth) create(vertx, realmType, config)
Create a Shiro auth provider
59 60 61 62 63 64 65 66 67 68 69 70 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-shiro/shiro_auth.rb', line 59 def self.create(*args) if args[0].class.method_defined?(:j_del) && args[1].class == Hash && !block_given? && args[2] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthShiro::ShiroAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthShiro::ShiroAuthOptions.java_class]).call(args[0].j_del,Java::IoVertxExtAuthShiro::ShiroAuthOptions.new(::Vertx::Util::Utils.to_json_object(args[1]))),::VertxAuthShiro::ShiroAuth) elsif args[0].class.method_defined?(:j_del) && args[1].class == Symbol && args[2].class == Hash && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthShiro::ShiroAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(args[0].j_del,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.valueOf(args[1].to_s),::Vertx::Util::Utils.to_json_object(args[2])),::VertxAuthShiro::ShiroAuth) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling create(#{args[0]},#{args[1]},#{args[2]})" end end |
+ (Object) DEFAULT_ROLE_PREFIX
The default role prefix
72 73 74 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-shiro/shiro_auth.rb', line 72 def self.DEFAULT_ROLE_PREFIX Java::IoVertxExtAuthShiro::ShiroAuth.DEFAULT_ROLE_PREFIX 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-shiro/shiro_auth.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-shiro/shiro_auth.rb', line 33 def self.j_class Java::IoVertxExtAuthShiro::ShiroAuth.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-shiro/shiro_auth.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-shiro/shiro_auth.rb', line 24 def @@j_api_type.wrap(obj) ShiroAuth.new(obj) end |
Instance Method Details
- (::VertxAuthShiro::ShiroAuth) setRolePrefix(rolePrefix)
Set the role prefix to distinguish from permissions when checking for isPermitted requests.
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-shiro/shiro_auth.rb', line 40 def set_role_prefix(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setRolePrefix, [Java::java.lang.String.java_class]).call(args[0]),::VertxAuthShiro::ShiroAuth) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_role_prefix(#{args[0]})" end end |