@eld0ud/fintecture-client
Advanced tools
Comparing version 1.0.28 to 1.0.29
@@ -158,3 +158,3 @@ import { AIS } from './src/Ais'; | ||
public checkRequestSignature(req: any): boolean { | ||
public checkRequestSignature(req: any): void { | ||
return this.signature.authenticateRequest(req); | ||
@@ -161,0 +161,0 @@ } |
@@ -41,4 +41,4 @@ import { IPisConnect, IAisConnect, IPisV2Connect } from './src/interfaces/connect/ConnectInterface'; | ||
deleteCustomer(accessToken: string, customerId: string): Promise<object>; | ||
checkRequestSignature(req: any): boolean; | ||
checkRequestSignature(req: any): void; | ||
private _validateConfigIntegrity; | ||
} |
{ | ||
"name": "@eld0ud/fintecture-client", | ||
"version": "1.0.28", | ||
"version": "1.0.29", | ||
"description": "Fintecture Open Banking API Gateway enabling secure bank connections and payments", | ||
@@ -5,0 +5,0 @@ "main": "lib/fintecture-client.js", |
@@ -6,3 +6,3 @@ import { IFintectureConfig } from './interfaces/ConfigInterface'; | ||
/** | ||
* Generates a V2 connect URL based on the PIS parameters | ||
* Checks request signature | ||
* | ||
@@ -12,5 +12,5 @@ * @param {string} accessTOken | ||
*/ | ||
authenticateRequest(req: any): boolean; | ||
authenticateRequest(req: any): void; | ||
private _verifySignature; | ||
private _extractSignatureComponents; | ||
} |
@@ -14,3 +14,3 @@ "use strict"; | ||
/** | ||
* Generates a V2 connect URL based on the PIS parameters | ||
* Checks request signature | ||
* | ||
@@ -35,9 +35,8 @@ * @param {string} accessTOken | ||
assert_1.default.ok(headers.digest === `SHA-256=${digest}`, 'The digest should be valid'); | ||
const PRIVATE_KEY = `PRIVATE_KEY_HERE`; // <===== UPDATE THIS | ||
const PRIVATE_KEY = this.config.private_key; | ||
assert_1.default.ok(this._verifySignature(signatureComponents.get('signature'), headers, signatureComponents.get('headers'), PRIVATE_KEY), 'The signature should be valid'); | ||
} | ||
catch (err) { | ||
return false; | ||
throw err; | ||
} | ||
return true; | ||
} | ||
@@ -44,0 +43,0 @@ _verifySignature(expectedSignature, headers, signatureParameters, privateKey) { |
{ | ||
"name": "@eld0ud/fintecture-client", | ||
"version": "1.0.28", | ||
"version": "1.0.29", | ||
"description": "Fintecture Open Banking API Gateway enabling secure bank connections and payments", | ||
@@ -5,0 +5,0 @@ "main": "lib/fintecture-client.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
201120
2978