Class List Method List File List

# Class: VertxAuthCommon::AuthProvider

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

## Direct Known Subclasses

VertxAuthJdbc::JDBCAuth, VertxAuthJwt::JWTAuth, VertxAuthMongo::MongoAuth, VertxAuthOauth2::OAuth2Auth, VertxAuthShiro::ShiroAuth

## Instance Method Summary (collapse)

- - (Object) authenticate(authInfo = nil)
- - (AuthProvider) initialize(j_del) constructor
  A new instance of AuthProvider.
- - (Object) j_del

## Constructor Details

### - (`AuthProvider`) initialize(j_del)

Returns a new instance of AuthProvider

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-common/auth_provider.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

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

Raises:

- (`ArgumentError`)

    36
    37
    38
    39
    40
    41
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-common/auth_provider.rb', line 36

    def authenticate(authInfo=nil)
      if authInfo.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(authInfo),(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(authInfo)"
    end

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-common/auth_provider.rb', line 15

    def j_del
      @j_del
    end