@kronos-integration/service-authenticator 4.1.4 → 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 +1 -1
- package/src/service-authenticator.mjs +12 -10
package/package.json
CHANGED
|
@@ -94,17 +94,19 @@ export class ServiceAuthenticator extends Service {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
|