Skip to content

Commit

Permalink
Update create_users_and_roles.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasean authored Dec 18, 2023
1 parent d3ec820 commit d115914
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker/create_users_and_roles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ TOKEN=$(curl -s -X POST -H "Content-Type: application/x-www-form-urlencoded" -d
curl -s -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"name":"SUPERADMIN"}' "http://localhost:9990/auth/admin/realms/master/roles"
curl -s -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"name":"ADMIN"}' "http://localhost:9990/auth/admin/realms/master/roles"

# Create client
curl -s -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"clientId":"CoreApplication", "enabled":true, "publicClient":true, "redirectUris":["/*"]}' "http://localhost:9990/auth/admin/realms/master/clients"

# Create users
curl -s -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"username":"SUPERADMIN","enabled":true,"credentials":[{"type":"password","value":"superadminpassword","temporary":false}]}' "http://localhost:9990/auth/admin/realms/master/users"
curl -s -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"username":"ADMIN","enabled":true,"credentials":[{"type":"password","value":"adminpassword","temporary":false}]}' "http://localhost:9990/auth/admin/realms/master/users"
Expand Down

0 comments on commit d115914

Please sign in to comment.