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

homebridge-fordpass

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-fordpass - npm Package Compare versions

Comparing version 1.6.0-test.0 to 1.6.0-test.1

29

dist/fordpass-connection.js

@@ -18,3 +18,6 @@ "use strict";

const axios_1 = __importDefault(require("axios"));
const authUrl = 'https://fcis.ice.ibmcloud.com/';
const authUrl = 'https://sso.ci.lincoln.com/';
const applicationId = '71A3AD0A-CF46-4CCF-B473-FC7FE5BC4592';
const clientId = '9fb503e0-715b-47e8-adfd-ad4b7770f73b';
const userAgent = 'FordPass/5 CFNetwork/1325.0.1 Darwin/21.1.0';
class Connection {

@@ -33,6 +36,6 @@ constructor(config, log) {

'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'fordpass-na/353 CFNetwork/1121.2.2 Darwin/19.3.0',
'User-Agent': userAgent,
},
data: querystring_1.default.stringify({
client_id: '9fb503e0-715b-47e8-adfd-ad4b7770f73b',
client_id: clientId,
grant_type: 'password',

@@ -45,5 +48,19 @@ username: this.config.username,

const result = yield (0, axios_1.default)(options);
if (result.status === 200) {
this.config.access_token = result.data.access_token;
return true;
if (result.status === 200 && result.data.access_token) {
const nextResult = yield axios_1.default.put('https://api.mps.ford.com/api/oauth2/v1/token', {
code: result.data.access_token,
}, {
headers: {
'Content-Type': 'application/json',
'User-Agent': userAgent,
'Application-Id': applicationId,
},
});
if (nextResult.status === 200 && nextResult.data.access_token) {
this.config.access_token = nextResult.data.access_token;
return true;
}
else {
this.log.error(`Auth failed with status: ${nextResult.status}`);
}
}

@@ -50,0 +67,0 @@ else {

@@ -20,3 +20,3 @@ "use strict";

'Content-Type': 'application/json',
'User-Agent': 'fordpass-na/353 CFNetwork/1121.2.2 Darwin/19.3.0',
'User-Agent': 'FordPass/5 CFNetwork/1325.0.1 Darwin/21.1.0',
};

@@ -23,0 +23,0 @@ const fordAPIUrl = 'https://usapi.cv.ford.com/';

{
"displayName": "Homebridge FordPass",
"name": "homebridge-fordpass",
"version": "1.6.0-test.0",
"version": "1.6.0-test.1",
"description": "Fordpass plugin for homebridge: https://homebridge.io/",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

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