@azure/identity 3.1.2-alpha.20221128.2 → 3.1.2

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.

Potentially problematic release.


This version of @azure/identity might be problematic. Click here for more details.

package/dist/index.js CHANGED
@@ -2210,10 +2210,12 @@ class ManagedIdentityCredential {
2210
2210
  const resultToken = await this.authenticateManagedIdentity(scopes, Object.assign(Object.assign({}, updatedOptions), appTokenProviderParameters));
2211
2211
  if (resultToken) {
2212
2212
  logger$c.info(`SetAppTokenProvider has saved the token in cache`);
2213
- logger$c.info(`token = ${resultToken.token}`);
2213
+ const expiresInSeconds = (resultToken === null || resultToken === void 0 ? void 0 : resultToken.expiresOnTimestamp)
2214
+ ? Math.floor((resultToken.expiresOnTimestamp - Date.now()) / 1000)
2215
+ : 0;
2214
2216
  return {
2215
2217
  accessToken: resultToken === null || resultToken === void 0 ? void 0 : resultToken.token,
2216
- expiresInSeconds: (resultToken === null || resultToken === void 0 ? void 0 : resultToken.expiresOnTimestamp) / 1000,
2218
+ expiresInSeconds,
2217
2219
  };
2218
2220
  }
2219
2221
  else {