Class: Auther::Authenticator
- Inherits:
-
Object
- Object
- Auther::Authenticator
- Defined in:
- lib/auther/authenticator.rb
Overview
Manages account authentication.
Instance Method Summary collapse
- #authenticated? ⇒ Boolean
-
#initialize(secret, account_model, account_presenter, logger: Auther::NullLogger.new(STDOUT)) ⇒ Authenticator
constructor
A new instance of Authenticator.
Constructor Details
#initialize(secret, account_model, account_presenter, logger: Auther::NullLogger.new(STDOUT)) ⇒ Authenticator
Returns a new instance of Authenticator.
6 7 8 9 10 11 |
# File 'lib/auther/authenticator.rb', line 6 def initialize secret, account_model, account_presenter, logger: Auther::NullLogger.new(STDOUT) @cipher = Auther::Cipher.new secret @account_model = account_model @account_presenter = account_presenter @logger = logger end |
Instance Method Details
#authenticated? ⇒ Boolean
13 14 15 16 17 18 19 |
# File 'lib/auther/authenticator.rb', line 13 def authenticated? account_model.valid? && account_presenter.valid? && authentic_name? && authentic_login? && authentic_password? end |