@keycloak/keycloak-admin-client 19.0.0-dev.27 → 19.0.0-dev.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ import KcAdminClient from '@keycloak/keycloak-admin-client';
23
23
 
24
24
  // To configure the client, pass an object to override any of these options:
25
25
  // {
26
- // baseUrl: 'http://127.0.0.1:8080/auth',
26
+ // baseUrl: 'http://127.0.0.1:8080',
27
27
  // realmName: 'master',
28
28
  // requestConfig: {
29
29
  // /* Axios request config options https://github.com/axios/axios#request-config */
@@ -33,8 +33,8 @@ const kcAdminClient = new KcAdminClient();
33
33
 
34
34
  // Authorize with username / password
35
35
  await kcAdminClient.auth({
36
- username: 'wwwy3y3',
37
- password: 'wwwy3y3',
36
+ username: 'admin',
37
+ password: 'admin',
38
38
  grantType: 'password',
39
39
  clientId: 'admin-cli',
40
40
  totp: '123456', // optional Time-based One-time Password if OTP is required in authentication flow
@@ -66,7 +66,7 @@ To refresh the access token provided by Keycloak, an OpenID client like [panva/n
66
66
  import {Issuer} from 'openid-client';
67
67
 
68
68
  const keycloakIssuer = await Issuer.discover(
69
- 'http://localhost:8080/auth/realms/master',
69
+ 'http://localhost:8080/realms/master',
70
70
  );
71
71
 
72
72
  const client = new keycloakIssuer.Client({
@@ -77,8 +77,8 @@ const client = new keycloakIssuer.Client({
77
77
  // Use the grant type 'password'
78
78
  let tokenSet = await client.grant({
79
79
  grant_type: 'password',
80
- username: 'wwwy3y3',
81
- password: 'wwwy3y3',
80
+ username: 'admin',
81
+ password: 'admin',
82
82
  });
83
83
 
84
84
  // Periodically using refresh_token grant flow to get new access token here
@@ -110,17 +110,17 @@ To build the source do a build:
110
110
  npm run build
111
111
  ```
112
112
 
113
- Start keycloak in a docker container or run it locally:
113
+ Start the Keycloak server:
114
114
 
115
115
  ```bash
116
- docker run --name keycloak -d -p 127.0.0.1:8080:8080 -e KEYCLOAK_USER=wwwy3y3 -e KEYCLOAK_PASSWORD=wwwy3y3 quay.io/keycloak/keycloak:latest
116
+ npm run server:start
117
117
  ```
118
118
 
119
- If you started your container manually make sure there is an admin user named wwwy3y3 with password wwwy3y3 as admin on master realm.
119
+ If you started your container manually make sure there is an admin user named 'admin' with password 'admin'.
120
120
  Then start the tests with:
121
121
 
122
122
  ```bash
123
- npm run test
123
+ npm test
124
124
  ```
125
125
 
126
126
  ## Supported APIs
@@ -1,2 +1,2 @@
1
- export declare const defaultBaseUrl = "http://127.0.0.1:8080/auth";
1
+ export declare const defaultBaseUrl = "http://127.0.0.1:8080";
2
2
  export declare const defaultRealm = "master";
@@ -1,3 +1,3 @@
1
- export const defaultBaseUrl = 'http://127.0.0.1:8080/auth';
1
+ export const defaultBaseUrl = 'http://127.0.0.1:8080';
2
2
  export const defaultRealm = 'master';
3
3
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAE3D,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keycloak/keycloak-admin-client",
3
- "version": "19.0.0-dev.27",
3
+ "version": "19.0.0-dev.28",
4
4
  "description": "keycloak admin client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -21,7 +21,8 @@
21
21
  "coverage": "nyc npm run test",
22
22
  "watch": "npm run build -- --watch",
23
23
  "watch:test": "npm run test -- --watch",
24
- "prepublishOnly": "npm run build"
24
+ "prepublishOnly": "npm run build",
25
+ "server:start": "./scripts/start-server.mjs"
25
26
  },
26
27
  "dependencies": {
27
28
  "axios": "^0.27.2",
@@ -33,15 +34,20 @@
33
34
  },
34
35
  "devDependencies": {
35
36
  "@faker-js/faker": "^7.1.0",
37
+ "@octokit/rest": "^19.0.3",
36
38
  "@types/chai": "^4.2.14",
37
39
  "@types/lodash-es": "^4.17.5",
38
40
  "@types/mocha": "^9.0.0",
39
41
  "@types/node": "^18.0.3",
40
42
  "chai": "^4.1.2",
43
+ "gunzip-maybe": "^1.4.2",
41
44
  "mocha": "^10.0.0",
45
+ "node-fetch": "^3.2.10",
42
46
  "nyc": "^15.1.0",
43
47
  "prettier": "^2.1.2",
44
48
  "rimraf": "^3.0.2",
49
+ "tape-catch": "^1.0.6",
50
+ "tar-fs": "^2.1.1",
45
51
  "ts-node": "^10.2.1",
46
52
  "tslint": "^6.1.3",
47
53
  "typescript": "^4.7.4"