Estructura inicial del proyecto

This commit is contained in:
2026-06-02 16:57:08 +00:00
commit 8b306b9afc
9864 changed files with 1435687 additions and 0 deletions

View File

@ -0,0 +1,16 @@
/*! @azure/msal-node v5.2.2 2026-05-19 */
'use strict';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const missingTenantIdError = "missing_tenant_id_error";
const userTimeoutReached = "user_timeout_reached";
const invalidAssertion = "invalid_assertion";
const invalidClientCredential = "invalid_client_credential";
const deviceCodePollingCancelled = "device_code_polling_cancelled";
const deviceCodeExpired = "device_code_expired";
const deviceCodeUnknownError = "device_code_unknown_error";
export { deviceCodeExpired, deviceCodePollingCancelled, deviceCodeUnknownError, invalidAssertion, invalidClientCredential, missingTenantIdError, userTimeoutReached };
//# sourceMappingURL=ClientAuthErrorCodes.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ClientAuthErrorCodes.mjs","sources":["../../src/error/ClientAuthErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,gBAAgB,GAAG,oBAAoB;AAC7C,MAAM,uBAAuB,GAAG,4BAA4B;AAC5D,MAAM,0BAA0B,GAAG,gCAAgC;AACnE,MAAM,iBAAiB,GAAG,sBAAsB;AAChD,MAAM,sBAAsB,GAAG;;;;"}

View File

