keycloak-api-manager 2.0.4 → 2.0.5

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.
@@ -79,7 +79,7 @@
79
79
  <option name="presentableId" value="Default" />
80
80
  <updated>1759849149064</updated>
81
81
  <workItem from="1759849150239" duration="1214000" />
82
- <workItem from="1759917554117" duration="56530000" />
82
+ <workItem from="1759917554117" duration="56831000" />
83
83
  </task>
84
84
  <servers />
85
85
  </component>
package/README.md CHANGED
@@ -19,7 +19,7 @@ it is a wrapper based on '@keycloak/keycloak-admin-client'
19
19
  - Complete wrapper for Keycloak Admin REST API
20
20
  - Manage realms, clients, users, roles, groups, and permissions
21
21
  - Support for both public and confidential clients
22
- - Built-in token acquisition and refresh using admin credentials
22
+ - Built-in token acquisition and refresh using admin credentials. For the refresh token, it is necessary to correctly set the tokenLifeSpan parameter during configuration
23
23
 
24
24
  ⚙️ ***Administration & Automation***
25
25
  - Create, update, and delete users, clients, and roles programmatically
package/index.js CHANGED
@@ -49,13 +49,15 @@ exports.configure=async function(adminClientCredentials){
49
49
  realmName:adminClientCredentials.realmName
50
50
  }
51
51
  kcAdminClient= new keycloakAdminClient(configAdminclient);
52
+ let tokenLifeSpan= adminClientCredentials.tokenLifeSpan *1000;
52
53
  delete adminClientCredentials.baseUrl;
53
54
  delete adminClientCredentials.realmName;
55
+ delete adminClientCredentials.tokenLifeSpan;
54
56
  await kcAdminClient.auth(adminClientCredentials);
55
57
 
56
58
  setInterval(async ()=>{
57
59
  await kcAdminClient.auth(adminClientCredentials);
58
- },adminClientCredentials.tokenLifeSpan*1000);
60
+ },tokenLifeSpan);
59
61
 
60
62
  realmHandler.setKcAdminClient(kcAdminClient);
61
63
  exports.realms=realmHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloak-api-manager",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Keycloak-api-manager is a lightweight Node.js wrapper for the Keycloak Admin REST API. It provides an easy-to-use functional methods and functions to manage realms, users, roles, clients, groups, and permissions directly from your application code — just like you would from the Keycloak admin console.",
5
5
  "main": "index.js",
6
6
  "scripts": {