@kronos-integration/service-authenticator 3.0.0 → 3.0.1
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": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@kronos-integration/endpoint": "^10.0.5",
|
|
33
|
-
"@kronos-integration/service": "^13.
|
|
33
|
+
"@kronos-integration/service": "^13.1.2",
|
|
34
34
|
"jsonwebtoken": "^9.0.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
@@ -2,9 +2,10 @@ import { promisify } from "node:util";
|
|
|
2
2
|
import jwt from "jsonwebtoken";
|
|
3
3
|
import ms from "ms";
|
|
4
4
|
import {
|
|
5
|
-
mergeAttributeDefinitions,
|
|
6
5
|
prepareAttributesDefinitions,
|
|
7
|
-
default_attribute
|
|
6
|
+
default_attribute,
|
|
7
|
+
public_key_attribute,
|
|
8
|
+
private_key_attribute
|
|
8
9
|
} from "pacc";
|
|
9
10
|
import { Service } from "@kronos-integration/service";
|
|
10
11
|
|
|
@@ -35,27 +36,27 @@ export class ServiceAuthenticator extends Service {
|
|
|
35
36
|
return "provide authentication services";
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
static attributes =
|
|
39
|
+
static attributes =
|
|
39
40
|
prepareAttributesDefinitions({
|
|
40
41
|
jwt: {
|
|
41
42
|
description: "jwt related",
|
|
42
43
|
attributes: {
|
|
43
44
|
private: {
|
|
45
|
+
...private_key_attribute,
|
|
44
46
|
description: "private key for token",
|
|
45
47
|
mandatory: true,
|
|
46
|
-
private: true,
|
|
47
48
|
type: "blob"
|
|
48
49
|
},
|
|
49
50
|
public: {
|
|
51
|
+
...public_key_attribute,
|
|
50
52
|
description: "public key for token",
|
|
51
53
|
mandatory: true,
|
|
52
|
-
private: true,
|
|
53
54
|
type: "blob"
|
|
54
55
|
},
|
|
55
56
|
claims: {
|
|
56
57
|
attributes: {
|
|
57
|
-
iss:
|
|
58
|
-
aud:
|
|
58
|
+
iss: default_attribute,
|
|
59
|
+
aud: default_attribute
|
|
59
60
|
}
|
|
60
61
|
},
|
|
61
62
|
access_token: {
|
|
@@ -72,7 +73,7 @@ export class ServiceAuthenticator extends Service {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
}
|
|
76
|
+
},
|
|
76
77
|
Service.attributes
|
|
77
78
|
);
|
|
78
79
|
|