Class List Method List File List

# Class: VertxAuthShiro::ShiroAuth

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

## Class Method Summary (collapse)

- + (Object) create(param_1 = nil, param_2 = nil, param_3 = nil)

## Instance Method Summary (collapse)

- - (Object) authenticate(arg0 = nil)
- - (ShiroAuth) initialize(j_del) constructor
  A new instance of ShiroAuth.
- - (Object) j_del
- - (Object) set_role_prefix(rolePrefix = nil)

## Constructor Details

### - (`ShiroAuth`) initialize(j_del)

Returns a new instance of ShiroAuth

    11
    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-shiro/shiro_auth.rb', line 11

    def initialize(j_del)
      super(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(param_1 = nil, param_2 = nil, param_3 = nil)

Raises:

- (`ArgumentError`)

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

    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

### - (`Object`) authenticate(arg0 = nil)

Raises:

- (`ArgumentError`)

    23
    24
    25
    26
    27
    28
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-shiro/shiro_auth.rb', line 23

    def authenticate(arg0=nil)
      if arg0.class == Hash && block_given?
        return @j_del.java_method(:authenticate, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(arg0),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthCommon::User) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling authenticate(arg0)"
    end

### - (`Object`) j_del

    17
    18
    19
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-shiro/shiro_auth.rb', line 17

    def j_del
      @j_del
    end

### - (`Object`) set_role_prefix(rolePrefix = nil)

Raises:

- (`ArgumentError`)

    49
    50
    51
    52
    53
    54
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-shiro/shiro_auth.rb', line 49

    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