Get access token
curl \
-d "client_id=admin-cli" \
-d "username=admin" \
-d "password=admin" \
-d "grant_type=password" \
"http://localhost:8080/auth/realms/master/protocol/openid-connect/token"
Create a Realm Role
curl -X POST http://localhost:8080/auth/admin/realms/<realm-id>/roles \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-d '{"name": "<role-name>"}'
Get all Realm Roles
curl -X GET http://localhost:8080/auth/admin/realms/<realm-id>/roles \
-H "Authorization: Bearer ${TOKEN}" \
Top comments (1)
Is there any way to list all realm & client roles by REST API ADMIN via Java?