{"_id":"@amazeeio/keycloak-admin","_rev":"1-990ca48eb0d45d973753dbdec4e3049e","name":"@amazeeio/keycloak-admin","dist-tags":{"latest":"1.7.1"},"versions":{"1.7.1":{"name":"@amazeeio/keycloak-admin","version":"1.7.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 --timeout 100000 --compilers ts:ts-node/register --recursive \"test/**/*.spec.ts\"","test:grep":"DEBUG=kc-admin mocha --compilers ts:ts-node/register --recursive","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":"^11.6.0","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":"ISC","_id":"@amazeeio/keycloak-admin@1.7.1","dist":{"shasum":"7ea44eb43a1f16963eddc148e9e280a8ed382d68","tarball":"https://registry.npmjs.org/@amazeeio/keycloak-admin/-/keycloak-admin-1.7.1.tgz","integrity":"sha512-42/E2OT7vo+anQAiV8/VmFqjYorC5sNFbBpCyaD8pPlDhYDad3ancscusqtz6iGtVSvyuTQr9dXhzZIyoAz6yw==","fileCount":100,"unpackedSize":108641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbubDICRA9TVsSAnZWagAAb7YP/0v1x+NKq+5NzfHQQd0v\nKgNCV0PV4WntbrNauL99uATCjB9rRHC4NhhTbsJEr+aVvRnqPjzCQqjNqe72\n+b1WNQLuDazJmH5gao5/Sdc+DL/r2ta4FTvQOboyH/tYLmLjTyRoTTi1tRvo\nVqZ5/LdXxTxu3xTw+8BELoiJgFx2+pmvwrk2hFcyT6YeLFPn3EDVsZ1ueCX0\nnYxi+QgUbBoeW/fSNpiZPKDWpM4qz1jI4LcEV2/ozpzP7bkJCze18m1pr+eM\nCeFM+sGfpW1d1RCa8kiHUdejLbtljg/gv0HMhUzRQ519Stov4nNzDffl4rkF\nLKJ+/jZdGRsI6rTc2D4Pyn9+roEqKPFZKV07D/d0sgBFnR1zpIhA8HEAOZ0U\np/6mNycTMhw8fL+mqyriZDMhO37KzAkaVij26VBVIZoVflrt1TZX1bUQb6G5\nQkhJJoA0Q9pJzb+pLbQFFFPQaqqTb8OuE9nl5Yl3/8PFYUw9QC2XihblCHCu\nxlgYkb5KDd5vA1/AmCmse6JbHuGYU1moIgW6Ch/PTe35+oNStRe6F2UyOhix\n+5tkZv70rV345J7OuPJFXYX0yndrzcuEcaCL2hnv+8139sJW8HJRfk3DJOUJ\nG0nmE9vqh9gtFBgPwTOVMXz59uY3SHvc3ikHuFljvE6zeL9WcGxd0/Ml4e2i\nTUeu\r\n=E0LA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1IjHq1ZkBtbhFYf5Fk3sdNZflLDaFkD99+zEftdyQ7QIgbUPdSsg6qtjXWy5/TRwD3+PUWMdUTlJbgEVG6V0t4b0="}]},"maintainers":[{"name":"amazeeio","email":"technology@amazee.io"}],"_npmUser":{"name":"amazeeio","email":"technology@amazee.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/keycloak-admin_1.7.1_1538896072377_0.4165674137564428"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-07T07:07:52.377Z","1.7.1":"2018-10-07T07:07:52.520Z","modified":"2022-04-04T13:44:24.731Z"},"maintainers":[{"name":"amazeeio","email":"technology@amazee.io"}],"description":"keycloak admin client","author":{"name":"wwwy3y3"},"license":"ISC","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/Canner/keycloak-admin.svg)](https://travis-ci.org/Canner/keycloak-admin)\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/Canner/keycloak-admin/tree/master/src/defs)\n- [Well-tested for supported APIs](https://github.com/Canner/keycloak-admin/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\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/Canner/keycloak-admin/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/Canner/keycloak-admin/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\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/Canner/keycloak-admin/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/Canner/keycloak-admin/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\n### [Group](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_groups_resource)\n\nDemo code: https://github.com/Canner/keycloak-admin/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\n### Group role-mapping\n\nDemo code: https://github.com/Canner/keycloak-admin/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/Canner/keycloak-admin/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/Canner/keycloak-admin/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/Canner/keycloak-admin/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/Canner/keycloak-admin/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/Canner/keycloak-admin/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\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/Canner/keycloak-admin/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## 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- [Client Scopes](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_client_scopes_resource)\n- [Key](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_key_resource)\n- [Protocol Mappers](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_protocol_mappers_resource)\n- [Scope Mappings](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_scope_mappings_resource)\n- [User Storage Provider](https://www.keycloak.org/docs-api/4.1/rest-api/index.html#_user_storage_provider_resource)\n","readmeFilename":"README.md"}