{"_id":"@egemenokten/keycloak-admin","_rev":"3-7496c726957727dea6ab846f9d34b188","name":"@egemenokten/keycloak-admin","dist-tags":{"latest":"1.12.3"},"versions":{"1.12.1":{"name":"@egemenokten/keycloak-admin","version":"1.12.1","description":"keycloak admin client","main":"lib/index.js","scripts":{"clean":"rimraf lib","lint":"tslint --force --format verbose \"src/**/*.ts\" \"test/*\"","build":"npm run clean && npm run lint && echo Using TypeScript && tsc --version && tsc -p ./tsconfig.release.json --pretty","test":"DEBUG=kc-admin mocha --require ts-node/register --recursive \"test/**/*.spec.ts\"","test:grep":"DEBUG=kc-admin mocha --require ts-node/register","coverage":"nyc npm run test","watch":"npm run build -- --watch","watch:test":"npm run test -- --watch","prepublishOnly":"npm run clean && npm run build"},"dependencies":{"@types/debug":"^0.0.30","axios":"^0.18.0","bluebird":"^3.5.1","camelize":"^1.0.0","debug":"^3.1.0","lodash":"^4.17.10","url-join":"^4.0.0","url-template":"^2.0.8"},"devDependencies":{"@types/axios":"^0.14.0","@types/bluebird":"^3.5.20","@types/chai":"^4.1.2","@types/faker":"^4.1.2","@types/lodash":"^4.14.108","@types/mocha":"^2.2.48","@types/node":"9.4.6","@types/url-join":"^0.8.2","@types/url-template":"^2.0.28","chai":"^4.1.2","faker":"^4.1.0","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^1.14.3","rimraf":"^2.5.4","ts-node":"^7.0.0","tslint":"^5.11.0","typescript":"^2.9.2"},"author":{"name":"wwwy3y3"},"license":"Apache-2.0","gitHead":"b871c2cfc2116290e334321bc8a7d70b2c798bbd","_id":"@egemenokten/keycloak-admin@1.12.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"egemenokten","email":"egemenokten@gmail.com"},"dist":{"integrity":"sha512-H1RgZkwrtcrh7knOfNf6pTBox8dP+6XY9G3nAYKvykh7OJoldRmn/1ic36aKJi6cjSn6s129+z56YiKp1zVNTA==","shasum":"aabe10c545676f8f0e8fc6cbc07f29d1e5455495","tarball":"https://registry.npmjs.org/@egemenokten/keycloak-admin/-/keycloak-admin-1.12.1.tgz","fileCount":114,"unpackedSize":195613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1+7cCRA9TVsSAnZWagAAeZQP/jS3PGy2nqPzSU/u5veA\nTxTUTiTgaAuLmhuS57lph34BTUguCc4y8vGCRuURwflL3Wx5aiKAS+2ijz+v\nYF5uizgfGf5I/QmenRtkV00OkUBOaq6/I+Yi8+un5KLqu6b+6rFBBcs78cHF\nj4Ta0g8k79wyn9eeDyHmTYFYcofq+j3VuLCY00bI6b/8sw5GLLYnM9sxZoQy\nQh+/Ju0QeDINqJOsKtQE7Af/yoLOcyIHr6SYJBJVT7oNK8X4jyIAdmU6DNUr\nIYZzObmvY5a2WNSsaqV/o0j5N6zjwBeyGeVM5TDDDpGC0SIh1q7rSMGl3zSX\nHBvJrRPOVp8OXPeYxIiOXbvREWM4ZLPzC27YiEusIvX2/iCv5vFxAhZSbW+t\nB7nvLltdLFsfWElEVRZRzYHj2dSJF0yO4HBX+PVxYamDmtMkQ0t8bq8WTtd+\nXPs9WGuMLR2Hm9Vjpl39mF2ITeuI1bZPt5dibCYF3ouq27xcw5JmQIw+L3wJ\nFGNjvroWeRKBxJCsccSVtZIDiQyxbAJGfBQVEJgaL4FT5lkk/2ujV6ahq/RR\nU2+n1gMvmqxdWA0jJixpGZ6qXXspT/QoIZSl4kAM84FtNPM28cXlLK3YYK6a\nyccM03A0PLfBbjCTE9S9vfhbzumk9Lgdh7pcFB7vOQ6ccXSidGNFXvMn2rd9\n3Mcq\r\n=qojo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWbF57sSyDOChoKomzEbOVjtcfhg6Pc1zrYZWR36blrwIgXfRpII+EkYhevUlXEjfIBZz/Xu0bO4iuFHdNSnCGImo="}]},"maintainers":[{"name":"egemenokten","email":"egemenokten@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/keycloak-admin_1.12.1_1574432476062_0.21095186684132017"},"_hasShrinkwrap":false},"1.12.2":{"name":"@egemenokten/keycloak-admin","version":"1.12.2","repository":{"type":"git","url":"git+https://github.com/egemenokten/keycloak-nodejs-admin-client.git"},"description":"keycloak admin client","main":"lib/index.js","scripts":{"clean":"rimraf lib","lint":"tslint --force --format verbose \"src/**/*.ts\" \"test/*\"","build":"npm run clean && npm run lint && echo Using TypeScript && tsc --version && tsc -p ./tsconfig.release.json --pretty","test":"DEBUG=kc-admin mocha --require ts-node/register --recursive \"test/**/*.spec.ts\"","test:grep":"DEBUG=kc-admin mocha --require ts-node/register","coverage":"nyc npm run test","watch":"npm run build -- --watch","watch:test":"npm run test -- --watch","prepublishOnly":"npm run clean && npm run build"},"dependencies":{"@types/debug":"^0.0.30","axios":"^0.18.0","bluebird":"^3.5.1","camelize":"^1.0.0","debug":"^3.1.0","lodash":"^4.17.10","url-join":"^4.0.0","url-template":"^2.0.8"},"devDependencies":{"@types/axios":"^0.14.0","@types/bluebird":"^3.5.20","@types/chai":"^4.1.2","@types/faker":"^4.1.2","@types/lodash":"^4.14.108","@types/mocha":"^2.2.48","@types/node":"9.4.6","@types/url-join":"^0.8.2","@types/url-template":"^2.0.28","chai":"^4.1.2","faker":"^4.1.0","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^1.14.3","rimraf":"^2.5.4","ts-node":"^7.0.0","tslint":"^5.11.0","typescript":"^2.9.2"},"author":{"name":"wwwy3y3"},"license":"Apache-2.0","gitHead":"7aa67324f940c21d9c5d85c05470f275d2755e1a","bugs":{"url":"https://github.com/egemenokten/keycloak-nodejs-admin-client/issues"},"homepage":"https://github.com/egemenokten/keycloak-nodejs-admin-client#readme","_id":"@egemenokten/keycloak-admin@1.12.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"egemenokten","email":"egemenokten@gmail.com"},"dist":{"integrity":"sha512-Y19R5oAZpMkZgk7TCU3VJuIGG1u6ModlWvfni6uiZXUiFvhIfi0u3gsCeqAJWeVMNgzETGn6I58V5orJsh7PUg==","shasum":"7d5f50380419d26e7aaf154c174b8531e838a287","tarball":"https://registry.npmjs.org/@egemenokten/keycloak-admin/-/keycloak-admin-1.12.2.tgz","fileCount":114,"unpackedSize":195695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1/NfCRA9TVsSAnZWagAAJeEP/0rxSDy87KKz0oACC3ND\nsgafVSngwUFaxyjEr82pnIVN/GRoeDSqPQqVxzAvW2qlmcHPldkieyKM+k5w\noYVYnNXtKFmm4nDqb9kFuEx/lwQWQ3LpjGnTnGWsjmj5KijOYFaHoiN/iPfq\n3nLjuRgLeARZH7u2bX0K0cie2plu4AJfncYt8Db7lFFqiGdw+6iBFtHk7RNZ\n6jzWvoujMJzfuKTchC0d2fMv2is0No22CKPV6Tq7OrK1jPfeDCnMxelMrG12\nFTqikGS23JMeBqRzksM6+EyW3iQ34f3qBGQ9j+oAxZI4xdhcojEwkqmuo8aB\n7yIUxI8Zj5pwWrEhgaw+/JWIIQ9qOXxFayohDfPwh5r2RQRW1wZK+5fPUwVv\n3m0UzQk9MQ/6+eWKkAiwWCTvHUo1CE/BcNDVg1zYHkrovUP6W7HmgNOwLRJ+\no6K9738YDFzz5Nu406laqpISMa7ra1b/rc+9euX9sZR8D+2Ptbn+q0xeSnel\nmMsC/TjaF4ZGh7D2YFrsVyzNUqRp6G6wLeBb2iKip2cl9qeyKyZVCdy03Wqx\np+w9t36BrnU7haXCVBng3y4Lv8ZbxKi5RzRY8UbtmwQHYaaHi9TU7eWmjWHo\nJWszuRUV0bdmIcEpbc25jER7pCgjsgS9Sm1u9TiOKiLIC8xhMXEEc+zS08Ma\nzNrY\r\n=NLRA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHqKuX8uwSFgm9jA+ivC8hzIUkaa/yI9TKWBsrEf8B2AiEA+zSWoXRdybN0AB16W6Y5tNnmzcDp6oTXhh9uCE1Goj0="}]},"maintainers":[{"name":"egemenokten","email":"egemenokten@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/keycloak-admin_1.12.2_1574433631275_0.1832690187702659"},"_hasShrinkwrap":false},"1.12.3":{"name":"@egemenokten/keycloak-admin","version":"1.12.3","repository":{"type":"git","url":"git+https://github.com/egemenokten/keycloak-nodejs-admin-client.git"},"description":"keycloak admin client","main":"lib/index.js","scripts":{"clean":"rimraf lib","lint":"tslint --force --format verbose \"src/**/*.ts\" \"test/*\"","build":"npm run clean && npm run lint && echo Using TypeScript && tsc --version && tsc -p ./tsconfig.release.json --pretty","test":"DEBUG=kc-admin mocha --require ts-node/register --recursive \"test/**/*.spec.ts\"","test:grep":"DEBUG=kc-admin mocha --require ts-node/register","coverage":"nyc npm run test","watch":"npm run build -- --watch","watch:test":"npm run test -- --watch","prepublishOnly":"npm run clean && npm run build"},"dependencies":{"@types/debug":"^0.0.30","axios":"^0.18.0","bluebird":"^3.5.1","camelize":"^1.0.0","debug":"^3.1.0","lodash":"^4.17.10","url-join":"^4.0.0","url-template":"^2.0.8"},"devDependencies":{"@types/axios":"^0.14.0","@types/bluebird":"^3.5.20","@types/chai":"^4.1.2","@types/faker":"^4.1.2","@types/lodash":"^4.14.108","@types/mocha":"^2.2.48","@types/node":"9.4.6","@types/url-join":"^0.8.2","@types/url-template":"^2.0.28","chai":"^4.1.2","faker":"^4.1.0","mocha":"^5.2.0","nyc":"^14.1.1","prettier":"^1.14.3","rimraf":"^2.5.4","ts-node":"^7.0.0","tslint":"^5.11.0","typescript":"^2.9.2"},"author":{"name":"wwwy3y3"},"license":"Apache-2.0","gitHead":"db805c734cf3db21746fde6a0a9a0ae1bdb1ee20","bugs":{"url":"https://github.com/egemenokten/keycloak-nodejs-admin-client/issues"},"homepage":"https://github.com/egemenokten/keycloak-nodejs-admin-client#readme","_id":"@egemenokten/keycloak-admin@1.12.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"egemenokten","email":"egemenokten@gmail.com"},"dist":{"integrity":"sha512-DaTMrBtQUadl7tfiug9yKRP3bd1nqZl9phQZVk3jLMdvjpCdWQpqaEfTQplLtMQIu3g9BcBPmi3PQDmpIvPHwg==","shasum":"ecf05d40bc36b68bb0b8215b25ee9ad8964456f0","tarball":"https://registry.npmjs.org/@egemenokten/keycloak-admin/-/keycloak-admin-1.12.3.tgz","fileCount":114,"unpackedSize":195743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd296VCRA9TVsSAnZWagAAxRMP/1wlFh7hE8nx4HYRVDM/\no+f3uncIb19llkGKSl93eUbvTl7QhYuydVp+cbvaKxhn8vjENsxsZjKyAnPX\nWFowvyCyMyJ1c60FV8zG2hwyZhgUH8Wls32CnxYEUNitWZqugzvyZFaOUwUt\n5CVTN8syY0XLoL6LaHykXyQe8IZHzKXB10XH7rFc7XJ8Xct0dafLYBx48wwB\n52qVritmLRq4APi5dQsNIAmYwPIpe4Gzty/XTZgrPlOYgLD60+tu/zpxuHka\nC1FUesv4MT3XtsxGuFvIXXocMDmjN4tIP9cStYFJZYgxKut5mezJB0UU4HoB\nm6GWFCklpMMh1T+gUlyrrOaau562bMnh0rDrW+ufjCCYQxbHs9nlwhZ6H5eS\ns9FO6ZlFkK+AWgsDlBlJXNEDbQSpY/ttXNJg3TjUO2U4tV4Z6KwrHZIX5K7e\n96F/JJ7RdahQvAiofkFeIsRLtIryQXZ4RUSVWryoI5nJUGRCH1mbenzbEz14\nA2L4fYjvCmA/GBokUJpdAg1fOtTBFJVPZP+hrrPOFzwI0EhY//YnBEc/Whth\nM+b18ItNrMN9I4sWu61aXpSM/lx+lAVJHxb9YIffQYZXpUZY8PrEUlcyRFfa\niEsXy7YiQHjDT4R3E/DqsW73E65oaEI2LcybEBfLErVIUivB+T8xhTH4n5u6\nMHZ0\r\n=hZ5h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAlQJxXSGLJU/Y6qHCctnRS02C9dS3KH3YAGQCNqHJJ/AiEAnU7WaocTDY3cqRzgr8AsjAugz3LYo2A1wxo0QQtRCZo="}]},"maintainers":[{"name":"egemenokten","email":"egemenokten@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/keycloak-admin_1.12.3_1574690453117_0.6243415154487242"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-22T14:21:12.981Z","1.12.1":"2019-11-22T14:21:16.188Z","modified":"2022-04-05T06:51:47.121Z","1.12.2":"2019-11-22T14:40:31.503Z","1.12.3":"2019-11-25T14:00:53.229Z"},"maintainers":[{"name":"egemenokten","email":"egemenokten@gmail.com"}],"description":"keycloak admin client","author":{"name":"wwwy3y3"},"license":"Apache-2.0","readme":"## keycloak-admin\n\n[![npm version](https://badge.fury.io/js/keycloak-admin.svg)](https://badge.fury.io/js/keycloak-admin) [![Travis (.org)](https://img.shields.io/travis/keycloak/keycloak-nodejs-admin-client.svg)](https://travis-ci.org/keycloak/keycloak-nodejs-admin-client)\n\nNode.js Keycloak admin client\n\n## Features\n\n- TypeScript supported\n- Keycloak latest version (v4.1) supported\n- [Complete resource definitions](https://github.com/keycloak/keycloak-nodejs-admin-client/tree/master/src/defs)\n- [Well-tested for supported APIs](https://github.com/keycloak/keycloak-nodejs-admin-client/tree/master/test)\n\n## Install\n\n```sh\nyarn add keycloak-admin\n```\n\n## Usage\n\n```js\nimport KcAdminClient from 'keycloak-admin';\n\n// To configure the client, pass an object to override any of these  options:\n// {\n//   baseUrl: 'http://127.0.0.1:8080/auth',\n//   realmName: 'master',\n//   requestConfig: {\n//     /* Axios request config options https://github.com/axios/axios#request-config */\n//   },\n// }\nconst kcAdminClient = new KcAdminClient();\n\n// Authorize with username / password\nawait kcAdminClient.auth({\n  username: 'wwwy3y3',\n  password: 'wwwy3y3',\n  grantType: 'password',\n  clientId: 'admin-cli',\n});\n\n// List all users\nconst users = await kcAdminClient.users.find();\n\n// Override client configuration for all further requests:\nkcAdminClient.setConfig({\n  realmName: 'another-realm',\n});\n\n// This operation will now be performed in 'another-realm' if the user has access.\nconst groups = await kcAdminClient.groups.find();\n\n// Set a `realm` property to override the realm for only a single operation.\n// For example, creating a user in another realm:\nawait this.kcAdminClient.users.create({\n  realm: 'a-third-realm',\n  username: 'username',\n  email: 'user@example.com',\n});\n```\n\nTo refresh the access token provided by Keycloak, an OpenID client like [panva/node-openid-client](https://github.com/panva/node-openid-client) can be used like this:\n\n```js\nimport {Issuer} from 'openid-client';\n\nconst keycloakIssuer = await Issuer.discover(\n  'http://localhost:8080/auth/realms/master',\n);\n\nconst client = new keycloakIssuer.Client({\n  client_id: 'admin-cli', // Same as `clientId` passed to client.auth()\n});\n\n// Use the grant type 'password'\nlet tokenSet = await client.grant({\n  grant_type: 'password',\n  username: 'wwwy3y3',\n  password: 'wwwy3y3',\n});\n\n// Periodically using refresh_token grant flow to get new access token here\nsetInterval(async () => {\n  const refreshToken = tokenSet.refresh_token;\n  tokenSet = await client.refresh(refreshToken);\n  kcAdminClient.setAccessToken(tokenSet.access_token);\n}, 58 * 1000); // 58 seconds\n```\n\n## Supported APIs\n\n### [Realm admin](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_realms_admin_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/realms.spec.ts\n\n- Import a realm from a full representation of that realm (`POST /`)\n- Get the top-level representation of the realm (`GET /{realm}`)\n- Update the top-level information of the realm (`PUT /{realm}`)\n- Delete the realm (`DELETE /{realm}`)\n\n### [Role](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_roles_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/roles.spec.ts\n\n- Create a new role for the realm (`POST /{realm}/roles`)\n- Get all roles for the realm (`GET /{realm}/roles`)\n- Get a role by name (`GET /{realm}/roles/{role-name}`)\n- Update a role by name (`PUT /{realm}/roles/{role-name}`)\n- Delete a role by name (`DELETE /{realm}/roles/{role-name}`)\n- Get all users in a role by name for the realm (`GET /{realm}/roles/{role-name}/users`)\n\n### [Roles (by ID)](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_roles_by_id_resource)\n\n- Get a specific role (`GET /{realm}/roles-by-id/{role-id}`)\n- Update the role (`PUT /{realm}/roles-by-id/{role-id}`)\n- Delete the role (`DELETE /{realm}/roles-by-id/{role-id}`)\n\n### [User](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_users_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/users.spec.ts\n\n- Create a new user (`POST /{realm}/users`)\n- Get users Returns a list of users, filtered according to query parameters (`GET /{realm}/users`)\n- Get representation of the user (`GET /{realm}/users/{id}`)\n- Update the user (`PUT /{realm}/users/{id}`)\n- Delete the user (`DELETE /{realm}/users/{id}`)\n- Send a update account email to the user An email contains a link the user can click to perform a set of required actions. (`PUT /{realm}/users/{id}/execute-actions-email`)\n- Get user groups (`GET /{realm}/users/{id}/groups`)\n- Add user to group (`PUT /{realm}/users/{id}/groups/{groupId}`)\n- Delete user from group (`DELETE /{realm}/users/{id}/groups/{groupId}`)\n- Remove TOTP from the user (`PUT /{realm}/users/{id}/remove-totp`)\n- Set up a temporary password for the user User will have to reset the temporary password next time they log in. (`PUT /{realm}/users/{id}/reset-password`)\n- Send an email-verification email to the user An email contains a link the user can click to verify their email address. (`PUT /{realm}/users/{id}/send-verify-email`)\n\n### User role-mapping\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/users.spec.ts#L143\n\n- Get user role-mappings (`GET /{realm}/users/{id}/role-mappings`)\n- Add realm-level role mappings to the user (`POST /{realm}/users/{id}/role-mappings/realm`)\n- Get realm-level role mappings (`GET /{realm}/users/{id}/role-mappings/realm`)\n- Delete realm-level role mappings (`DELETE /{realm}/users/{id}/role-mappings/realm`)\n- Get realm-level roles that can be mapped (`GET /{realm}/users/{id}/role-mappings/realm/available`)\n- Get effective realm-level role mappings This will recurse all composite roles to get the result. (`GET /{realm}/users/{id}/role-mappings/realm/composite`)\n\n### [Group](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_groups_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/groups.spec.ts\n\n- Create (`POST /{realm}/groups`)\n- List (`GET /{realm}/groups`)\n- Get one (`GET /{realm}/groups/{id}`)\n- Update (`PUT /{realm}/groups/{id}`)\n- Delete (`DELETE /{realm}/groups/{id}`)\n- List members (`GET /{realm}/groups/{id}/members`)\n- Set or create child (`POST /{realm}/groups/{id}/children`)\n\n### Group role-mapping\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/groups.spec.ts#L76\n\n- Get group role-mappings (`GET /{realm}/groups/{id}/role-mappings`)\n- Add realm-level role mappings to the group (`POST /{realm}/groups/{id}/role-mappings/realm`)\n- Get realm-level role mappings (`GET /{realm}/groups/{id}/role-mappings/realm`)\n- Delete realm-level role mappings (`DELETE /{realm}/groups/{id}/role-mappings/realm`)\n- Get realm-level roles that can be mapped (`GET /{realm}/groups/{id}/role-mappings/realm/available`)\n\n### [Client](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_clients_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clients.spec.ts\n\n- Create a new client (`POST /{realm}/clients`)\n- Get clients belonging to the realm (`GET /{realm}/clients`)\n- Get representation of the client (`GET /{realm}/clients/{id}`)\n- Update the client (`PUT /{realm}/clients/{id}`)\n- Delete the client (`DELETE /{realm}/clients/{id}`)\n\n### [Client roles](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_roles_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clients.spec.ts\n\n- Create a new role for the client (`POST /{realm}/clients/{id}/roles`)\n- Get all roles for the client (`GET /{realm}/clients/{id}/roles`)\n- Get a role by name (`GET /{realm}/clients/{id}/roles/{role-name}`)\n- Update a role by name (`PUT /{realm}/clients/{id}/roles/{role-name}`)\n- Delete a role by name (`DELETE /{realm}/clients/{id}/roles/{role-name}`)\n\n### [Client role-mapping for group](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_client_role_mappings_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/groups.spec.ts#L150\n\n- Add client-level roles to the group role mapping (`POST /{realm}/groups/{id}/role-mappings/clients/{client}`)\n- Get client-level role mappings for the group (`GET /{realm}/groups/{id}/role-mappings/clients/{client}`)\n- Delete client-level roles from group role mapping (`DELETE /{realm}/groups/{id}/role-mappings/clients/{client}`)\n- Get available client-level roles that can be mapped to the group (`GET /{realm}/groups/{id}/role-mappings/clients/{client}/available`)\n\n### [Client role-mapping for user](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_client_role_mappings_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/users.spec.ts#L217\n\n- Add client-level roles to the user role mapping (`POST /{realm}/users/{id}/role-mappings/clients/{client}`)\n- Get client-level role mappings for the user (`GET /{realm}/users/{id}/role-mappings/clients/{client}`)\n- Delete client-level roles from user role mapping (`DELETE /{realm}/users/{id}/role-mappings/clients/{client}`)\n- Get available client-level roles that can be mapped to the user (`GET /{realm}/users/{id}/role-mappings/clients/{client}/available`)\n\n### [Identity Providers](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_identity_providers_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/idp.spec.ts\n\n- Create a new identity provider (`POST /{realm}/identity-provider/instances`)\n- Get identity providers (`GET /{realm}/identity-provider/instances`)\n- Get the identity provider (`GET /{realm}/identity-provider/instances/{alias}`)\n- Update the identity provider (`PUT /{realm}/identity-provider/instances/{alias}`)\n- Delete the identity provider (`DELETE /{realm}/identity-provider/instances/{alias}`)\n- Find identity provider factory (`GET /{realm}/identity-provider/providers/{providerId}`)\n- Create a new identity provider mapper (`POST /{realm}/identity-provider/instances/{alias}/mappers`)\n- Get identity provider mappers (`GET /{realm}/identity-provider/instances/{alias}/mappers`)\n- Get the identity provider mapper (`GET /{realm}/identity-provider/instances/{alias}/mappers/{id}`)\n- Update the identity provider mapper (`PUT /{realm}/identity-provider/instances/{alias}/mappers/{id}`)\n- Delete the identity provider mapper (`DELETE /{realm}/identity-provider/instances/{alias}/mappers/{id}`)\n- Find the identity provider mapper types (`GET /{realm}/identity-provider/instances/{alias}/mapper-types`)\n\n### [Client Scopes](https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_client_scopes_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clientScopes.spec.ts\n\n- Create a new client scope (`POST /{realm}/client-scopes`)\n- Get client scopes belonging to the realm (`GET /{realm}/client-scopes`)\n- Get representation of the client scope (`GET /{realm}/client-scopes/{id}`)\n- Update the client scope (`PUT /{realm}/client-scopes/{id}`)\n- Delete the client scope (`DELETE /{realm}/client-scopes/{id}`)\n\n### [Client Scopes for realm](https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_client_scopes_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clientScopes.spec.ts\n\n- Get realm default client scopes (`GET /{realm}/default-default-client-scopes`)\n- Add realm default client scope (`PUT /{realm}/default-default-client-scopes/{id}`)\n- Delete realm default client scope (`DELETE /{realm}/default-default-client-scopes/{id}`)\n- Get realm optional client scopes (`GET /{realm}/default-optional-client-scopes`)\n- Add realm optional client scope (`PUT /{realm}/default-optional-client-scopes/{id}`)\n- Delete realm optional client scope (`DELETE /{realm}/default-optional-client-scopes/{id}`)\n\n### [Client Scopes for client](https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_client_scopes_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clientScopes.spec.ts\n\n- Get default client scopes (`GET /{realm}/clients/{id}/default-client-scopes`)\n- Add default client scope (`PUT /{realm}/clients/{id}/default-client-scopes/{clientScopeId}`)\n- Delete default client scope (`DELETE /{realm}/clients/{id}/default-client-scopes/{clientScopeId}`)\n- Get optional client scopes (`GET /{realm}/clients/{id}/optional-client-scopes`)\n- Add optional client scope (`PUT /{realm}/clients/{id}/optional-client-scopes/{clientScopeId}`)\n- Delete optional client scope (`DELETE /{realm}/clients/{id}/optional-client-scopes/{clientScopeId}`)\n\n### [Scope Mappings for client scopes](https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_scope_mappings_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clientScopes.spec.ts\n\n- Get all scope mappings for the client (`GET /{realm}/client-scopes/{id}/scope-mappings`)\n- Add client-level roles to the client’s scope (`POST /{realm}/client-scopes/{id}/scope-mappings/clients/{client}`)\n- Get the roles associated with a client’s scope (`GET /{realm}/client-scopes/{id}/scope-mappings/clients/{client}`)\n- The available client-level roles (`GET /{realm}/client-scopes/{id}/scope-mappings/clients/{client}/available`)\n- Get effective client roles (`GET /{realm}/client-scopes/{id}/scope-mappings/clients/{client}/composite`)\n- Remove client-level roles from the client’s scope. (`DELETE /{realm}/client-scopes/{id}/scope-mappings/clients/{client}`)\n- Add a set of realm-level roles to the client’s scope (`POST /{realm}/client-scopes/{id}/scope-mappings/realm`)\n- Get realm-level roles associated with the client’s scope (`GET /{realm}/client-scopes/{id}/scope-mappings/realm`)\n- Remove a set of realm-level roles from the client’s scope (`DELETE /{realm}/client-scopes/{id}/scope-mappings/realm`)\n- Get realm-level roles that are available to attach to this client’s scope (`GET /{realm}/client-scopes/{id}/scope-mappings/realm/available`)\n- Get effective realm-level roles associated with the client’s scope (`GET /{realm}/client-scopes/{id}/scope-mappings/realm/composite`)\n\n### [Scope Mappings for clients](https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_scope_mappings_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clientScopes.spec.ts\n\n- Get all scope mappings for the client (`GET /{realm}/clients/{id}/scope-mappings`)\n- Add client-level roles to the client’s scope (`POST /{realm}/clients/{id}/scope-mappings/clients/{client}`)\n- Get the roles associated with a client’s scope (`GET /{realm}/clients/{id}/scope-mappings/clients/{client}`)\n- Remove client-level roles from the client’s scope. (`DELETE /{realm}/clients/{id}/scope-mappings/clients/{client}`)\n- The available client-level roles (`GET /{realm}/clients/{id}/scope-mappings/clients/{client}/available`)\n- Get effective client roles (`GET /{realm}/clients/{id}/scope-mappings/clients/{client}/composite`)\n- Add a set of realm-level roles to the client’s scope (`POST /{realm}/clients/{id}/scope-mappings/realm`)\n- Get realm-level roles associated with the client’s scope (`GET /{realm}/clients/{id}/scope-mappings/realm`)\n- Remove a set of realm-level roles from the client’s scope (`DELETE /{realm}/clients/{id}/scope-mappings/realm`)\n- Get realm-level roles that are available to attach to this client’s scope (`GET /{realm}/clients/{id}/scope-mappings/realm/available`)\n- Get effective realm-level roles associated with the client’s scope (`GET /{realm}/clients/{id}/scope-mappings/realm/composite`)\n\n### [Protocol Mappers for client scopes](https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_protocol_mappers_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clientScopes.spec.ts\n\n- Create multiple mappers (`POST /{realm}/client-scopes/{id}/protocol-mappers/add-models`)\n- Create a mapper (`POST /{realm}/client-scopes/{id}/protocol-mappers/models`)\n- Get mappers (`GET /{realm}/client-scopes/{id}/protocol-mappers/models`)\n- Get mapper by id (`GET /{realm}/client-scopes/{id}/protocol-mappers/models/{mapperId}`)\n- Update the mapper (`PUT /{realm}/client-scopes/{id}/protocol-mappers/models/{mapperId}`)\n- Delete the mapper (`DELETE /{realm}/client-scopes/{id}/protocol-mappers/models/{mapperId}`)\n- Get mappers by name for a specific protocol (`GET /{realm}/client-scopes/{id}/protocol-mappers/protocol/{protocol}`)\n\n### [Protocol Mappers for clients](https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_protocol_mappers_resource)\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clients.spec.ts\n\n- Create multiple mappers (`POST /{realm}/clients/{id}/protocol-mappers/add-models`)\n- Create a mapper (`POST /{realm}/clients/{id}/protocol-mappers/models`)\n- Get mappers (`GET /{realm}/clients/{id}/protocol-mappers/models`)\n- Get mapper by id (`GET /{realm}/clients/{id}/protocol-mappers/models/{mapperId}`)\n- Update the mapper (`PUT /{realm}/clients/{id}/protocol-mappers/models/{mapperId}`)\n- Delete the mapper (`DELETE /{realm}/clients/{id}/protocol-mappers/models/{mapperId}`)\n- Get mappers by name for a specific protocol (`GET /{realm}/clients/{id}/protocol-mappers/protocol/{protocol}`)\n\n### [Component]()\n\nSupported for [user federation](https://www.keycloak.org/docs/latest/server_admin/index.html#_user-storage-federation). Demo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/components.spec.ts\n\n- Create (`POST /{realm}/components`)\n- List (`GET /{realm}/components`)\n- Get (`GET /{realm}/components/{id}`)\n- Update (`PUT /{realm}/components/{id}`)\n- Delete (`DELETE /{realm}/components/{id}`)\n\n### [Sessions for clients]()\n\nDemo code: https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/test/clients.spec.ts\n\n- List user sessions for a specific client (`GET /{realm}/clients/{id}/user-sessions`)\n- List offline sessions for a specific client (`GET /{realm}/clients/{id}/offline-sessions`)\n- Get user session count for a specific client (`GET /{realm}/clients/{id}/session-count`)\n- List offline session count for a specific client (`GET /{realm}/clients/{id}/offline-session-count`)\n\n## Not yet supported\n\n- [Attack Detection](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_attack_detection_resource)\n- [Authentication Management](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_authentication_management_resource)\n- [Client Attribute Certificate](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_client_attribute_certificate_resource)\n- [Client Initial Access](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_client_initial_access_resource)\n- [Client Registration Policy](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_client_registration_policy_resource)\n- [Key](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_key_resource)\n- [User Storage Provider](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_user_storage_provider_resource)\n\n## Maintainers\n\nCheckout [MAINTAINERS.md](https://github.com/keycloak/keycloak-nodejs-admin-client/blob/master/MAINTAINERS.md) for detailed maintainers list.\n\nThis repo is originally developed by [Canner](https://www.cannercms.com) and [InfuseAI](https://infuseai.io) before being transferred under keycloak organization.\n","readmeFilename":"README.md","homepage":"https://github.com/egemenokten/keycloak-nodejs-admin-client#readme","repository":{"type":"git","url":"git+https://github.com/egemenokten/keycloak-nodejs-admin-client.git"},"bugs":{"url":"https://github.com/egemenokten/keycloak-nodejs-admin-client/issues"}}