Class: VertxAuthShiro::ShiroAuth

Inherits:
VertxAuthCommon::AuthProvider show all
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-shiro/shiro_auth.rb

Overview

Factory interface for creating Apache Shiro based VertxAuthCommon::AuthProvider instances.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from VertxAuthCommon::AuthProvider

#authenticate

Class Method Details

+ (::VertxAuthShiro::ShiroAuth) create(vertx, options) + (::VertxAuthShiro::ShiroAuth) create(vertx, realmType, config)

Create a Shiro auth provider

Overloads:

Returns:

Raises:

  • (ArgumentError)


28
29
30
31
32
33
34
35
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-shiro/shiro_auth.rb', line 28

def self.create(param_1=nil,param_2=nil,param_3=nil)
  if param_1.class.method_defined?(:j_del) && param_2.class == Hash && !block_given? && param_3 == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthShiro::ShiroAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthShiro::ShiroAuthOptions.java_class]).call(param_1.j_del,Java::IoVertxExtAuthShiro::ShiroAuthOptions.new(::Vertx::Util::Utils.to_json_object(param_2))),::VertxAuthShiro::ShiroAuth)
  elsif param_1.class.method_defined?(:j_del) && param_2.class == Symbol && param_3.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(param_1.j_del,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.valueOf(param_2),::Vertx::Util::Utils.to_json_object(param_3)),::VertxAuthShiro::ShiroAuth)
  end
  raise ArgumentError, "Invalid arguments when calling create(param_1,param_2,param_3)"
end

Instance Method Details

- (::VertxAuthShiro::ShiroAuth) set_role_prefix(rolePrefix = nil)

Set the role prefix to distinguish from permissions when checking for isPermitted requests.

Parameters:

  • rolePrefix (String) (defaults to: nil)
    a Prefix e.g.: "role:"

Returns:

Raises:

  • (ArgumentError)


39
40
41
42
43
44
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-shiro/shiro_auth.rb', line 39

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