Class: VertxAuthShiro::ShiroAuth
- Inherits:
-
VertxAuthCommon::AuthProvider
- Object
- VertxAuthCommon::AuthProvider
- VertxAuthShiro::ShiroAuth
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-shiro/src/main/resources/vertx-auth-shiro/shiro_auth.rb
Overview
Factory interface for creating Apache Shiro based VertxAuthCommon::AuthProvider instances.
Class Method Summary (collapse)
-
+ (::VertxAuthShiro::ShiroAuth) create(vertx = nil, realmType = nil, config = nil)
Create a Shiro auth provider.
Instance Method Summary (collapse)
-
- (::VertxAuthShiro::ShiroAuth) set_role_prefix(rolePrefix = nil)
Set the role prefix to distinguish from permissions when checking for isPermitted requests.
Class Method Details
+ (::VertxAuthShiro::ShiroAuth) create(vertx = nil, realmType = nil, config = nil)
Create a Shiro auth provider
23 24 25 26 27 28 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-shiro/src/main/resources/vertx-auth-shiro/shiro_auth.rb', line 23 def self.create(vertx=nil,realmType=nil,config=nil) if vertx.class.method_defined?(:j_del) && realmType.class == Symbol && config.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(vertx.j_del,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.valueOf(realmType),::Vertx::Util::Utils.to_json_object(config)),::VertxAuthShiro::ShiroAuth) end raise ArgumentError, "Invalid arguments when calling create(vertx,realmType,config)" end |
Instance Method Details
- (::VertxAuthShiro::ShiroAuth) set_role_prefix(rolePrefix = nil)
Set the role prefix to distinguish from permissions when checking for isPermitted requests.
32 33 34 35 36 37 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-shiro/src/main/resources/vertx-auth-shiro/shiro_auth.rb', line 32 def set_role_prefix(rolePrefix=nil) if rolePrefix.class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setRolePrefix, [Java::java.lang.String.java_class]).call(rolePrefix),::VertxAuthShiro::ShiroAuth) end raise ArgumentError, "Invalid arguments when calling set_role_prefix(rolePrefix)" end |