Official Plugins (Kuzzle v2.x)
Keycloak v2.x
2

createFirstAdmin #

Creates a new user in Keycloak and use the createFirstAdmin function of Kuzzle.

It add the local strategy to the admin user and set the password. In order to connect to the Admin Console

Parameters #

ParameterTypeDescriptionRequired
kuidstringkuzzle user ID (like admin)yes
emailstringUser emailyes
firstNamestringUser first nameyes
lastNamestringUser last nameyes
usernamestringUser usernameyes
passwordstringUser passwordyes

Websocket #

await kuzzle.query({
  controller: "keycloak",
  action: "createFirstAdmin",
  _id: "<kuid>",
  body: {
    content: {
      email: "admin@example.com",
      firstName: "Admin",
      lastName: "User",
      username: "admin",
      password: "password123",
    },
  },
});

HTTP #

POST http://<host>:<port>/keycloak/users/firstAdmin/<kuid>
Content-Type: application/json

{
"content": {
  "email": "admin@example.com",
  "firstName": "Admin",
  "lastName": "User",
  "username": "admin",
  "password": "password123"
  }
}