Class: Landable::AuthenticationService::EchoAuthenticator
- Inherits:
-
Object
- Object
- Landable::AuthenticationService::EchoAuthenticator
- Defined in:
- app/services/landable/authentication_service.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call(username, password) ⇒ Object
-
#initialize(username, password) ⇒ EchoAuthenticator
constructor
A new instance of EchoAuthenticator.
Constructor Details
#initialize(username, password) ⇒ EchoAuthenticator
Returns a new instance of EchoAuthenticator.
21 22 23 24 |
# File 'app/services/landable/authentication_service.rb', line 21 def initialize(username, password) @username = username @password = password end |
Class Method Details
.call(username, password) ⇒ Object
17 18 19 |
# File 'app/services/landable/authentication_service.rb', line 17 def self.call(username, password) new(nil, nil).call(username, password) end |
Instance Method Details
#call(username, password) ⇒ Object
26 27 28 29 30 |
# File 'app/services/landable/authentication_service.rb', line 26 def call(username, password) return unless acceptable_environment? return (username) if @username.nil? && password != 'fail' return (username) if @username == username && @password == password end |