@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,49 +1,49 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AuthError } from '@azure/msal-common';
|
|
4
4
|
import { invalidFileExtension, invalidFilePath, invalidManagedIdentityIdType, invalidSecret, platformNotSupported, missingId, MsiEnvironmentVariableUrlMalformedErrorCodes, networkUnavailable, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat } from './ManagedIdentityErrorCodes.mjs';
|
|
5
5
|
import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
|
|
6
6
|
|
|
7
|
-
/*
|
|
8
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
* Licensed under the MIT License.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
|
|
13
|
-
*/
|
|
14
|
-
const ManagedIdentityErrorMessages = {
|
|
15
|
-
[invalidFileExtension]: "The file path in the WWW-Authenticate header does not contain a .key file.",
|
|
16
|
-
[invalidFilePath]: "The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",
|
|
17
|
-
[invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.",
|
|
18
|
-
[invalidSecret]: "The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",
|
|
19
|
-
[platformNotSupported]: "The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",
|
|
20
|
-
[missingId]: "A ManagedIdentityId id was not provided.",
|
|
21
|
-
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
22
|
-
.AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,
|
|
23
|
-
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
24
|
-
.IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`,
|
|
25
|
-
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
26
|
-
.IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`,
|
|
27
|
-
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
28
|
-
.MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`,
|
|
29
|
-
[networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.",
|
|
30
|
-
[unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.",
|
|
31
|
-
[unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.",
|
|
32
|
-
[unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.",
|
|
33
|
-
[unableToReadSecretFile]: "Unable to read the secret file.",
|
|
34
|
-
[userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",
|
|
35
|
-
[wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",
|
|
36
|
-
[wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
|
|
37
|
-
};
|
|
38
|
-
class ManagedIdentityError extends AuthError {
|
|
39
|
-
constructor(errorCode) {
|
|
40
|
-
super(errorCode, ManagedIdentityErrorMessages[errorCode]);
|
|
41
|
-
this.name = "ManagedIdentityError";
|
|
42
|
-
Object.setPrototypeOf(this, ManagedIdentityError.prototype);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function createManagedIdentityError(errorCode) {
|
|
46
|
-
return new ManagedIdentityError(errorCode);
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
|
|
13
|
+
*/
|
|
14
|
+
const ManagedIdentityErrorMessages = {
|
|
15
|
+
[invalidFileExtension]: "The file path in the WWW-Authenticate header does not contain a .key file.",
|
|
16
|
+
[invalidFilePath]: "The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",
|
|
17
|
+
[invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.",
|
|
18
|
+
[invalidSecret]: "The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",
|
|
19
|
+
[platformNotSupported]: "The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",
|
|
20
|
+
[missingId]: "A ManagedIdentityId id was not provided.",
|
|
21
|
+
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
22
|
+
.AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,
|
|
23
|
+
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
24
|
+
.IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`,
|
|
25
|
+
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
26
|
+
.IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`,
|
|
27
|
+
[MsiEnvironmentVariableUrlMalformedErrorCodes
|
|
28
|
+
.MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`,
|
|
29
|
+
[networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.",
|
|
30
|
+
[unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.",
|
|
31
|
+
[unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.",
|
|
32
|
+
[unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.",
|
|
33
|
+
[unableToReadSecretFile]: "Unable to read the secret file.",
|
|
34
|
+
[userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",
|
|
35
|
+
[wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",
|
|
36
|
+
[wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
|
|
37
|
+
};
|
|
38
|
+
class ManagedIdentityError extends AuthError {
|
|
39
|
+
constructor(errorCode) {
|
|
40
|
+
super(errorCode, ManagedIdentityErrorMessages[errorCode]);
|
|
41
|
+
this.name = "ManagedIdentityError";
|
|
42
|
+
Object.setPrototypeOf(this, ManagedIdentityError.prototype);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function createManagedIdentityError(errorCode) {
|
|
46
|
+
return new ManagedIdentityError(errorCode);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export { ManagedIdentityError, ManagedIdentityErrorMessages, createManagedIdentityError };
|
|
@@ -1,32 +1,34 @@
|
|
|
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 Constants = require('../utils/Constants.cjs');
|
|
6
8
|
|
|
7
|
-
/*
|
|
8
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
* Licensed under the MIT License.
|
|
10
|
-
*/
|
|
11
|
-
const invalidFileExtension = "invalid_file_extension";
|
|
12
|
-
const invalidFilePath = "invalid_file_path";
|
|
13
|
-
const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
|
|
14
|
-
const invalidSecret = "invalid_secret";
|
|
15
|
-
const missingId = "missing_client_id";
|
|
16
|
-
const networkUnavailable = "network_unavailable";
|
|
17
|
-
const platformNotSupported = "platform_not_supported";
|
|
18
|
-
const unableToCreateAzureArc = "unable_to_create_azure_arc";
|
|
19
|
-
const unableToCreateCloudShell = "unable_to_create_cloud_shell";
|
|
20
|
-
const unableToCreateSource = "unable_to_create_source";
|
|
21
|
-
const unableToReadSecretFile = "unable_to_read_secret_file";
|
|
22
|
-
const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
|
|
23
|
-
const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
|
|
24
|
-
const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
|
|
25
|
-
const MsiEnvironmentVariableUrlMalformedErrorCodes = {
|
|
26
|
-
[Constants.ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
|
|
27
|
-
[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
|
|
28
|
-
[Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
|
|
29
|
-
[Constants.ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
|
|
9
|
+
/*
|
|
10
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
|
+
* Licensed under the MIT License.
|
|
12
|
+
*/
|
|
13
|
+
const invalidFileExtension = "invalid_file_extension";
|
|
14
|
+
const invalidFilePath = "invalid_file_path";
|
|
15
|
+
const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
|
|
16
|
+
const invalidSecret = "invalid_secret";
|
|
17
|
+
const missingId = "missing_client_id";
|
|
18
|
+
const networkUnavailable = "network_unavailable";
|
|
19
|
+
const platformNotSupported = "platform_not_supported";
|
|
20
|
+
const unableToCreateAzureArc = "unable_to_create_azure_arc";
|
|
21
|
+
const unableToCreateCloudShell = "unable_to_create_cloud_shell";
|
|
22
|
+
const unableToCreateSource = "unable_to_create_source";
|
|
23
|
+
const unableToReadSecretFile = "unable_to_read_secret_file";
|
|
24
|
+
const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
|
|
25
|
+
const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
|
|
26
|
+
const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
|
|
27
|
+
const MsiEnvironmentVariableUrlMalformedErrorCodes = {
|
|
28
|
+
[Constants.ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
|
|
29
|
+
[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
|
|
30
|
+
[Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
|
|
31
|
+
[Constants.ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
exports.MsiEnvironmentVariableUrlMalformedErrorCodes = MsiEnvironmentVariableUrlMalformedErrorCodes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagedIdentityErrorCodes.cjs","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"sourcesContent":[null],"names":["ManagedIdentityEnvironmentVariableNames"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ManagedIdentityErrorCodes.cjs","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"sourcesContent":[null],"names":["ManagedIdentityEnvironmentVariableNames"],"mappings":";;;;;;;;AAAA;;;AAGG;AAII,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,eAAe,GAAG,oBAAoB;AAC5C,MAAM,4BAA4B,GAAG,mCAAmC;AACxE,MAAM,aAAa,GAAG,iBAAiB;AACvC,MAAM,SAAS,GAAG,oBAAoB;AACtC,MAAM,kBAAkB,GAAG,sBAAsB;AACjD,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,sBAAsB,GAAG,6BAA6B;AAC5D,MAAM,wBAAwB,GAAG,+BAA+B;AAChE,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,sBAAsB,GAAG,6BAA6B;AAE5D,MAAM,iCAAiC,GAC1C,yCAAyC;AACtC,MAAM,4BAA4B,GAAG,kCAAkC;AACvE,MAAM,sCAAsC,GAC/C,6CAA6C;AAEpC,MAAA,4CAA4C,GAAG;AACxD,IAAA,CAACA,iDAAuC,CAAC,iCAAiC,GACtE,iDAAiD;AACrD,IAAA,CAACA,iDAAuC,CAAC,iBAAiB,GACtD,iCAAiC;AACrC,IAAA,CAACA,iDAAuC,CAAC,aAAa,GAClD,6BAA6B;AACjC,IAAA,CAACA,iDAAuC,CAAC,YAAY,GACjD,4BAA4B;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export declare const invalidFileExtension = "invalid_file_extension";
|
|
2
|
-
export declare const invalidFilePath = "invalid_file_path";
|
|
3
|
-
export declare const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
|
|
4
|
-
export declare const invalidSecret = "invalid_secret";
|
|
5
|
-
export declare const missingId = "missing_client_id";
|
|
6
|
-
export declare const networkUnavailable = "network_unavailable";
|
|
7
|
-
export declare const platformNotSupported = "platform_not_supported";
|
|
8
|
-
export declare const unableToCreateAzureArc = "unable_to_create_azure_arc";
|
|
9
|
-
export declare const unableToCreateCloudShell = "unable_to_create_cloud_shell";
|
|
10
|
-
export declare const unableToCreateSource = "unable_to_create_source";
|
|
11
|
-
export declare const unableToReadSecretFile = "unable_to_read_secret_file";
|
|
12
|
-
export declare const urlParseError = "url_parse_error";
|
|
13
|
-
export declare const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
|
|
14
|
-
export declare const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
|
|
15
|
-
export declare const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
|
|
16
|
-
export declare const MsiEnvironmentVariableUrlMalformedErrorCodes: {
|
|
17
|
-
readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "azure_pod_identity_authority_host_url_malformed";
|
|
18
|
-
readonly IDENTITY_ENDPOINT: "identity_endpoint_url_malformed";
|
|
19
|
-
readonly IMDS_ENDPOINT: "imds_endpoint_url_malformed";
|
|
20
|
-
readonly MSI_ENDPOINT: "msi_endpoint_url_malformed";
|
|
21
|
-
};
|
|
22
|
-
export type MsiEnvironmentVariableErrorCodes = (typeof MsiEnvironmentVariableUrlMalformedErrorCodes)[keyof typeof MsiEnvironmentVariableUrlMalformedErrorCodes];
|
|
1
|
+
export declare const invalidFileExtension = "invalid_file_extension";
|
|
2
|
+
export declare const invalidFilePath = "invalid_file_path";
|
|
3
|
+
export declare const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
|
|
4
|
+
export declare const invalidSecret = "invalid_secret";
|
|
5
|
+
export declare const missingId = "missing_client_id";
|
|
6
|
+
export declare const networkUnavailable = "network_unavailable";
|
|
7
|
+
export declare const platformNotSupported = "platform_not_supported";
|
|
8
|
+
export declare const unableToCreateAzureArc = "unable_to_create_azure_arc";
|
|
9
|
+
export declare const unableToCreateCloudShell = "unable_to_create_cloud_shell";
|
|
10
|
+
export declare const unableToCreateSource = "unable_to_create_source";
|
|
11
|
+
export declare const unableToReadSecretFile = "unable_to_read_secret_file";
|
|
12
|
+
export declare const urlParseError = "url_parse_error";
|
|
13
|
+
export declare const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
|
|
14
|
+
export declare const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
|
|
15
|
+
export declare const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
|
|
16
|
+
export declare const MsiEnvironmentVariableUrlMalformedErrorCodes: {
|
|
17
|
+
readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "azure_pod_identity_authority_host_url_malformed";
|
|
18
|
+
readonly IDENTITY_ENDPOINT: "identity_endpoint_url_malformed";
|
|
19
|
+
readonly IMDS_ENDPOINT: "imds_endpoint_url_malformed";
|
|
20
|
+
readonly MSI_ENDPOINT: "msi_endpoint_url_malformed";
|
|
21
|
+
};
|
|
22
|
+
export type MsiEnvironmentVariableErrorCodes = (typeof MsiEnvironmentVariableUrlMalformedErrorCodes)[keyof typeof MsiEnvironmentVariableUrlMalformedErrorCodes];
|
|
23
23
|
//# sourceMappingURL=ManagedIdentityErrorCodes.d.ts.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
|
|
4
4
|
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
-
* Licensed under the MIT License.
|
|
8
|
-
*/
|
|
9
|
-
const invalidFileExtension = "invalid_file_extension";
|
|
10
|
-
const invalidFilePath = "invalid_file_path";
|
|
11
|
-
const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
|
|
12
|
-
const invalidSecret = "invalid_secret";
|
|
13
|
-
const missingId = "missing_client_id";
|
|
14
|
-
const networkUnavailable = "network_unavailable";
|
|
15
|
-
const platformNotSupported = "platform_not_supported";
|
|
16
|
-
const unableToCreateAzureArc = "unable_to_create_azure_arc";
|
|
17
|
-
const unableToCreateCloudShell = "unable_to_create_cloud_shell";
|
|
18
|
-
const unableToCreateSource = "unable_to_create_source";
|
|
19
|
-
const unableToReadSecretFile = "unable_to_read_secret_file";
|
|
20
|
-
const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
|
|
21
|
-
const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
|
|
22
|
-
const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
|
|
23
|
-
const MsiEnvironmentVariableUrlMalformedErrorCodes = {
|
|
24
|
-
[ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
|
|
25
|
-
[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
|
|
26
|
-
[ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
|
|
27
|
-
[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
+
* Licensed under the MIT License.
|
|
8
|
+
*/
|
|
9
|
+
const invalidFileExtension = "invalid_file_extension";
|
|
10
|
+
const invalidFilePath = "invalid_file_path";
|
|
11
|
+
const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
|
|
12
|
+
const invalidSecret = "invalid_secret";
|
|
13
|
+
const missingId = "missing_client_id";
|
|
14
|
+
const networkUnavailable = "network_unavailable";
|
|
15
|
+
const platformNotSupported = "platform_not_supported";
|
|
16
|
+
const unableToCreateAzureArc = "unable_to_create_azure_arc";
|
|
17
|
+
const unableToCreateCloudShell = "unable_to_create_cloud_shell";
|
|
18
|
+
const unableToCreateSource = "unable_to_create_source";
|
|
19
|
+
const unableToReadSecretFile = "unable_to_read_secret_file";
|
|
20
|
+
const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
|
|
21
|
+
const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
|
|
22
|
+
const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
|
|
23
|
+
const MsiEnvironmentVariableUrlMalformedErrorCodes = {
|
|
24
|
+
[ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
|
|
25
|
+
[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
|
|
26
|
+
[ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
|
|
27
|
+
[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export { MsiEnvironmentVariableUrlMalformedErrorCodes, invalidFileExtension, invalidFilePath, invalidManagedIdentityIdType, invalidSecret, missingId, networkUnavailable, platformNotSupported, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat };
|
|
@@ -1,103 +1,105 @@
|
|
|
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
|
|
|
7
|
-
/*
|
|
8
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
* Licensed under the MIT License.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
|
|
13
|
-
*/
|
|
14
|
-
const NodeAuthErrorMessage = {
|
|
15
|
-
invalidLoopbackAddressType: {
|
|
16
|
-
code: "invalid_loopback_server_address_type",
|
|
17
|
-
desc: "Loopback server address is not type string. This is unexpected.",
|
|
18
|
-
},
|
|
19
|
-
unableToLoadRedirectUri: {
|
|
20
|
-
code: "unable_to_load_redirectUrl",
|
|
21
|
-
desc: "Loopback server callback was invoked without a url. This is unexpected.",
|
|
22
|
-
},
|
|
23
|
-
noAuthCodeInResponse: {
|
|
24
|
-
code: "no_auth_code_in_response",
|
|
25
|
-
desc: "No auth code found in the server response. Please check your network trace to determine what happened.",
|
|
26
|
-
},
|
|
27
|
-
noLoopbackServerExists: {
|
|
28
|
-
code: "no_loopback_server_exists",
|
|
29
|
-
desc: "No loopback server exists yet.",
|
|
30
|
-
},
|
|
31
|
-
loopbackServerAlreadyExists: {
|
|
32
|
-
code: "loopback_server_already_exists",
|
|
33
|
-
desc: "Loopback server already exists. Cannot create another.",
|
|
34
|
-
},
|
|
35
|
-
loopbackServerTimeout: {
|
|
36
|
-
code: "loopback_server_timeout",
|
|
37
|
-
desc: "Timed out waiting for auth code listener to be registered.",
|
|
38
|
-
},
|
|
39
|
-
stateNotFoundError: {
|
|
40
|
-
code: "state_not_found",
|
|
41
|
-
desc: "State not found. Please verify that the request originated from msal.",
|
|
42
|
-
},
|
|
43
|
-
thumbprintMissing: {
|
|
44
|
-
code: "thumbprint_missing_from_client_certificate",
|
|
45
|
-
desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.",
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
class NodeAuthError extends msalCommon.AuthError {
|
|
49
|
-
constructor(errorCode, errorMessage) {
|
|
50
|
-
super(errorCode, errorMessage);
|
|
51
|
-
this.name = "NodeAuthError";
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Creates an error thrown if loopback server address is of type string.
|
|
55
|
-
*/
|
|
56
|
-
static createInvalidLoopbackAddressTypeError() {
|
|
57
|
-
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Creates an error thrown if the loopback server is unable to get a url.
|
|
61
|
-
*/
|
|
62
|
-
static createUnableToLoadRedirectUrlError() {
|
|
63
|
-
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Creates an error thrown if the server response does not contain an auth code.
|
|
67
|
-
*/
|
|
68
|
-
static createNoAuthCodeInResponseError() {
|
|
69
|
-
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
73
|
-
*/
|
|
74
|
-
static createNoLoopbackServerExistsError() {
|
|
75
|
-
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
79
|
-
*/
|
|
80
|
-
static createLoopbackServerAlreadyExistsError() {
|
|
81
|
-
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
85
|
-
*/
|
|
86
|
-
static createLoopbackServerTimeoutError() {
|
|
87
|
-
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Creates an error thrown when the state is not present.
|
|
91
|
-
*/
|
|
92
|
-
static createStateNotFoundError() {
|
|
93
|
-
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
|
|
97
|
-
*/
|
|
98
|
-
static createThumbprintMissingError() {
|
|
99
|
-
return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc);
|
|
100
|
-
}
|
|
9
|
+
/*
|
|
10
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
|
+
* Licensed under the MIT License.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
|
|
15
|
+
*/
|
|
16
|
+
const NodeAuthErrorMessage = {
|
|
17
|
+
invalidLoopbackAddressType: {
|
|
18
|
+
code: "invalid_loopback_server_address_type",
|
|
19
|
+
desc: "Loopback server address is not type string. This is unexpected.",
|
|
20
|
+
},
|
|
21
|
+
unableToLoadRedirectUri: {
|
|
22
|
+
code: "unable_to_load_redirectUrl",
|
|
23
|
+
desc: "Loopback server callback was invoked without a url. This is unexpected.",
|
|
24
|
+
},
|
|
25
|
+
noAuthCodeInResponse: {
|
|
26
|
+
code: "no_auth_code_in_response",
|
|
27
|
+
desc: "No auth code found in the server response. Please check your network trace to determine what happened.",
|
|
28
|
+
},
|
|
29
|
+
noLoopbackServerExists: {
|
|
30
|
+
code: "no_loopback_server_exists",
|
|
31
|
+
desc: "No loopback server exists yet.",
|
|
32
|
+
},
|
|
33
|
+
loopbackServerAlreadyExists: {
|
|
34
|
+
code: "loopback_server_already_exists",
|
|
35
|
+
desc: "Loopback server already exists. Cannot create another.",
|
|
36
|
+
},
|
|
37
|
+
loopbackServerTimeout: {
|
|
38
|
+
code: "loopback_server_timeout",
|
|
39
|
+
desc: "Timed out waiting for auth code listener to be registered.",
|
|
40
|
+
},
|
|
41
|
+
stateNotFoundError: {
|
|
42
|
+
code: "state_not_found",
|
|
43
|
+
desc: "State not found. Please verify that the request originated from msal.",
|
|
44
|
+
},
|
|
45
|
+
thumbprintMissing: {
|
|
46
|
+
code: "thumbprint_missing_from_client_certificate",
|
|
47
|
+
desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.",
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
class NodeAuthError extends msalCommon.AuthError {
|
|
51
|
+
constructor(errorCode, errorMessage) {
|
|
52
|
+
super(errorCode, errorMessage);
|
|
53
|
+
this.name = "NodeAuthError";
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Creates an error thrown if loopback server address is of type string.
|
|
57
|
+
*/
|
|
58
|
+
static createInvalidLoopbackAddressTypeError() {
|
|
59
|
+
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Creates an error thrown if the loopback server is unable to get a url.
|
|
63
|
+
*/
|
|
64
|
+
static createUnableToLoadRedirectUrlError() {
|
|
65
|
+
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates an error thrown if the server response does not contain an auth code.
|
|
69
|
+
*/
|
|
70
|
+
static createNoAuthCodeInResponseError() {
|
|
71
|
+
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
75
|
+
*/
|
|
76
|
+
static createNoLoopbackServerExistsError() {
|
|
77
|
+
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
81
|
+
*/
|
|
82
|
+
static createLoopbackServerAlreadyExistsError() {
|
|
83
|
+
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
87
|
+
*/
|
|
88
|
+
static createLoopbackServerTimeoutError() {
|
|
89
|
+
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Creates an error thrown when the state is not present.
|
|
93
|
+
*/
|
|
94
|
+
static createStateNotFoundError() {
|
|
95
|
+
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
|
|
99
|
+
*/
|
|
100
|
+
static createThumbprintMissingError() {
|
|
101
|
+
return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc);
|
|
102
|
+
}
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
exports.NodeAuthError = NodeAuthError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeAuthError.cjs","sources":["../../src/error/NodeAuthError.ts"],"sourcesContent":[null],"names":["AuthError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeAuthError.cjs","sources":["../../src/error/NodeAuthError.ts"],"sourcesContent":[null],"names":["AuthError"],"mappings":"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"}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { AuthError } from "@azure/msal-common";
|
|
2
|
-
/**
|
|
3
|
-
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
|
|
4
|
-
*/
|
|
5
|
-
export declare const NodeAuthErrorMessage: {
|
|
6
|
-
invalidLoopbackAddressType: {
|
|
7
|
-
code: string;
|
|
8
|
-
desc: string;
|
|
9
|
-
};
|
|
10
|
-
unableToLoadRedirectUri: {
|
|
11
|
-
code: string;
|
|
12
|
-
desc: string;
|
|
13
|
-
};
|
|
14
|
-
noAuthCodeInResponse: {
|
|
15
|
-
code: string;
|
|
16
|
-
desc: string;
|
|
17
|
-
};
|
|
18
|
-
noLoopbackServerExists: {
|
|
19
|
-
code: string;
|
|
20
|
-
desc: string;
|
|
21
|
-
};
|
|
22
|
-
loopbackServerAlreadyExists: {
|
|
23
|
-
code: string;
|
|
24
|
-
desc: string;
|
|
25
|
-
};
|
|
26
|
-
loopbackServerTimeout: {
|
|
27
|
-
code: string;
|
|
28
|
-
desc: string;
|
|
29
|
-
};
|
|
30
|
-
stateNotFoundError: {
|
|
31
|
-
code: string;
|
|
32
|
-
desc: string;
|
|
33
|
-
};
|
|
34
|
-
thumbprintMissing: {
|
|
35
|
-
code: string;
|
|
36
|
-
desc: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export declare class NodeAuthError extends AuthError {
|
|
40
|
-
constructor(errorCode: string, errorMessage?: string);
|
|
41
|
-
/**
|
|
42
|
-
* Creates an error thrown if loopback server address is of type string.
|
|
43
|
-
*/
|
|
44
|
-
static createInvalidLoopbackAddressTypeError(): NodeAuthError;
|
|
45
|
-
/**
|
|
46
|
-
* Creates an error thrown if the loopback server is unable to get a url.
|
|
47
|
-
*/
|
|
48
|
-
static createUnableToLoadRedirectUrlError(): NodeAuthError;
|
|
49
|
-
/**
|
|
50
|
-
* Creates an error thrown if the server response does not contain an auth code.
|
|
51
|
-
*/
|
|
52
|
-
static createNoAuthCodeInResponseError(): NodeAuthError;
|
|
53
|
-
/**
|
|
54
|
-
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
55
|
-
*/
|
|
56
|
-
static createNoLoopbackServerExistsError(): NodeAuthError;
|
|
57
|
-
/**
|
|
58
|
-
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
59
|
-
*/
|
|
60
|
-
static createLoopbackServerAlreadyExistsError(): NodeAuthError;
|
|
61
|
-
/**
|
|
62
|
-
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
63
|
-
*/
|
|
64
|
-
static createLoopbackServerTimeoutError(): NodeAuthError;
|
|
65
|
-
/**
|
|
66
|
-
* Creates an error thrown when the state is not present.
|
|
67
|
-
*/
|
|
68
|
-
static createStateNotFoundError(): NodeAuthError;
|
|
69
|
-
/**
|
|
70
|
-
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
|
|
71
|
-
*/
|
|
72
|
-
static createThumbprintMissingError(): NodeAuthError;
|
|
73
|
-
}
|
|
1
|
+
import { AuthError } from "@azure/msal-common";
|
|
2
|
+
/**
|
|
3
|
+
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
|
|
4
|
+
*/
|
|
5
|
+
export declare const NodeAuthErrorMessage: {
|
|
6
|
+
invalidLoopbackAddressType: {
|
|
7
|
+
code: string;
|
|
8
|
+
desc: string;
|
|
9
|
+
};
|
|
10
|
+
unableToLoadRedirectUri: {
|
|
11
|
+
code: string;
|
|
12
|
+
desc: string;
|
|
13
|
+
};
|
|
14
|
+
noAuthCodeInResponse: {
|
|
15
|
+
code: string;
|
|
16
|
+
desc: string;
|
|
17
|
+
};
|
|
18
|
+
noLoopbackServerExists: {
|
|
19
|
+
code: string;
|
|
20
|
+
desc: string;
|
|
21
|
+
};
|
|
22
|
+
loopbackServerAlreadyExists: {
|
|
23
|
+
code: string;
|
|
24
|
+
desc: string;
|
|
25
|
+
};
|
|
26
|
+
loopbackServerTimeout: {
|
|
27
|
+
code: string;
|
|
28
|
+
desc: string;
|
|
29
|
+
};
|
|
30
|
+
stateNotFoundError: {
|
|
31
|
+
code: string;
|
|
32
|
+
desc: string;
|
|
33
|
+
};
|
|
34
|
+
thumbprintMissing: {
|
|
35
|
+
code: string;
|
|
36
|
+
desc: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare class NodeAuthError extends AuthError {
|
|
40
|
+
constructor(errorCode: string, errorMessage?: string);
|
|
41
|
+
/**
|
|
42
|
+
* Creates an error thrown if loopback server address is of type string.
|
|
43
|
+
*/
|
|
44
|
+
static createInvalidLoopbackAddressTypeError(): NodeAuthError;
|
|
45
|
+
/**
|
|
46
|
+
* Creates an error thrown if the loopback server is unable to get a url.
|
|
47
|
+
*/
|
|
48
|
+
static createUnableToLoadRedirectUrlError(): NodeAuthError;
|
|
49
|
+
/**
|
|
50
|
+
* Creates an error thrown if the server response does not contain an auth code.
|
|
51
|
+
*/
|
|
52
|
+
static createNoAuthCodeInResponseError(): NodeAuthError;
|
|
53
|
+
/**
|
|
54
|
+
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
55
|
+
*/
|
|
56
|
+
static createNoLoopbackServerExistsError(): NodeAuthError;
|
|
57
|
+
/**
|
|
58
|
+
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
59
|
+
*/
|
|
60
|
+
static createLoopbackServerAlreadyExistsError(): NodeAuthError;
|
|
61
|
+
/**
|
|
62
|
+
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
63
|
+
*/
|
|
64
|
+
static createLoopbackServerTimeoutError(): NodeAuthError;
|
|
65
|
+
/**
|
|
66
|
+
* Creates an error thrown when the state is not present.
|
|
67
|
+
*/
|
|
68
|
+
static createStateNotFoundError(): NodeAuthError;
|
|
69
|
+
/**
|
|
70
|
+
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
|
|
71
|
+
*/
|
|
72
|
+
static createThumbprintMissingError(): NodeAuthError;
|
|
73
|
+
}
|
|
74
74
|
//# sourceMappingURL=NodeAuthError.d.ts.map
|