@ -0,0 +1,50 @@
/*! @azure/msal-node v5.2.2 2026-05-19 */
'use strict';
import { AuthError } from '@azure/msal-common/node';
import { wwwAuthenticateHeaderUnsupportedFormat, wwwAuthenticateHeaderMissing, userAssignedNotAvailableAtRuntime, unableToReadSecretFile, unableToCreateSource, unableToCreateCloudShell, unableToCreateAzureArc, networkUnavailable, MsiEnvironmentVariableUrlMalformedErrorCodes, missingId, platformNotSupported, invalidSecret, invalidManagedIdentityIdType, invalidFilePath, invalidFileExtension } from './ManagedIdentityErrorCodes.mjs';
import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
*/
const ManagedIdentityErrorMessages = {
[invalidFileExtension]: "The file path in the WWW-Authenticate header does not contain a .key file.",
[invalidFilePath]: "The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",
[invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.",
[invalidSecret]: "The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",
[platformNotSupported]: "The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",
[missingId]: "A ManagedIdentityId id was not provided.",
[MsiEnvironmentVariableUrlMalformedErrorCodes
.AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,
[MsiEnvironmentVariableUrlMalformedErrorCodes
.IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`,
[MsiEnvironmentVariableUrlMalformedErrorCodes
.IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`,
[MsiEnvironmentVariableUrlMalformedErrorCodes
.MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`,
[networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.",
[unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.",
[unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.",
[unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.",
[unableToReadSecretFile]: "Unable to read the secret file.",
[userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",
[wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",
[wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
};
class ManagedIdentityError extends AuthError {
constructor(errorCode) {
super(errorCode, ManagedIdentityErrorMessages[errorCode]);
this.name = "ManagedIdentityError";
Object.setPrototypeOf(this, ManagedIdentityError.prototype);
}
}
function createManagedIdentityError(errorCode) {
return new ManagedIdentityError(errorCode);
}
export { ManagedIdentityError, ManagedIdentityErrorMessages, createManagedIdentityError };
//# sourceMappingURL=ManagedIdentityError.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ManagedIdentityError.mjs","sources":["../../src/error/ManagedIdentityError.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityErrorCodes.invalidSecret","ManagedIdentityErrorCodes.platformNotSupported","ManagedIdentityErrorCodes.missingId","ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes","ManagedIdentityErrorCodes.networkUnavailable","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.unableToCreateCloudShell","ManagedIdentityErrorCodes.unableToCreateSource","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat"],"mappings":";;;;;;AAAA;;;AAGG;AAOH;;AAEG;AACU,MAAA,4BAA4B,GAAG;AACxC,IAAA,CAACA,oBAA8C,GAC3C,4EAA4E;AAChF,IAAA,CAACC,eAAyC,GACtC,yFAAyF;AAC7F,IAAA,CAACC,4BAAsD,GACnD,mDAAmD;AACvD,IAAA,CAACC,aAAuC,GACpC,oGAAoG;AACxG,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,CAAC,CAAC;AAC/C;;;;"}

View File

@ -0,0 +1,31 @@
/*! @azure/msal-node v5.2.2 2026-05-19 */
'use strict';
import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const invalidFileExtension = "invalid_file_extension";
const invalidFilePath = "invalid_file_path";
const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
const invalidSecret = "invalid_secret";
const missingId = "missing_client_id";
const networkUnavailable = "network_unavailable";
const platformNotSupported = "platform_not_supported";
const unableToCreateAzureArc = "unable_to_create_azure_arc";
const unableToCreateCloudShell = "unable_to_create_cloud_shell";
const unableToCreateSource = "unable_to_create_source";
const unableToReadSecretFile = "unable_to_read_secret_file";
const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
const MsiEnvironmentVariableUrlMalformedErrorCodes = {
[ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
[ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
};
export { MsiEnvironmentVariableUrlMalformedErrorCodes, invalidFileExtension, invalidFilePath, invalidManagedIdentityIdType, invalidSecret, missingId, networkUnavailable, platformNotSupported, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat };
//# sourceMappingURL=ManagedIdentityErrorCodes.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ManagedIdentityErrorCodes.mjs","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"sourcesContent":[null],"names":[],"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,CAAC,uCAAuC,CAAC,iCAAiC,GACtE,iDAAiD;AACrD,IAAA,CAAC,uCAAuC,CAAC,iBAAiB,GACtD,iCAAiC;AACrC,IAAA,CAAC,uCAAuC,CAAC,aAAa,GAClD,6BAA6B;AACjC,IAAA,CAAC,uCAAuC,CAAC,YAAY,GACjD,4BAA4B;;;;;"}

View File

@ -0,0 +1,112 @@
/*! @azure/msal-node v5.2.2 2026-05-19 */
'use strict';
import { AuthError } from '@azure/msal-common/node';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
*/
const NodeAuthErrorMessage = {
invalidLoopbackAddressType: {
code: "invalid_loopback_server_address_type",
desc: "Loopback server address is not type string. This is unexpected.",
},
unableToLoadRedirectUri: {
code: "unable_to_load_redirectUrl",
desc: "Loopback server callback was invoked without a url. This is unexpected.",
},
noAuthCodeInResponse: {
code: "no_auth_code_in_response",
desc: "No auth code found in the server response. Please check your network trace to determine what happened.",
},
noLoopbackServerExists: {
code: "no_loopback_server_exists",
desc: "No loopback server exists yet.",
},
loopbackServerAlreadyExists: {
code: "loopback_server_already_exists",
desc: "Loopback server already exists. Cannot create another.",
},
loopbackServerTimeout: {
code: "loopback_server_timeout",
desc: "Timed out waiting for auth code listener to be registered.",
},
stateNotFoundError: {
code: "state_not_found",
desc: "State not found. Please verify that the request originated from msal.",
},
thumbprintMissing: {
code: "thumbprint_missing_from_client_certificate",
desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.",
},
redirectUriNotSupported: {
code: "redirect_uri_not_supported",
desc: "RedirectUri is not supported in this scenario. Please remove redirectUri from the request.",
},
};
class NodeAuthError extends AuthError {
constructor(errorCode, errorMessage) {
super(errorCode, errorMessage);
this.name = "NodeAuthError";
}
/**
* Creates an error thrown if loopback server address is of type string.
*/
static createInvalidLoopbackAddressTypeError() {
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`);
}
/**
* Creates an error thrown if the loopback server is unable to get a url.
*/
static createUnableToLoadRedirectUrlError() {
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`);
}
/**
* Creates an error thrown if the server response does not contain an auth code.
*/
static createNoAuthCodeInResponseError() {
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`);
}
/**
* Creates an error thrown if the loopback server has not been spun up yet.
*/
static createNoLoopbackServerExistsError() {
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`);
}
/**
* Creates an error thrown if a loopback server already exists when attempting to create another one.
*/
static createLoopbackServerAlreadyExistsError() {
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`);
}
/**
* Creates an error thrown if the loopback server times out registering the auth code listener.
*/
static createLoopbackServerTimeoutError() {
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
}
/**
* Creates an error thrown when the state is not present.
*/
static createStateNotFoundError() {
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
}
/**
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
*/
static createThumbprintMissingError() {
return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc);
}
/**
* Creates an error thrown when redirectUri is provided in an unsupported scenario
*/
static createRedirectUriNotSupportedError() {
return new NodeAuthError(NodeAuthErrorMessage.redirectUriNotSupported.code, NodeAuthErrorMessage.redirectUriNotSupported.desc);
}
}
export { NodeAuthError, NodeAuthErrorMessage };
//# sourceMappingURL=NodeAuthError.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"NodeAuthError.mjs","sources":["../../src/error/NodeAuthError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,MAAA,oBAAoB,GAAG;AAChC,IAAA,0BAA0B,EAAE;AACxB,QAAA,IAAI,EAAE,sCAAsC;AAC5C,QAAA,IAAI,EAAE,iEAAiE;AAC1E,KAAA;AACD,IAAA,uBAAuB,EAAE;AACrB,QAAA,IAAI,EAAE,4BAA4B;AAClC,QAAA,IAAI,EAAE,yEAAyE;AAClF,KAAA;AACD,IAAA,oBAAoB,EAAE;AAClB,QAAA,IAAI,EAAE,0BAA0B;AAChC,QAAA,IAAI,EAAE,wGAAwG;AACjH,KAAA;AACD,IAAA,sBAAsB,EAAE;AACpB,QAAA,IAAI,EAAE,2BAA2B;AACjC,QAAA,IAAI,EAAE,gCAAgC;AACzC,KAAA;AACD,IAAA,2BAA2B,EAAE;AACzB,QAAA,I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