Class: Pasaporte::Auth::YamlDigestTable

Inherits:
YamlTable
  • Object
show all
Defined in:
lib/pasaporte/auth/yaml_digest_table.rb

Constant Summary

Constants inherited from YamlTable

Pasaporte::Auth::YamlTable::YAML_TABLE

Instance Attribute Summary

Attributes inherited from YamlTable

#table_path

Instance Method Summary collapse

Methods inherited from YamlTable

#initialize

Constructor Details

This class inherits a constructor from Pasaporte::Auth::YamlTable

Instance Method Details

#call(login, pass, domain) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/pasaporte/auth/yaml_digest_table.rb', line 15

def call(, pass, domain)
  refresh
  d = @table[domain]
  return false unless d.is_a?(Array)
  d.find do | user |
    (user["login"] == ) && (user["pass_md5"] == Digest::MD5.hexdigest(pass))
  end
end