kc_user_role_validate_extension
kc_user_role_validate_extension copied to clipboard
KeyCloak user role validation extension
User role validation (initially forked from keycloak\examples\providers\authenticator)
Provide the possibility to authorize only users who have specified role.
Example authentication flow:
-
Build a package with : mvn clean package
-
copy artifact from target folder to deployments folder of KeyCloak Server, in case of standalone : KEYCLOAK_DIR/standalone/deployments
-
add new "execution" in authentication flow under "Username Password Form" (or other form which authenticates user)
-
configure the "execution" role - Actions -> Config