bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

UserCredentials more detailed checkUserCredentials return value #990

Open JamesB7 opened 4 years ago

JamesB7 commented 4 years ago

I would like to be able to inform the user, through the return value, whether the username is not found, the password is invalid, or the account is unverified. To do this, if checkUserCredentials could be altered to be allowed to return an array or object (to make overriding error_description, or providing error_uri, possible), that would be most helpful. This is to make login friendlier from PC software.

Would you accept a patch to this end? If so I can code it up. Thanks!

JamesB7 commented 4 years ago

Since this would be slightly custom, maybe said array or object being able to add new fields to the JSON would be a good/better route as well.