@kronos-integration/service-authenticator 4.1.3 → 4.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/service-authenticator",
3
- "version": "4.1.3",
3
+ "version": "4.1.5",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -30,8 +30,8 @@
30
30
  "lint:docs": "documentation lint ./src**/*.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "@kronos-integration/endpoint": "^11.0.5",
34
- "@kronos-integration/service": "^15.1.3",
33
+ "@kronos-integration/endpoint": "^11.0.6",
34
+ "@kronos-integration/service": "^15.1.4",
35
35
  "jsonwebtoken": "^9.0.3"
36
36
  },
37
37
  "devDependencies": {
@@ -94,17 +94,19 @@ export class ServiceAuthenticator extends Service {
94
94
  };
95
95
  }
96
96
 
97
- async _configure(config) {
98
- // TODO automatically read credentials
99
- config.jwt ||= {};
97
+ _configure(config) {
98
+ this.getCredentials().then(credentials => {
99
+ // TODO automatically read credentials
100
+ this.jwt ||= {};
101
+
102
+ if (credentials["jwt.private"]) {
103
+ this.jwt.private = credentials["jwt.private"];
104
+ }
105
+ if (credentials["jwt.public"]) {
106
+ this.jwt.public = credentials["jwt.public"];
107
+ }
108
+ });
100
109
 
101
- const credentials = await this.getCredentials();
102
- if (credentials["jwt.private"]) {
103
- config.jwt.private = credentials["jwt.private"];
104
- }
105
- if (credentials["jwt.public"]) {
106
- config.jwt.public = credentials["jwt.public"];
107
- }
108
110
  return super._configure(config);
109
111
  }
110
112