Class: VertxWeb::UserSessionHandler

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/user_session_handler.rb

Overview

This handler should be used if you want to store the User object in the Session so it's available between different requests, without you having re-authenticate each time. It requires that the session handler is already present on previous matching routes. It requires an Auth provider so, if the user is deserialized from a clustered session it knows which Auth provider to associate the session with.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (::VertxWeb::UserSessionHandler) create(authProvider = nil)

Create a new handler

Parameters:

Returns:

Raises:

  • (ArgumentError)


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

def self.create(authProvider=nil)
  if authProvider.class.method_defined?(:j_del) && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::UserSessionHandler.java_method(:create, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(authProvider.j_del),::VertxWeb::UserSessionHandler)
  end
  raise ArgumentError, "Invalid arguments when calling create(authProvider)"
end

Instance Method Details

- (void) handle(arg0 = nil)

This method returns an undefined value.

Parameters:

Raises:

  • (ArgumentError)


27
28
29
30
31
32
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/user_session_handler.rb', line 27

def handle(arg0=nil)
  if arg0.class.method_defined?(:j_del) && !block_given?
    return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(arg0.j_del)
  end
  raise ArgumentError, "Invalid arguments when calling handle(arg0)"
end