tvallotton / rocket_auth

An implementation for an authentication API for Rocket applications.
https://docs.rs/rocket_auth/
Apache License 2.0
73 stars 35 forks source link

compare password functionality #39

Closed ywegel closed 2 years ago

ywegel commented 2 years ago

I have now implemented a method called compare_password(). It is located both in the Auth and User guard. I implemented it in both, so that you can decide where it is more useful. I myself think it is better to have it in the User guard, because that makes sure that a logged in user exists, but that is up to you to decide. The function was also tested in one of my projects, where i temporary used my fork of rocket_auth as a dependencie. The documentation and function name is just an idea, feel free to change it :)

If you think it should be implemented otherwise, write a comment i will fix it

tvallotton commented 2 years ago

It looks good. Now, I have a couple of minor edits I would make, do you prefer I list them here so you can do them or is it ok if I do them and push them to a separate branch?

ywegel commented 2 years ago

Whatever you prefer:) If you don't have time for it i can do it, but i don't mind if you do it