Class: VertxAuth::ShiroAuthService

Inherits:
AuthService show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-auth-service/src/main/resources/vertx-auth/shiro_auth_service.rb

Overview

An Auth service implementation that uses Apache Shiro internally.

Class Method Summary (collapse)

Methods inherited from AuthService

create_event_bus_proxy, create_from_class_name, #has_permission, #has_permissions, #has_role, #has_roles, #login, #login_with_timeout, #logout, #refresh_login_session, #set_reaper_period, #start, #stop

Class Method Details

+ (::VertxAuth::AuthService) create(vertx = nil, authRealmType = nil, config = nil)

Create an auth service using the specified auth realm type.

Parameters:

  • vertx (::Vertx::Vertx) (defaults to: nil)
    the Vert.x intance
  • authRealmType (:PROPERTIES, :LDAP) (defaults to: nil)
    the auth realm type
  • config (Hash{String => Object}) (defaults to: nil)
    the config to pass to the provider

Returns:

Raises:

  • (ArgumentError)


24
25
26
27
28
29
# File '/Users/julien/java/vertx-aggregator/modules/vertx-auth-service/src/main/resources/vertx-auth/shiro_auth_service.rb', line 24

def self.create(vertx=nil,authRealmType=nil,config=nil)
  if vertx.class.method_defined?(:j_del) && authRealmType.class == Symbol && config.class == Hash && !block_given?
    return ::VertxAuth::AuthService.new(Java::IoVertxExtAuthShiro::ShiroAuthService.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(authRealmType),::Vertx::Util::Utils.to_json_object(config)))
  end
  raise ArgumentError, "Invalid arguments when calling create(vertx,authRealmType,config)"
end