@azure/identity 3.1.2-alpha.20221128.2 → 3.1.2-alpha.20221205.5
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 +4 -7
- package/dist/index.js.map +1 -1
- package/dist-esm/src/credentials/azureApplicationCredential.js +0 -2
- package/dist-esm/src/credentials/azureApplicationCredential.js.map +1 -1
- package/dist-esm/src/credentials/chainedTokenCredential.js +0 -4
- package/dist-esm/src/credentials/chainedTokenCredential.js.map +1 -1
- package/dist-esm/src/credentials/defaultAzureCredential.js +0 -2
- package/dist-esm/src/credentials/defaultAzureCredential.js.map +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.js +4 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +1 -1
- package/package.json +1 -1
- package/types/identity.d.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -2211,9 +2211,12 @@ class ManagedIdentityCredential {
|
|
|
2211
2211
|
if (resultToken) {
|
|
2212
2212
|
logger$c.info(`SetAppTokenProvider has saved the token in cache`);
|
|
2213
2213
|
logger$c.info(`token = ${resultToken.token}`);
|
|
2214
|
+
const expiresInSeconds = (resultToken === null || resultToken === void 0 ? void 0 : resultToken.expiresOnTimestamp)
|
|
2215
|
+
? Math.floor((resultToken.expiresOnTimestamp - Date.now()) / 1000)
|
|
2216
|
+
: 0;
|
|
2214
2217
|
return {
|
|
2215
2218
|
accessToken: resultToken === null || resultToken === void 0 ? void 0 : resultToken.token,
|
|
2216
|
-
expiresInSeconds
|
|
2219
|
+
expiresInSeconds,
|
|
2217
2220
|
};
|
|
2218
2221
|
}
|
|
2219
2222
|
else {
|
|
@@ -2712,10 +2715,6 @@ class ChainedTokenCredential {
|
|
|
2712
2715
|
* ```
|
|
2713
2716
|
*/
|
|
2714
2717
|
constructor(...sources) {
|
|
2715
|
-
/**
|
|
2716
|
-
* The message to use when the chained token fails to get a token
|
|
2717
|
-
*/
|
|
2718
|
-
this.UnavailableMessage = "ChainedTokenCredential => failed to retrieve a token from the included credentials";
|
|
2719
2718
|
this._sources = [];
|
|
2720
2719
|
this._sources = sources;
|
|
2721
2720
|
}
|
|
@@ -3241,8 +3240,6 @@ const defaultCredentials = [
|
|
|
3241
3240
|
class DefaultAzureCredential extends ChainedTokenCredential {
|
|
3242
3241
|
constructor(options) {
|
|
3243
3242
|
super(...defaultCredentials.map((ctor) => new ctor(options)));
|
|
3244
|
-
this.UnavailableMessage =
|
|
3245
|
-
"DefaultAzureCredential => failed to retrieve a token from the included credentials. To troubleshoot, visit https://aka.ms/azsdk/js/identity/defaultazurecredential/troubleshoot.";
|
|
3246
3243
|
}
|
|
3247
3244
|
}
|
|
3248
3245
|
|