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

Auth::verify() methods requires extra work to integrate with jwt-auth #78

Open
ashgibson opened this issue May 29, 2015 · 1 comment
Open

Comments

@ashgibson
Copy link

First up, great lib! I have used it successfully on a few live applications so thanks for sharing.

When using Verify with other packages such as https://github.com/tymondesigns/jwt-auth, extra work is required to get the benefit of your verified, disabled and deleted functionality. The reason is because this other package uses the standard methods as per the Guard interface. This would require you doing away with the VerifyGuard::verify method or at least creating the other ones as per the Guard interface and routing them through.

On a similar note, I'm not sure why you got rid of the Exceptions when a user is unverified, disabled, deleted etc.. as I thought this was a great solution.

@Toddish
Copy link
Owner

Toddish commented Jun 8, 2015

Hi,

Thanks for the comments!

The logic behind the refactor was that the attempt method did too much, and worked too differently to the Laravel one. I tried to get round this by making it work more like the password broker.

The exceptions were useful, but didn't really fit, as an unsuccessful attempt wasn't really an exception, it was expected. You can still pass in verified = 1, and disabled = 0 to get similar functionality.

Does that make sense? I'm always open to suggestions if you can think of a better way :)

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