Class: Rhoconnect::Handler::Authenticate::Runner
- Inherits:
-
Object
- Object
- Rhoconnect::Handler::Authenticate::Runner
- Includes:
- Helpers::Binding
- Defined in:
- lib/rhoconnect/handler/authenticate/runner.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#params ⇒ Object
Returns the value of attribute params.
-
#route_handler ⇒ Object
Returns the value of attribute route_handler.
Instance Method Summary collapse
-
#initialize(app, route_handler, params = {}) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Methods included from Helpers::Binding
Constructor Details
#initialize(app, route_handler, params = {}) ⇒ Runner
Returns a new instance of Runner.
9 10 11 12 13 14 15 |
# File 'lib/rhoconnect/handler/authenticate/runner.rb', line 9 def initialize(app, route_handler, params = {}) raise ArgumentError.new('Invalid app') unless app raise ArgumentError.new('Invalid authenticate handler') unless route_handler @app = app @route_handler = bind_handler(:authenricate_handler_method, route_handler) @params = params end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
5 6 7 |
# File 'lib/rhoconnect/handler/authenticate/runner.rb', line 5 def app @app end |
#params ⇒ Object
Returns the value of attribute params.
5 6 7 |
# File 'lib/rhoconnect/handler/authenticate/runner.rb', line 5 def params @params end |
#route_handler ⇒ Object
Returns the value of attribute route_handler.
5 6 7 |
# File 'lib/rhoconnect/handler/authenticate/runner.rb', line 5 def route_handler @route_handler end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rhoconnect/handler/authenticate/runner.rb', line 17 def run if params[:login].nil? or params[:login].empty? return false end user = _do_authenticate end |