Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Make password checking algorithm configurable #7

Merged
merged 1 commit into from
Oct 11, 2012

Conversation

naasir
Copy link
Contributor

@naasir naasir commented Oct 9, 2012

Hey Micahl,

First off, thanks for all your hard work on the .NET OAuth 2.0 provider. I found it to be the simplest solution to grok and work with.

Based on the ideas you outlined in your open issue on making password hashing agnostic, I've created a patch to address this concern. Instead of exposing a hash function however, I'm exposing a function to compare a password with a stored hash. I did this because most of the recommended password hashing functions (BCrypt, SCrypt) recommend hashing a password with a salt. If we were to expose a function that generated a hash, we would have to ask for this salt too. In reality though, all we care about is whether the password is correct or not, so I'm letting the consumer of the library dictate that. Hope that makes sense.

Let me know if I've overlooked something. Thanks.

* added IPasswordHasher interface and respective public property to IOAuthServiceLocator
* updated unit tests and sample code
@micahlmartin
Copy link
Owner

This looks great! Thanks for contributing. Glad you're finding the library useful.

micahlmartin pushed a commit that referenced this pull request Oct 11, 2012
Make password checking algorithm configurable
@micahlmartin micahlmartin merged commit 5e4bfee into micahlmartin:master Oct 11, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants