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 Password API Support? #2

Closed
Grantimus9 opened this issue May 16, 2018 · 4 comments
Closed

Pwned Password API Support? #2

Grantimus9 opened this issue May 16, 2018 · 4 comments

Comments

@Grantimus9
Copy link
Contributor

Hello,

Do you have any intent to add support for checking if a password was in a breach using HIPB's new password checker API?

I think it'd add some great functionality, and would be useful for the Elixir community. I might see if I can work up a PR.

@techgaun
Copy link
Owner

@Grantimus9 would be great if you can make a PR. Otherwise, I can knock out this one over the weekend. Feel free to take this issue if you wanna work on it.

@Grantimus9
Copy link
Contributor Author

I'll take a stab at it.

The simple endpoint is being retired, so we'll be using the "range" one: https://haveibeenpwned.com/API/v2#PwnedPasswords

How about:

# returns true or false 
ExPwned.password_breached?(password) 

# Returns number of times this password appears in a breach. Zero +  
ExPwned.password_breached_count(password) 

@techgaun
Copy link
Owner

@Grantimus9 yep that sounds good to me 👍

@techgaun
Copy link
Owner

closed by #3

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

No branches or pull requests

2 participants