@ixon-cdk/core 1.3.0 → 1.4.0-next.0
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/api/base.service.js +5 -3
- package/package.json +1 -1
package/api/base.service.js
CHANGED
|
@@ -41,10 +41,12 @@ module.exports = class ApiBaseService {
|
|
|
41
41
|
_getSecretId() {
|
|
42
42
|
let secretId;
|
|
43
43
|
try {
|
|
44
|
-
// If the `.accesstoken` file's modified time exceeds the standard expiry time of
|
|
44
|
+
// If the `.accesstoken` file's modified time exceeds the standard expiry time of 30 days,
|
|
45
45
|
// we'll make the assumption that it is no longer a valid access-token.
|
|
46
|
-
if (this._getAccessTokenFileModifiedRelativeToNow() <
|
|
47
|
-
secretId = fs.readFileSync(this._getAccessTokenFilePath(), {
|
|
46
|
+
if (this._getAccessTokenFileModifiedRelativeToNow() < 2592000) {
|
|
47
|
+
secretId = fs.readFileSync(this._getAccessTokenFilePath(), {
|
|
48
|
+
encoding: 'utf-8',
|
|
49
|
+
});
|
|
48
50
|
}
|
|
49
51
|
} catch {
|
|
50
52
|
// do nothing
|