Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pwned validator threshold #6

Merged
merged 3 commits into from
Mar 12, 2018
Merged

Pwned validator threshold #6

merged 3 commits into from
Mar 12, 2018

Conversation

philnash
Copy link
Owner

Adds a threshold to the PwnedValidator so that you can let less pwned passwords still be valid if you so choose.

class User < ApplicationRecord
  # The record is marked as valid if the password has been used once in the breached data
  validates :password, pwned: { threshold: 1 }
end

@philnash philnash merged commit 4e0aafc into master Mar 12, 2018
@philnash philnash deleted the pwned-validator-threshold branch March 12, 2018 11:18
@kpumuk
Copy link
Contributor

kpumuk commented Mar 12, 2018

Looks super clean 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants