Class: Masks::Credentials::Password
- Inherits:
-
Masks::Credential
- Object
- ApplicationModel
- Masks::Credential
- Masks::Credentials::Password
- Defined in:
- app/models/masks/credentials/password.rb
Overview
Checks :password for a match.
Instance Method Summary collapse
Methods inherited from Masks::Credential
#backup, #backup!, #check, checks, #cleanup, #cleanup!, #mask!, #name, #patch_params, #slug
Instance Method Details
#lookup ⇒ Object
9 10 11 12 13 |
# File 'app/models/masks/credentials/password.rb', line 9 def lookup actor.password = password if actor&.new_record? && password nil end |
#maskup ⇒ Object
15 16 17 18 19 |
# File 'app/models/masks/credentials/password.rb', line 15 def maskup return unless password actor&.authenticate(password) && actor&.valid? ? approve! : deny! end |