@kronos-integration/service-authenticator 4.1.4 → 4.1.6
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 +2 -2
- package/src/service-authenticator.mjs +18 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronos-integration/service-authenticator",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.6",
|
|
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.6",
|
|
34
|
-
"@kronos-integration/service": "^15.
|
|
34
|
+
"@kronos-integration/service": "^15.2.0",
|
|
35
35
|
"jsonwebtoken": "^9.0.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -46,12 +46,14 @@ export class ServiceAuthenticator extends Service {
|
|
|
46
46
|
private: {
|
|
47
47
|
...private_key_attribute,
|
|
48
48
|
description: "private key for token",
|
|
49
|
-
mandatory: true
|
|
49
|
+
mandatory: true,
|
|
50
|
+
persistent: true
|
|
50
51
|
},
|
|
51
52
|
public: {
|
|
52
53
|
...public_key_attribute,
|
|
53
54
|
description: "public key for token",
|
|
54
|
-
mandatory: true
|
|
55
|
+
mandatory: true,
|
|
56
|
+
persistent: true
|
|
55
57
|
},
|
|
56
58
|
claims: {
|
|
57
59
|
...object_attribute,
|
|
@@ -94,19 +96,23 @@ export class ServiceAuthenticator extends Service {
|
|
|
94
96
|
};
|
|
95
97
|
}
|
|
96
98
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
/*
|
|
100
|
+
_configure(config) {
|
|
101
|
+
this.getCredentials().then(credentials => {
|
|
102
|
+
// TODO automatically read credentials
|
|
103
|
+
this.jwt ||= {};
|
|
104
|
+
|
|
105
|
+
if (credentials["jwt.private"]) {
|
|
106
|
+
this.jwt.private = credentials["jwt.private"];
|
|
107
|
+
}
|
|
108
|
+
if (credentials["jwt.public"]) {
|
|
109
|
+
this.jwt.public = credentials["jwt.public"];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
100
112
|
|
|
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
113
|
return super._configure(config);
|
|
109
114
|
}
|
|
115
|
+
*/
|
|
110
116
|
|
|
111
117
|
/**
|
|
112
118
|
* Endpoints used to send password change requests to.
|