Module: VertxWeb::AuthenticationHandler
- Included in:
- AuthHandler, AuthenticationHandlerImpl
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/authentication_handler.rb
Instance Method Summary (collapse)
-
- (void) handle(event)
Something has happened, so handle it.
-
- (void) parseCredentials(context, handler) { ... }
Parses the credentials from the request into a JsonObject.
Instance Method Details
- (void) handle(event)
This method returns an undefined value.
Something has happened, so handle it.
35 36 37 38 39 40 41 42 43 44 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/authentication_handler.rb', line 35 def handle(*args) if args[0].class.method_defined?(:j_del) && !block_given? return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(args[0].j_del) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling handle(#{args[0]})" end end |
- (void) parseCredentials(context, handler) { ... }
This method returns an undefined value.
Parses the credentials from the request into a JsonObject. The implementation should be able to extract the required info for the auth provider in the format the provider expects.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/authentication_handler.rb', line 15 def parse_credentials(*args) if args[0].class.method_defined?(:j_del) && true if (block_given?) return @j_del.java_method(:parseCredentials, [Java::IoVertxExtWeb::RoutingContext.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0].j_del,block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) } : promise) else promise = ::Vertx::Util::Utils.promise @j_del.java_method(:parseCredentials, [Java::IoVertxExtWeb::RoutingContext.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0].j_del,block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) } : promise) return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil) end end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling parse_credentials(#{args[0]})" end end |