Class: Auther::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/auther/authenticator.rb

Overview

Manages account authentication.

Instance Method Summary collapse

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, , , logger: LOGGER
  @cipher = Auther::Cipher.new secret
  @account_model = 
  @account_presenter = 
  @logger = logger
end

Instance Method Details

#authenticated?Boolean

rubocop:enable Metrics/ParameterLists

Returns:

  • (Boolean)


15
16
17
18
19
20
21
# File 'lib/auther/authenticator.rb', line 15

def authenticated?
  .valid? &&
    .valid? &&
    authentic_name? &&
    authentic_login? &&
    authentic_password?
end