@kronos-integration/service-authenticator 4.1.0 → 4.1.2

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.0",
3
+ "version": "4.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@kronos-integration/endpoint": "^11.0.5",
34
- "@kronos-integration/service": "^15.1.1",
34
+ "@kronos-integration/service": "^15.1.2",
35
35
  "jsonwebtoken": "^9.0.3"
36
36
  },
37
37
  "devDependencies": {
@@ -91,15 +91,18 @@ export class ServiceAuthenticator extends Service {
91
91
  };
92
92
  }
93
93
 
94
- async configure(config) {
94
+ async _configure(config) {
95
+ // TODO automatically read credentials
96
+ config.jwt ||= {};
97
+
95
98
  const credentials = await this.getCredentials();
96
99
  if (credentials["jwt.private"]) {
97
100
  config.jwt.private = credentials["jwt.private"];
98
101
  }
99
- if (credentials["jwt.private"]) {
100
- config.jwt.public = credentials["jwt.pupblic"];
102
+ if (credentials["jwt.public"]) {
103
+ config.jwt.public = credentials["jwt.public"];
101
104
  }
102
- return super.configure(config);
105
+ return super._configure(config);
103
106
  }
104
107
 
105
108
  /**