Class: Pasaporte::Auth::YamlDigestTable
- 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
Instance Method Summary collapse
Methods inherited from YamlTable
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(login, pass, domain) refresh d = @table[domain] return false unless d.is_a?(Array) d.find do | user | (user["login"] == login) && (user["pass_md5"] == Digest::MD5.hexdigest(pass)) end end |