Class: Rlyeh::DeepOnes::Auth::Basic
- Defined in:
- lib/rlyeh/deep_ones/auth/basic.rb
Instance Attribute Summary
Attributes inherited from Base
#host, #nick, #pass, #real, #user
Instance Method Summary collapse
-
#initialize(app, nick, pass) ⇒ Basic
constructor
A new instance of Basic.
- #try(env) ⇒ Object
Methods inherited from Base
#authenticated?, #call, #failed, #session_id, #succeeded, #welcome
Methods included from Logger
Methods included from Rlyeh::Dispatcher
Constructor Details
#initialize(app, nick, pass) ⇒ Basic
Returns a new instance of Basic.
5 6 7 8 |
# File 'lib/rlyeh/deep_ones/auth/basic.rb', line 5 def initialize(app, nick, pass) @basic = [nick, pass].freeze super app end |
Instance Method Details
#try(env) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rlyeh/deep_ones/auth/basic.rb', line 10 def try(env) if @basic == [nick, pass] succeeded env welcome env else failed env end end |