@dvelop-sdk/identityprovider 4.0.0 → 4.0.3
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/README.md +1 -1
- package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts.map +1 -1
- package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js +9 -2
- package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<a href="https://github.com/d-velop/dvelop-sdk-node">
|
|
10
10
|
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-dvelop--sdk--node-%23ff0844?logo=github&style=for-the-badge">
|
|
11
11
|
</a>
|
|
12
|
-
<a href="https://github.com/d-velop/dvelop-sdk-node/blob/
|
|
12
|
+
<a href="https://github.com/d-velop/dvelop-sdk-node/blob/main/LICENSE">
|
|
13
13
|
<img alt="license" src="https://img.shields.io/github/license/d-velop/dvelop-sdk-node?style=for-the-badge">
|
|
14
14
|
</a
|
|
15
15
|
|
package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-app-session-signature.d.ts","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":"AAEA;;;EAGE;AACF,qBAAa,+BAAgC,SAAQ,KAAK;;CAMzD;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"validate-app-session-signature.d.ts","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":"AAEA;;;EAGE;AACF,qBAAa,+BAAgC,SAAQ,KAAK;;CAMzD;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAa5G"}
|
|
@@ -47,8 +47,15 @@ exports.InvalidAppSessionSignatureError = InvalidAppSessionSignatureError;
|
|
|
47
47
|
* @category Authentication
|
|
48
48
|
*/
|
|
49
49
|
function validateAppSessionSignature(appName, requestId, appSession) {
|
|
50
|
-
var
|
|
51
|
-
|
|
50
|
+
var validSignature = false;
|
|
51
|
+
try {
|
|
52
|
+
var expectedSign = crypto_1.createHash("sha256").update(appName + appSession.authSessionId + appSession.expire + requestId, "utf8").digest("hex");
|
|
53
|
+
validSignature = crypto_1.timingSafeEqual(Buffer.from(appSession.sign), Buffer.from(expectedSign));
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
throw new InvalidAppSessionSignatureError();
|
|
57
|
+
}
|
|
58
|
+
if (!validSignature) {
|
|
52
59
|
throw new InvalidAppSessionSignatureError();
|
|
53
60
|
}
|
|
54
61
|
}
|
package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-app-session-signature.js","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"validate-app-session-signature.js","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iCAAqD;AAErD;;;EAGE;AACF;IAAqD,mDAAK;IACxD,0CAA0C;IAC1C;QAAA,YACE,kBAAM,uFAAuF,CAAC,SAE/F;QADC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC;;IACzE,CAAC;IACH,sCAAC;AAAD,CAAC,AAND,CAAqD,KAAK,GAMzD;AANY,0EAA+B;AAkB5C;;;;;;;;;;;;;GAaG;AACH,SAAgB,2BAA2B,CAAC,OAAe,EAAE,SAAiB,EAAE,UAAsB;IAEpG,IAAI,cAAc,GAAY,KAAK,CAAC;IAEpC,IAAI;QACF,IAAM,YAAY,GAAW,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnJ,cAAc,GAAG,wBAAe,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;KAC3F;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,+BAA+B,EAAE,CAAC;KAC7C;IACD,IAAI,CAAC,cAAc,EAAE;QACnB,MAAM,IAAI,+BAA+B,EAAE,CAAC;KAC7C;AACH,CAAC;AAbD,kEAaC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<a href="https://github.com/d-velop/dvelop-sdk-node">
|
|
11
11
|
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-dvelop--sdk--node-%23ff0844?logo=github&style=for-the-badge">
|
|
12
12
|
</a>
|
|
13
|
-
<a href="https://github.com/d-velop/dvelop-sdk-node/blob/
|
|
13
|
+
<a href="https://github.com/d-velop/dvelop-sdk-node/blob/main/LICENSE">
|
|
14
14
|
<img alt="license" src="https://img.shields.io/github/license/d-velop/dvelop-sdk-node?style=for-the-badge">
|
|
15
15
|
</a
|
|
16
16
|
</br>
|
|
17
|
-
<p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/idpapi/en">Identityprovider-App</a> in the d.velop cloud.</p>
|
|
17
|
+
<p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/idpapi/en/identityprovider-app-201523580.html">Identityprovider-App</a> in the d.velop cloud.</p>
|
|
18
18
|
<a href="https://d-velop.github.io/dvelop-sdk-node/modules/identityprovider.html"><strong>Explore the docs »</strong></a>
|
|
19
19
|
</br>
|
|
20
20
|
<a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider"><strong>Install via npm »</strong></a>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvelop-sdk/identityprovider",
|
|
3
3
|
"description": "This package contains functionality for the Identityprovider-App in the d.velop cloud.",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
"license": "license-checker --production --onlyAllow Apache-2.0;MIT;ISC;BSD-2-Clause;BSD-3-Clause"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@dvelop-sdk/core": "^2.
|
|
26
|
+
"@dvelop-sdk/core": "^2.1.2"
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|