Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fintecture-client

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fintecture-client - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

4

fintecture-client.ts

@@ -40,4 +40,4 @@ import { AIS } from './src/Ais';

public async getAccessToken(authCode?: string): Promise<object> {
return this.authentication.accessToken(authCode);
public async getAccessToken(authCode?: string, scopes?: string): Promise<object> {
return this.authentication.accessToken(authCode, scopes);
}

@@ -44,0 +44,0 @@

@@ -20,3 +20,3 @@ import { IPisConnect, IAisConnect } from './src/interfaces/connect/ConnectInterface';

constructor(config: object);
getAccessToken(authCode?: string): Promise<object>;
getAccessToken(authCode?: string, scopes?: string): Promise<object>;
refreshAccessToken(refreshToken: string): Promise<object>;

@@ -23,0 +23,0 @@ getProviders(search?: object): Promise<object>;

@@ -37,5 +37,5 @@ "use strict";

}
getAccessToken(authCode) {
getAccessToken(authCode, scopes) {
return __awaiter(this, void 0, void 0, function* () {
return this.authentication.accessToken(authCode);
return this.authentication.accessToken(authCode, scopes);
});

@@ -42,0 +42,0 @@ }

{
"name": "fintecture-client",
"version": "1.0.15",
"version": "1.0.16",
"description": "Fintecture Open Banking API Gateway enabling secure bank connections and payments",

@@ -5,0 +5,0 @@ "main": "lib/fintecture-client.js",

@@ -26,3 +26,3 @@ import { IFintectureConfig } from './interfaces/ConfigInterface';

*/
accessToken(authCode?: string): Promise<object>;
accessToken(authCode?: string, scopes?: string): Promise<object>;
/**

@@ -29,0 +29,0 @@ * The accesstoken API is used to exchange the code received

@@ -50,5 +50,5 @@ "use strict";

*/
accessToken(authCode) {
accessToken(authCode, scopes) {
return __awaiter(this, void 0, void 0, function* () {
const data = this._getAccessTokenData(authCode);
const data = this._getAccessTokenData(authCode, scopes);
const response = yield this.axiosInstance.post(Endpoints_1.Endpoints.OAUTHACCESSTOKEN, data);

@@ -80,8 +80,4 @@ return response.data;

*/
_getAccessTokenData(authCode) {
let data = {
scope: 'PIS',
app_id: this.appId,
grant_type: 'client_credentials',
};
_getAccessTokenData(authCode, scopes) {
let data = {};
if (authCode) {

@@ -94,2 +90,12 @@ data = {

}
else {
data = {
scope: 'PIS',
app_id: this.appId,
grant_type: 'client_credentials',
};
}
if (scopes) {
data["scope"] = scopes;
}
return qs_1.default.stringify(data);

@@ -96,0 +102,0 @@ }

@@ -47,4 +47,4 @@ "use strict";

origin_uri: connectConfig.origin_uri,
error_redirect_uri: connectConfig.error_redirect_uri ? connectConfig.error_redirect_uri : null,
state: connectConfig.state ? connectConfig.state : null,
error_redirect_uri: connectConfig.error_redirect_uri,
state: connectConfig.state,
psu_type: connectConfig.psu_type,

@@ -89,4 +89,4 @@ country: connectConfig.country,

origin_uri: connectConfig.origin_uri,
error_redirect_uri: connectConfig.error_redirect_uri ? connectConfig.error_redirect_uri : null,
state: connectConfig.state ? connectConfig.state : null,
error_redirect_uri: connectConfig.error_redirect_uri,
state: connectConfig.state,
payload: sessionPayload,

@@ -93,0 +93,0 @@ psu_type: connectConfig.psu_type,

@@ -20,4 +20,4 @@ import { ISessionPayload } from '../pis/PisInterface';

customer_ip?: string;
redirect_uri: string;
origin_uri: string;
redirect_uri?: string;
origin_uri?: string;
error_redirect_uri?: string;

@@ -28,3 +28,3 @@ state?: string;

redirect_uri: string;
origin_uri: string;
origin_uri?: string;
error_redirect_uri?: string;

@@ -38,4 +38,4 @@ state?: string;

signature: string;
redirect_uri: string;
origin_uri: string;
redirect_uri?: string;
origin_uri?: string;
error_redirect_uri?: string;

@@ -57,3 +57,3 @@ state: string;

redirect_uri: string;
origin_uri: string;
origin_uri?: string;
error_redirect_uri?: string;

@@ -60,0 +60,0 @@ state?: string;

"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const uuid_1 = require("uuid");
const crypto = __importStar(require("crypto"));
const crypto_1 = require("crypto");
function generateUUID() {

@@ -56,3 +49,3 @@ return uuid_1.v4().replace(/-/g, '');

try {
const signature = crypto.createSign('RSA-SHA256');
const signature = crypto_1.createSign('RSA-SHA256');
signature.update(payload);

@@ -70,8 +63,5 @@ signature.end();

function hashBase64(plainText) {
return crypto
.createHash('sha256')
.update(plainText)
.digest('base64');
return crypto_1.createHash('sha256').update(plainText).digest('base64');
}
exports.hashBase64 = hashBase64;
//# sourceMappingURL=Crypto.js.map
{
"name": "fintecture-client",
"version": "1.0.15",
"version": "1.0.16",
"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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc