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

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


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

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