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

add support for login restrictions on a role or attribute basis #509

Open
badgerhill opened this issue Jan 29, 2024 · 0 comments
Open

add support for login restrictions on a role or attribute basis #509

badgerhill opened this issue Jan 29, 2024 · 0 comments
Labels
enhancement Issues & PRs related to new features.

Comments

@badgerhill
Copy link

It would be great if i could e.g. specify a role or an attribute on the settings page. (e.g. required role)

If the userinfo does not have that specified role / attribute a login is not permitted.

This could be added in validate_user_claim() around line 550.

if ($user_claim['roles'] != 'MYCONFIG_SETTING') {  
   return new WP_Error( 'unauthorized', __( 'Unauthorized access. Wrong role/attribute', 'daggerhart-openid-connect-generic' ), $login_user );
}
@badgerhill badgerhill added the enhancement Issues & PRs related to new features. label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues & PRs related to new features.
Projects
None yet
Development

No branches or pull requests

1 participant