@azure/msal-node 2.12.0 → 2.13.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/dist/cache/ITokenCache.d.ts +15 -15
- package/dist/cache/NodeStorage.cjs +425 -423
- package/dist/cache/NodeStorage.cjs.map +1 -1
- package/dist/cache/NodeStorage.d.ts +193 -193
- package/dist/cache/NodeStorage.mjs +423 -423
- package/dist/cache/TokenCache.cjs +267 -265
- package/dist/cache/TokenCache.cjs.map +1 -1
- package/dist/cache/TokenCache.d.ts +90 -90
- package/dist/cache/TokenCache.mjs +265 -265
- package/dist/cache/distributed/DistributedCachePlugin.cjs +28 -26
- package/dist/cache/distributed/DistributedCachePlugin.cjs.map +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
- package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
- package/dist/cache/distributed/ICacheClient.d.ts +17 -17
- package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
- package/dist/cache/serializer/Deserializer.cjs +169 -167
- package/dist/cache/serializer/Deserializer.cjs.map +1 -1
- package/dist/cache/serializer/Deserializer.d.ts +42 -42
- package/dist/cache/serializer/Deserializer.mjs +167 -167
- package/dist/cache/serializer/Serializer.cjs +139 -137
- package/dist/cache/serializer/Serializer.cjs.map +1 -1
- package/dist/cache/serializer/Serializer.d.ts +39 -39
- package/dist/cache/serializer/Serializer.mjs +137 -137
- package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
- package/dist/client/ClientApplication.cjs +336 -334
- package/dist/client/ClientApplication.cjs.map +1 -1
- package/dist/client/ClientApplication.d.ts +143 -143
- package/dist/client/ClientApplication.mjs +334 -334
- package/dist/client/ClientAssertion.cjs +149 -143
- package/dist/client/ClientAssertion.cjs.map +1 -1
- package/dist/client/ClientAssertion.d.ts +55 -55
- package/dist/client/ClientAssertion.mjs +143 -143
- package/dist/client/ClientCredentialClient.cjs +196 -194
- package/dist/client/ClientCredentialClient.cjs.map +1 -1
- package/dist/client/ClientCredentialClient.d.ts +33 -33
- package/dist/client/ClientCredentialClient.mjs +194 -194
- package/dist/client/ConfidentialClientApplication.cjs +170 -169
- package/dist/client/ConfidentialClientApplication.cjs.map +1 -1
- package/dist/client/ConfidentialClientApplication.d.ts +58 -58
- package/dist/client/ConfidentialClientApplication.mjs +168 -169
- package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
- package/dist/client/DeviceCodeClient.cjs +209 -207
- package/dist/client/DeviceCodeClient.cjs.map +1 -1
- package/dist/client/DeviceCodeClient.d.ts +53 -53
- package/dist/client/DeviceCodeClient.mjs +207 -207
- package/dist/client/IConfidentialClientApplication.d.ts +39 -39
- package/dist/client/IPublicClientApplication.d.ts +42 -42
- package/dist/client/ManagedIdentityApplication.cjs +86 -84
- package/dist/client/ManagedIdentityApplication.cjs.map +1 -1
- package/dist/client/ManagedIdentityApplication.d.ts +30 -30
- package/dist/client/ManagedIdentityApplication.mjs +84 -84
- package/dist/client/ManagedIdentityClient.cjs +62 -60
- package/dist/client/ManagedIdentityClient.cjs.map +1 -1
- package/dist/client/ManagedIdentityClient.d.ts +27 -27
- package/dist/client/ManagedIdentityClient.mjs +60 -60
- package/dist/client/ManagedIdentitySources/AppService.cjs +47 -45
- package/dist/client/ManagedIdentitySources/AppService.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.d.ts +17 -17
- package/dist/client/ManagedIdentitySources/AppService.mjs +46 -46
- package/dist/client/ManagedIdentitySources/AzureArc.cjs +161 -120
- package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts +27 -23
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +155 -122
- package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +124 -122
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +30 -30
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +122 -122
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.cjs +40 -38
- package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts +16 -16
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +39 -39
- package/dist/client/ManagedIdentitySources/Imds.cjs +45 -43
- package/dist/client/ManagedIdentitySources/Imds.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.d.ts +12 -12
- package/dist/client/ManagedIdentitySources/Imds.mjs +44 -44
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +56 -54
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +17 -17
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +55 -55
- package/dist/client/OnBehalfOfClient.cjs +204 -202
- package/dist/client/OnBehalfOfClient.cjs.map +1 -1
- package/dist/client/OnBehalfOfClient.d.ts +47 -47
- package/dist/client/OnBehalfOfClient.mjs +202 -202
- package/dist/client/PublicClientApplication.cjs +239 -237
- package/dist/client/PublicClientApplication.cjs.map +1 -1
- package/dist/client/PublicClientApplication.d.ts +72 -72
- package/dist/client/PublicClientApplication.mjs +237 -237
- package/dist/client/UsernamePasswordClient.cjs +97 -95
- package/dist/client/UsernamePasswordClient.cjs.map +1 -1
- package/dist/client/UsernamePasswordClient.d.ts +25 -25
- package/dist/client/UsernamePasswordClient.mjs +95 -95
- package/dist/config/Configuration.cjs +108 -106
- package/dist/config/Configuration.cjs.map +1 -1
- package/dist/config/Configuration.d.ts +131 -131
- package/dist/config/Configuration.mjs +106 -106
- package/dist/config/ManagedIdentityId.cjs +50 -48
- package/dist/config/ManagedIdentityId.cjs.map +1 -1
- package/dist/config/ManagedIdentityId.d.ts +11 -11
- package/dist/config/ManagedIdentityId.mjs +48 -48
- package/dist/config/ManagedIdentityRequestParameters.cjs +30 -28
- package/dist/config/ManagedIdentityRequestParameters.cjs.map +1 -1
- package/dist/config/ManagedIdentityRequestParameters.d.ts +11 -11
- package/dist/config/ManagedIdentityRequestParameters.mjs +28 -28
- package/dist/crypto/CryptoProvider.cjs +91 -89
- package/dist/crypto/CryptoProvider.cjs.map +1 -1
- package/dist/crypto/CryptoProvider.d.ts +62 -62
- package/dist/crypto/CryptoProvider.mjs +89 -89
- package/dist/crypto/GuidGenerator.cjs +24 -22
- package/dist/crypto/GuidGenerator.cjs.map +1 -1
- package/dist/crypto/GuidGenerator.d.ts +14 -14
- package/dist/crypto/GuidGenerator.mjs +22 -22
- package/dist/crypto/HashUtils.cjs +19 -13
- package/dist/crypto/HashUtils.cjs.map +1 -1
- package/dist/crypto/HashUtils.d.ts +8 -8
- package/dist/crypto/HashUtils.mjs +13 -13
- package/dist/crypto/PkceGenerator.cjs +55 -49
- package/dist/crypto/PkceGenerator.cjs.map +1 -1
- package/dist/crypto/PkceGenerator.d.ts +22 -22
- package/dist/crypto/PkceGenerator.mjs +49 -49
- package/dist/error/ManagedIdentityError.cjs +43 -41
- package/dist/error/ManagedIdentityError.cjs.map +1 -1
- package/dist/error/ManagedIdentityError.d.ts +30 -30
- package/dist/error/ManagedIdentityError.mjs +41 -41
- package/dist/error/ManagedIdentityErrorCodes.cjs +26 -24
- package/dist/error/ManagedIdentityErrorCodes.cjs.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.d.ts +22 -22
- package/dist/error/ManagedIdentityErrorCodes.mjs +24 -24
- package/dist/error/NodeAuthError.cjs +97 -95
- package/dist/error/NodeAuthError.cjs.map +1 -1
- package/dist/error/NodeAuthError.d.ts +73 -73
- package/dist/error/NodeAuthError.mjs +95 -95
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +45 -45
- package/dist/index.mjs +1 -1
- package/dist/internals.cjs +6 -8
- package/dist/internals.cjs.map +1 -1
- package/dist/internals.d.ts +6 -6
- package/dist/internals.mjs +4 -8
- package/dist/internals.mjs.map +1 -1
- package/dist/network/HttpClient.cjs +288 -281
- package/dist/network/HttpClient.cjs.map +1 -1
- package/dist/network/HttpClient.d.ts +25 -25
- package/dist/network/HttpClient.mjs +281 -281
- package/dist/network/HttpClientWithRetries.cjs +36 -34
- package/dist/network/HttpClientWithRetries.cjs.map +1 -1
- package/dist/network/HttpClientWithRetries.d.ts +11 -11
- package/dist/network/HttpClientWithRetries.mjs +34 -34
- package/dist/network/ILoopbackClient.d.ts +10 -10
- package/dist/network/LoopbackClient.cjs +87 -77
- package/dist/network/LoopbackClient.cjs.map +1 -1
- package/dist/network/LoopbackClient.d.ts +21 -21
- package/dist/network/LoopbackClient.d.ts.map +1 -1
- package/dist/network/LoopbackClient.mjs +81 -77
- package/dist/network/LoopbackClient.mjs.map +1 -1
- package/dist/packageMetadata.cjs +6 -4
- package/dist/packageMetadata.cjs.map +1 -1
- package/dist/packageMetadata.d.ts +2 -2
- package/dist/packageMetadata.mjs +4 -4
- package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
- package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
- package/dist/request/ClientCredentialRequest.d.ts +14 -14
- package/dist/request/DeviceCodeRequest.d.ts +15 -15
- package/dist/request/InteractiveRequest.d.ts +22 -22
- package/dist/request/ManagedIdentityRequest.d.ts +8 -8
- package/dist/request/ManagedIdentityRequestParams.d.ts +9 -9
- package/dist/request/OnBehalfOfRequest.d.ts +14 -14
- package/dist/request/RefreshTokenRequest.d.ts +17 -17
- package/dist/request/SignOutRequest.d.ts +5 -5
- package/dist/request/SilentFlowRequest.d.ts +16 -16
- package/dist/request/UsernamePasswordRequest.d.ts +19 -19
- package/dist/response/ManagedIdentityTokenResponse.d.ts +34 -34
- package/dist/retry/IHttpRetryPolicy.d.ts +5 -5
- package/dist/retry/LinearRetryPolicy.cjs +42 -40
- package/dist/retry/LinearRetryPolicy.cjs.map +1 -1
- package/dist/retry/LinearRetryPolicy.d.ts +11 -11
- package/dist/retry/LinearRetryPolicy.mjs +40 -40
- package/dist/utils/Constants.cjs +138 -136
- package/dist/utils/Constants.cjs.map +1 -1
- package/dist/utils/Constants.d.ts +141 -141
- package/dist/utils/Constants.mjs +136 -136
- package/dist/utils/EncodingUtils.cjs +46 -44
- package/dist/utils/EncodingUtils.cjs.map +1 -1
- package/dist/utils/EncodingUtils.d.ts +26 -26
- package/dist/utils/EncodingUtils.mjs +44 -44
- package/dist/utils/NetworkUtils.cjs +40 -38
- package/dist/utils/NetworkUtils.cjs.map +1 -1
- package/dist/utils/NetworkUtils.d.ts +5 -5
- package/dist/utils/NetworkUtils.mjs +38 -38
- package/package.json +2 -2
- package/src/client/ConfidentialClientApplication.ts +3 -3
- package/src/client/ManagedIdentitySources/AzureArc.ts +80 -25
- package/src/network/LoopbackClient.ts +6 -0
- package/src/packageMetadata.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClientWithRetries.cjs","sources":["../../src/network/HttpClientWithRetries.ts"],"sourcesContent":[null],"names":["HttpMethod","HeaderNames"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpClientWithRetries.cjs","sources":["../../src/network/HttpClientWithRetries.ts"],"sourcesContent":[null],"names":["HttpMethod","HeaderNames"],"mappings":";;;;;;;;;AAAA;;;AAGG;MAWU,qBAAqB,CAAA;IAI9B,WACI,CAAA,mBAAmC,EACnC,WAA6B,EAAA;AAE7B,QAAA,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;KAClC;AAEO,IAAA,MAAM,6BAA6B,CACvC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,IAAI,UAAU,KAAKA,oBAAU,CAAC,GAAG,EAAE;YAC/B,OAAO,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACrE,SAAA;AAAM,aAAA;YACH,OAAO,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACtE,SAAA;KACJ;AAEO,IAAA,MAAM,uBAAuB,CACjC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;;AAG/B,QAAA,IAAI,QAAQ,GACR,MAAM,IAAI,CAAC,6BAA6B,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QAEvE,IAAI,YAAY,GAAW,CAAC,CAAC;QAC7B,OACI,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAChC,QAAQ,CAAC,MAAM,EACf,YAAY,EACZ,QAAQ,CAAC,OAAO,CAACC,sBAAW,CAAC,WAAW,CAAC,CAC5C,EACH;AACE,YAAA,QAAQ,GAAG,MAAM,IAAI,CAAC,6BAA6B,CAC/C,UAAU,EACV,GAAG,EACH,OAAO,CACV,CAAC;AACF,YAAA,YAAY,EAAE,CAAC;AAClB,SAAA;AAED,QAAA,OAAO,QAAQ,CAAC;KACnB;AAEM,IAAA,MAAM,mBAAmB,CAC5B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAACD,oBAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACrE;AAEM,IAAA,MAAM,oBAAoB,CAC7B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAACA,oBAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACtE;AACJ;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common";
|
|
2
|
-
import { IHttpRetryPolicy } from "../retry/IHttpRetryPolicy";
|
|
3
|
-
export declare class HttpClientWithRetries implements INetworkModule {
|
|
4
|
-
private httpClientNoRetries;
|
|
5
|
-
private retryPolicy;
|
|
6
|
-
constructor(httpClientNoRetries: INetworkModule, retryPolicy: IHttpRetryPolicy);
|
|
7
|
-
private sendNetworkRequestAsyncHelper;
|
|
8
|
-
private sendNetworkRequestAsync;
|
|
9
|
-
sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;
|
|
10
|
-
sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;
|
|
11
|
-
}
|
|
1
|
+
import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common";
|
|
2
|
+
import { IHttpRetryPolicy } from "../retry/IHttpRetryPolicy";
|
|
3
|
+
export declare class HttpClientWithRetries implements INetworkModule {
|
|
4
|
+
private httpClientNoRetries;
|
|
5
|
+
private retryPolicy;
|
|
6
|
+
constructor(httpClientNoRetries: INetworkModule, retryPolicy: IHttpRetryPolicy);
|
|
7
|
+
private sendNetworkRequestAsyncHelper;
|
|
8
|
+
private sendNetworkRequestAsync;
|
|
9
|
+
sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;
|
|
10
|
+
sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=HttpClientWithRetries.d.ts.map
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { HeaderNames } from '@azure/msal-common';
|
|
4
4
|
import { HttpMethod } from '../utils/Constants.mjs';
|
|
5
5
|
|
|
6
|
-
/*
|
|
7
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
-
* Licensed under the MIT License.
|
|
9
|
-
*/
|
|
10
|
-
class HttpClientWithRetries {
|
|
11
|
-
constructor(httpClientNoRetries, retryPolicy) {
|
|
12
|
-
this.httpClientNoRetries = httpClientNoRetries;
|
|
13
|
-
this.retryPolicy = retryPolicy;
|
|
14
|
-
}
|
|
15
|
-
async sendNetworkRequestAsyncHelper(httpMethod, url, options) {
|
|
16
|
-
if (httpMethod === HttpMethod.GET) {
|
|
17
|
-
return this.httpClientNoRetries.sendGetRequestAsync(url, options);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
return this.httpClientNoRetries.sendPostRequestAsync(url, options);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
async sendNetworkRequestAsync(httpMethod, url, options) {
|
|
24
|
-
// the underlying network module (custom or HttpClient) will make the call
|
|
25
|
-
let response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
|
|
26
|
-
let currentRetry = 0;
|
|
27
|
-
while (await this.retryPolicy.pauseForRetry(response.status, currentRetry, response.headers[HeaderNames.RETRY_AFTER])) {
|
|
28
|
-
response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
|
|
29
|
-
currentRetry++;
|
|
30
|
-
}
|
|
31
|
-
return response;
|
|
32
|
-
}
|
|
33
|
-
async sendGetRequestAsync(url, options) {
|
|
34
|
-
return this.sendNetworkRequestAsync(HttpMethod.GET, url, options);
|
|
35
|
-
}
|
|
36
|
-
async sendPostRequestAsync(url, options) {
|
|
37
|
-
return this.sendNetworkRequestAsync(HttpMethod.POST, url, options);
|
|
38
|
-
}
|
|
6
|
+
/*
|
|
7
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
+
* Licensed under the MIT License.
|
|
9
|
+
*/
|
|
10
|
+
class HttpClientWithRetries {
|
|
11
|
+
constructor(httpClientNoRetries, retryPolicy) {
|
|
12
|
+
this.httpClientNoRetries = httpClientNoRetries;
|
|
13
|
+
this.retryPolicy = retryPolicy;
|
|
14
|
+
}
|
|
15
|
+
async sendNetworkRequestAsyncHelper(httpMethod, url, options) {
|
|
16
|
+
if (httpMethod === HttpMethod.GET) {
|
|
17
|
+
return this.httpClientNoRetries.sendGetRequestAsync(url, options);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return this.httpClientNoRetries.sendPostRequestAsync(url, options);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async sendNetworkRequestAsync(httpMethod, url, options) {
|
|
24
|
+
// the underlying network module (custom or HttpClient) will make the call
|
|
25
|
+
let response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
|
|
26
|
+
let currentRetry = 0;
|
|
27
|
+
while (await this.retryPolicy.pauseForRetry(response.status, currentRetry, response.headers[HeaderNames.RETRY_AFTER])) {
|
|
28
|
+
response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
|
|
29
|
+
currentRetry++;
|
|
30
|
+
}
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
async sendGetRequestAsync(url, options) {
|
|
34
|
+
return this.sendNetworkRequestAsync(HttpMethod.GET, url, options);
|
|
35
|
+
}
|
|
36
|
+
async sendPostRequestAsync(url, options) {
|
|
37
|
+
return this.sendNetworkRequestAsync(HttpMethod.POST, url, options);
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export { HttpClientWithRetries };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation.
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export interface ILoopbackClient {
|
|
7
|
-
listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
|
|
8
|
-
getRedirectUri(): string;
|
|
9
|
-
closeServer(): void;
|
|
10
|
-
}
|
|
1
|
+
import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface ILoopbackClient {
|
|
7
|
+
listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
|
|
8
|
+
getRedirectUri(): string;
|
|
9
|
+
closeServer(): void;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=ILoopbackClient.d.ts.map
|
|
@@ -1,88 +1,98 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
+
|
|
5
7
|
var msalCommon = require('@azure/msal-common');
|
|
6
8
|
var http = require('http');
|
|
7
9
|
var NodeAuthError = require('../error/NodeAuthError.cjs');
|
|
8
10
|
var Constants = require('../utils/Constants.cjs');
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.server
|
|
84
|
-
|
|
85
|
-
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18
|
+
* Licensed under the MIT License.
|
|
19
|
+
*/
|
|
20
|
+
class LoopbackClient {
|
|
21
|
+
/**
|
|
22
|
+
* Spins up a loopback server which returns the server response when the localhost redirectUri is hit
|
|
23
|
+
* @param successTemplate
|
|
24
|
+
* @param errorTemplate
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
async listenForAuthCode(successTemplate, errorTemplate) {
|
|
28
|
+
if (this.server) {
|
|
29
|
+
throw NodeAuthError.NodeAuthError.createLoopbackServerAlreadyExistsError();
|
|
30
|
+
}
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
this.server = http__default["default"].createServer((req, res) => {
|
|
33
|
+
const url = req.url;
|
|
34
|
+
if (!url) {
|
|
35
|
+
res.end(errorTemplate ||
|
|
36
|
+
"Error occurred loading redirectUrl");
|
|
37
|
+
reject(NodeAuthError.NodeAuthError.createUnableToLoadRedirectUrlError());
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
else if (url === msalCommon.Constants.FORWARD_SLASH) {
|
|
41
|
+
res.end(successTemplate ||
|
|
42
|
+
"Auth code was successfully acquired. You can close this window now.");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const redirectUri = this.getRedirectUri();
|
|
46
|
+
const parsedUrl = new URL(url, redirectUri);
|
|
47
|
+
const authCodeResponse = msalCommon.UrlUtils.getDeserializedResponse(parsedUrl.search) || {};
|
|
48
|
+
if (authCodeResponse.code) {
|
|
49
|
+
res.writeHead(msalCommon.HttpStatus.REDIRECT, {
|
|
50
|
+
location: redirectUri,
|
|
51
|
+
}); // Prevent auth code from being saved in the browser history
|
|
52
|
+
res.end();
|
|
53
|
+
}
|
|
54
|
+
if (authCodeResponse.error) {
|
|
55
|
+
res.end(errorTemplate ||
|
|
56
|
+
`Error occurred: ${authCodeResponse.error}`);
|
|
57
|
+
}
|
|
58
|
+
resolve(authCodeResponse);
|
|
59
|
+
});
|
|
60
|
+
this.server.listen(0); // Listen on any available port
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get the port that the loopback server is running on
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
getRedirectUri() {
|
|
68
|
+
if (!this.server || !this.server.listening) {
|
|
69
|
+
throw NodeAuthError.NodeAuthError.createNoLoopbackServerExistsError();
|
|
70
|
+
}
|
|
71
|
+
const address = this.server.address();
|
|
72
|
+
if (!address || typeof address === "string" || !address.port) {
|
|
73
|
+
this.closeServer();
|
|
74
|
+
throw NodeAuthError.NodeAuthError.createInvalidLoopbackAddressTypeError();
|
|
75
|
+
}
|
|
76
|
+
const port = address && address.port;
|
|
77
|
+
return `${Constants.Constants.HTTP_PROTOCOL}${Constants.Constants.LOCALHOST}:${port}`;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Close the loopback server
|
|
81
|
+
*/
|
|
82
|
+
closeServer() {
|
|
83
|
+
if (this.server) {
|
|
84
|
+
// Only stops accepting new connections, server will close once open/idle connections are closed.
|
|
85
|
+
this.server.close();
|
|
86
|
+
if (typeof this.server.closeAllConnections === "function") {
|
|
87
|
+
/*
|
|
88
|
+
* Close open/idle connections. This API is available in Node versions 18.2 and higher
|
|
89
|
+
*/
|
|
90
|
+
this.server.closeAllConnections();
|
|
91
|
+
}
|
|
92
|
+
this.server.unref();
|
|
93
|
+
this.server = undefined;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
exports.LoopbackClient = LoopbackClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoopbackClient.cjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["NodeAuthError","CommonConstants","UrlUtils","HttpStatus","Constants"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoopbackClient.cjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["NodeAuthError","http","CommonConstants","UrlUtils","HttpStatus","Constants"],"mappings":";;;;;;;;;;;;;;;AAAA;;;AAGG;MAaU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAMA,2BAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,KAAI;AAChB,YAAA,IAAI,CAAC,MAAM,GAAGC,wBAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACFD,2BAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,OAAO;AACV,iBAAA;AAAM,qBAAA,IAAI,GAAG,KAAKE,oBAAe,CAAC,aAAa,EAAE;oBAC9C,GAAG,CAAC,GAAG,CACH,eAAe;AAC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qCAAqC,EAAE,CAAC;AAC/D,SAAA;AAED,QAAA,MAAM,IAAI,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QAErC,OAAO,CAAA,EAAGK,mBAAS,CAAC,aAAa,CAAA,EAAGA,mBAAS,CAAC,SAAS,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE,CAAC;KACrE;AAED;;AAEG;IACH,WAAW,GAAA;QACP,IAAI,IAAI,CAAC,MAAM,EAAE;;AAEb,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAEpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,KAAK,UAAU,EAAE;AACvD;;AAEG;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;AACrC,aAAA;AACD,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
|
|
2
|
-
import { ILoopbackClient } from "./ILoopbackClient.js";
|
|
3
|
-
export declare class LoopbackClient implements ILoopbackClient {
|
|
4
|
-
private server;
|
|
5
|
-
/**
|
|
6
|
-
* Spins up a loopback server which returns the server response when the localhost redirectUri is hit
|
|
7
|
-
* @param successTemplate
|
|
8
|
-
* @param errorTemplate
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* Get the port that the loopback server is running on
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
getRedirectUri(): string;
|
|
17
|
-
/**
|
|
18
|
-
* Close the loopback server
|
|
19
|
-
*/
|
|
20
|
-
closeServer(): void;
|
|
21
|
-
}
|
|
1
|
+
import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
|
|
2
|
+
import { ILoopbackClient } from "./ILoopbackClient.js";
|
|
3
|
+
export declare class LoopbackClient implements ILoopbackClient {
|
|
4
|
+
private server;
|
|
5
|
+
/**
|
|
6
|
+
* Spins up a loopback server which returns the server response when the localhost redirectUri is hit
|
|
7
|
+
* @param successTemplate
|
|
8
|
+
* @param errorTemplate
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get the port that the loopback server is running on
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
getRedirectUri(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Close the loopback server
|
|
19
|
+
*/
|
|
20
|
+
closeServer(): void;
|
|
21
|
+
}
|
|
22
22
|
//# sourceMappingURL=LoopbackClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,+BAA+B,EAGlC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAA0B;IAExC;;;;;OAKG;IACG,iBAAiB,CACnB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,+BAA+B,EAGlC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAA0B;IAExC;;;;;OAKG;IACG,iBAAiB,CACnB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC;IAqD3C;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAetB"}
|
|
@@ -1,86 +1,90 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { Constants, UrlUtils, HttpStatus } from '@azure/msal-common';
|
|
4
4
|
import http from 'http';
|
|
5
5
|
import { NodeAuthError } from '../error/NodeAuthError.mjs';
|
|
6
6
|
import { Constants as Constants$1 } from '../utils/Constants.mjs';
|
|
7
7
|
|
|
8
|
-
/*
|
|
9
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
-
* Licensed under the MIT License.
|
|
11
|
-
*/
|
|
12
|
-
class LoopbackClient {
|
|
13
|
-
/**
|
|
14
|
-
* Spins up a loopback server which returns the server response when the localhost redirectUri is hit
|
|
15
|
-
* @param successTemplate
|
|
16
|
-
* @param errorTemplate
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
async listenForAuthCode(successTemplate, errorTemplate) {
|
|
20
|
-
if (this.server) {
|
|
21
|
-
throw NodeAuthError.createLoopbackServerAlreadyExistsError();
|
|
22
|
-
}
|
|
23
|
-
return new Promise((resolve, reject) => {
|
|
24
|
-
this.server = http.createServer((req, res) => {
|
|
25
|
-
const url = req.url;
|
|
26
|
-
if (!url) {
|
|
27
|
-
res.end(errorTemplate ||
|
|
28
|
-
"Error occurred loading redirectUrl");
|
|
29
|
-
reject(NodeAuthError.createUnableToLoadRedirectUrlError());
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
else if (url === Constants.FORWARD_SLASH) {
|
|
33
|
-
res.end(successTemplate ||
|
|
34
|
-
"Auth code was successfully acquired. You can close this window now.");
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const redirectUri = this.getRedirectUri();
|
|
38
|
-
const parsedUrl = new URL(url, redirectUri);
|
|
39
|
-
const authCodeResponse = UrlUtils.getDeserializedResponse(parsedUrl.search) || {};
|
|
40
|
-
if (authCodeResponse.code) {
|
|
41
|
-
res.writeHead(HttpStatus.REDIRECT, {
|
|
42
|
-
location: redirectUri,
|
|
43
|
-
}); // Prevent auth code from being saved in the browser history
|
|
44
|
-
res.end();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (!
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
8
|
+
/*
|
|
9
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
+
* Licensed under the MIT License.
|
|
11
|
+
*/
|
|
12
|
+
class LoopbackClient {
|
|
13
|
+
/**
|
|
14
|
+
* Spins up a loopback server which returns the server response when the localhost redirectUri is hit
|
|
15
|
+
* @param successTemplate
|
|
16
|
+
* @param errorTemplate
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
async listenForAuthCode(successTemplate, errorTemplate) {
|
|
20
|
+
if (this.server) {
|
|
21
|
+
throw NodeAuthError.createLoopbackServerAlreadyExistsError();
|
|
22
|
+
}
|
|
23
|
+
return new Promise((resolve, reject) => {
|
|
24
|
+
this.server = http.createServer((req, res) => {
|
|
25
|
+
const url = req.url;
|
|
26
|
+
if (!url) {
|
|
27
|
+
res.end(errorTemplate ||
|
|
28
|
+
"Error occurred loading redirectUrl");
|
|
29
|
+
reject(NodeAuthError.createUnableToLoadRedirectUrlError());
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
else if (url === Constants.FORWARD_SLASH) {
|
|
33
|
+
res.end(successTemplate ||
|
|
34
|
+
"Auth code was successfully acquired. You can close this window now.");
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const redirectUri = this.getRedirectUri();
|
|
38
|
+
const parsedUrl = new URL(url, redirectUri);
|
|
39
|
+
const authCodeResponse = UrlUtils.getDeserializedResponse(parsedUrl.search) || {};
|
|
40
|
+
if (authCodeResponse.code) {
|
|
41
|
+
res.writeHead(HttpStatus.REDIRECT, {
|
|
42
|
+
location: redirectUri,
|
|
43
|
+
}); // Prevent auth code from being saved in the browser history
|
|
44
|
+
res.end();
|
|
45
|
+
}
|
|
46
|
+
if (authCodeResponse.error) {
|
|
47
|
+
res.end(errorTemplate ||
|
|
48
|
+
`Error occurred: ${authCodeResponse.error}`);
|
|
49
|
+
}
|
|
50
|
+
resolve(authCodeResponse);
|
|
51
|
+
});
|
|
52
|
+
this.server.listen(0); // Listen on any available port
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get the port that the loopback server is running on
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
getRedirectUri() {
|
|
60
|
+
if (!this.server || !this.server.listening) {
|
|
61
|
+
throw NodeAuthError.createNoLoopbackServerExistsError();
|
|
62
|
+
}
|
|
63
|
+
const address = this.server.address();
|
|
64
|
+
if (!address || typeof address === "string" || !address.port) {
|
|
65
|
+
this.closeServer();
|
|
66
|
+
throw NodeAuthError.createInvalidLoopbackAddressTypeError();
|
|
67
|
+
}
|
|
68
|
+
const port = address && address.port;
|
|
69
|
+
return `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}:${port}`;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Close the loopback server
|
|
73
|
+
*/
|
|
74
|
+
closeServer() {
|
|
75
|
+
if (this.server) {
|
|
76
|
+
// Only stops accepting new connections, server will close once open/idle connections are closed.
|
|
77
|
+
this.server.close();
|
|
78
|
+
if (typeof this.server.closeAllConnections === "function") {
|
|
79
|
+
/*
|
|
80
|
+
* Close open/idle connections. This API is available in Node versions 18.2 and higher
|
|
81
|
+
*/
|
|
82
|
+
this.server.closeAllConnections();
|
|
83
|
+
}
|
|
84
|
+
this.server.unref();
|
|
85
|
+
this.server = undefined;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
export { LoopbackClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoopbackClient.mjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA;;;AAGG;MAaU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAM,aAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,KAAI;AAChB,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACF,aAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,O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G,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QAErC,OAAO,CAAA,EAAGC,WAAS,CAAC,aAAa,CAAA,EAAGA,WAAS,CAAC,SAAS,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE,CAAC;KACrE;AAED;;AAEG;IACH,WAAW,GAAA;QACP,IAAI,IAAI,CAAC,MAAM,EAAE;;AAEb,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAEpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,KAAK,UAAU,EAAE;AACvD;;AAEG;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;AACrC,aAAA;AACD,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"LoopbackClient.mjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA;;;AAGG;MAaU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAM,aAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,KAAI;AAChB,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACF,aAAa,CAAC,kCAAk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I,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC1D,IAAI,CAAC,WAAW,EAAE,CAAC;AACnB,YAAA,MAAM,aAAa,CAAC,qCAAqC,EAAE,CAAC;AAC/D,SAAA;AAED,QAAA,MAAM,IAAI,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QAErC,OAAO,CAAA,EAAGC,WAAS,CAAC,aAAa,CAAA,EAAGA,WAAS,CAAC,SAAS,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE,CAAC;KACrE;AAED;;AAEG;IACH,WAAW,GAAA;QACP,IAAI,IAAI,CAAC,MAAM,EAAE;;AAEb,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAEpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,KAAK,UAAU,EAAE;AACvD;;AAEG;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;AACrC,aAAA;AACD,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
|
package/dist/packageMetadata.cjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
+
|
|
7
|
+
/* eslint-disable header/header */
|
|
8
|
+
const name = "@azure/msal-node";
|
|
9
|
+
const version = "2.13.0";
|
|
8
10
|
|
|
9
11
|
exports.name = name;
|
|
10
12
|
exports.version = version;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageMetadata.cjs","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"packageMetadata.cjs","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;AACO,MAAM,IAAI,GAAG,mBAAmB;AAChC,MAAM,OAAO,GAAG;;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const name = "@azure/msal-node";
|
|
2
|
-
export declare const version = "2.
|
|
1
|
+
export declare const name = "@azure/msal-node";
|
|
2
|
+
export declare const version = "2.13.0";
|
|
3
3
|
//# sourceMappingURL=packageMetadata.d.ts.map
|
package/dist/packageMetadata.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
|
-
/* eslint-disable header/header */
|
|
4
|
-
const name = "@azure/msal-node";
|
|
5
|
-
const version = "2.
|
|
3
|
+
/* eslint-disable header/header */
|
|
4
|
+
const name = "@azure/msal-node";
|
|
5
|
+
const version = "2.13.0";
|
|
6
6
|
|
|
7
7
|
export { name, version };
|
|
8
8
|
//# sourceMappingURL=packageMetadata.mjs.map
|