Skip to content

Commit

Permalink
update Carelink EU with issue#18
Browse files Browse the repository at this point in the history
mddub/minimed-connect-to-nightscout#18
Outlines some major changes in EU carelink as of 28.06.2020.

This patch updates the module with the information provided.
  • Loading branch information
bewest committed Jun 28, 2020
1 parent 432dec1 commit 6983764
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions carelink.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var _ = require('lodash'),
var logger = require('./logger');

var DEFAULT_MAX_RETRY_DURATION = module.exports.defaultMaxRetryDuration = 512;
var USE_EU = process.env['MMCONNECT_SERVER'] === 'EU' ? true : false;
if (process.env['MMCONNECT_SERVER'] === 'EU') {
var carelinkServerAddress = "carelink.minimed.eu";
} else {
Expand All @@ -19,6 +20,12 @@ var CARELINK_AFTER_LOGIN_URL = 'https://' + carelinkServerAddress + '/patient/ma
var CARELINK_JSON_BASE_URL = 'https://' + carelinkServerAddress + '/patient/connect/ConnectViewerServlet?cpSerialNumber=NONE&msgType=last24hours&requestTime=';
var CARELINK_LOGIN_COOKIE = '_WL_AUTHCOOKIE_JSESSIONID';

var DEFAULT_OAUTH = process.env['USE_PRE_2020_OAUTH_EU'] == '1' ? false : true;
if (DEFAULT_OAUTH && USE_EU) {
CARELINK_SECURITY_URL = 'https://mdtlogin.medtronic.com/mmcl/auth/oauth/v2/authorize/login';
CARELINK_JSON_BASE_URL = 'https://carelink.minimed.eu/patient/connect/data?cpSerialNumber=NONE&msgType=last24hours&requestTime';
}

var carelinkJsonUrlNow = function() {
return CARELINK_JSON_BASE_URL + Date.now();
};
Expand Down

0 comments on commit 6983764

Please sign in to comment.