Class: Auther::Authenticator
- Inherits:
-
Object
- Object
- Auther::Authenticator
- Defined in:
- lib/auther/authenticator.rb
Overview
Manages account authentication.
Instance Method Summary collapse
-
#authenticated? ⇒ Boolean
rubocop:enable Metrics/ParameterLists.
-
#initialize(secret, account_model, account_presenter, logger: LOGGER) ⇒ Authenticator
constructor
rubocop:disable Metrics/ParameterLists.
Constructor Details
#initialize(secret, account_model, account_presenter, logger: LOGGER) ⇒ Authenticator
rubocop:disable Metrics/ParameterLists
7 8 9 10 11 12 |
# File 'lib/auther/authenticator.rb', line 7 def initialize secret, account_model, account_presenter, logger: LOGGER @cipher = Auther::Cipher.new secret @account_model = account_model @account_presenter = account_presenter @logger = logger end |
Instance Method Details
#authenticated? ⇒ Boolean
rubocop:enable Metrics/ParameterLists
15 16 17 18 19 20 21 |
# File 'lib/auther/authenticator.rb', line 15 def authenticated? account_model.valid? && account_presenter.valid? && authentic_name? && authentic_login? && authentic_password? end |