-
Notifications
You must be signed in to change notification settings - Fork 27
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
Role blacklist for authentication #21
Comments
Sadly i couldn't find a feature for this, and the use of the buld in hooks of wordpress doesn't do much for it. I had to do a manual hack in the file:
In file: /src/Services/AuthenticateService.php The ideal solution would be to add a new settings field under authentication, add it to the settings class, then change the 'in_array' to compare it to that field. |
Is there any chance this could become part of a update? |
Is your feature request related to a problem?
Kind of, yes, although it's a Me problem, not a You problem. :)
The current authentication mechanism simply checks that an account exists. I need finer grain control. For example, we use a custom role to temporarily disable accounts (or set "No Role For This Site") rather than deleting them. We need for those accounts not to be able to authenticate through JWT from our mobile app(s).
Describe the solution you'd like
I'd like to be able to have control over which roles can authenticate through JWT, preferably:
Whitelist: roles which can (empty means all can)
Blacklist: roles which cannot
Checkbox for "No Role cannot authenticate"
Alternatively, perhaps another hook for auth, which passes the user_id, and the hook can return true or false for whether it should be authenticated or not. Then we can handle all this ourselves.
Thanks for a great plugin, btw.
The text was updated successfully, but these errors were encountered: