Estructura inicial del proyecto
This commit is contained in:
83
backend/node_modules/@azure/msal-browser/dist/request/RequestHelpers.mjs
generated
vendored
Normal file
83
backend/node_modules/@azure/msal-browser/dist/request/RequestHelpers.mjs
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
/*! @azure/msal-browser v5.11.0 2026-05-19 */
|
||||
'use strict';
|
||||
import { invokeAsync, ProtocolMode, Constants, createClientConfigurationError, ClientConfigurationErrorCodes } from '@azure/msal-common/browser';
|
||||
import { InitializeBaseRequest } from '../telemetry/BrowserPerformanceEvents.mjs';
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* Initializer function for all request APIs
|
||||
* @param request
|
||||
* @param config
|
||||
* @param performanceClient
|
||||
* @param logger
|
||||
* @param correlationId
|
||||
*/
|
||||
async function initializeBaseRequest(request, config, performanceClient, logger, correlationId) {
|
||||
const authority = request.authority || config.auth.authority;
|
||||
const scopes = [...((request && request.scopes) || [])];
|
||||
const validatedRequest = {
|
||||
...request,
|
||||
correlationId: request.correlationId,
|
||||
authority,
|
||||
scopes,
|
||||
};
|
||||
// Set authenticationScheme to BEARER if not explicitly set in the request
|
||||
if (!validatedRequest.authenticationScheme) {
|
||||
validatedRequest.authenticationScheme =
|
||||
Constants.AuthenticationScheme.BEARER;
|
||||
logger.verbose("1l4fwv", correlationId);
|
||||
}
|
||||
else {
|
||||
if (validatedRequest.authenticationScheme ===
|
||||
Constants.AuthenticationScheme.SSH) {
|
||||
if (!request.sshJwk) {
|
||||
throw createClientConfigurationError(ClientConfigurationErrorCodes.missingSshJwk);
|
||||
}
|
||||
if (!request.sshKid) {
|
||||
throw createClientConfigurationError(ClientConfigurationErrorCodes.missingSshKid);
|
||||
}
|
||||
}
|
||||
logger.verbose("1ecmns", correlationId);
|
||||
}
|
||||
return validatedRequest;
|
||||
}
|
||||
async function initializeSilentRequest(request, account, config, performanceClient, logger) {
|
||||
const baseRequest = await invokeAsync(initializeBaseRequest, InitializeBaseRequest, logger, performanceClient, request.correlationId)(request, config, performanceClient, logger, request.correlationId);
|
||||
return {
|
||||
...request,
|
||||
...baseRequest,
|
||||
account: account,
|
||||
forceRefresh: request.forceRefresh || false,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Validates that the combination of request method, protocol mode and authorize body parameters is correct.
|
||||
* Returns the validated or defaulted HTTP method or throws if the configured combination is invalid.
|
||||
* @param interactionRequest
|
||||
* @param protocolMode
|
||||
* @returns
|
||||
*/
|
||||
function validateRequestMethod(interactionRequest, protocolMode) {
|
||||
let httpMethod;
|
||||
const requestMethod = interactionRequest.httpMethod;
|
||||
if (protocolMode === ProtocolMode.EAR) {
|
||||
// Validate that method can only be POST when protocol mode is EAR
|
||||
if (requestMethod && requestMethod !== Constants.HttpMethod.POST) {
|
||||
throw createClientConfigurationError(ClientConfigurationErrorCodes.invalidRequestMethodForEAR);
|
||||
}
|
||||
else {
|
||||
httpMethod = Constants.HttpMethod.POST;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// For non-EAR protocol modes, default to GET if httpMethod is not set
|
||||
httpMethod = requestMethod || Constants.HttpMethod.GET;
|
||||
}
|
||||
return httpMethod;
|
||||
}
|
||||
|
||||
export { initializeBaseRequest, initializeSilentRequest, validateRequestMethod };
|
||||
//# sourceMappingURL=RequestHelpers.mjs.map
|
||||
1
backend/node_modules/@azure/msal-browser/dist/request/RequestHelpers.mjs.map
generated
vendored
Normal file
1
backend/node_modules/@azure/msal-browser/dist/request/RequestHelpers.mjs.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"RequestHelpers.mjs","sources":["../../src/request/RequestHelpers.ts"],"sourcesContent":[null],"names":["BrowserPerformanceEvents.InitializeBaseRequest"],"mappings":";;;;;AAAA;;;AAGG;AAoBH;;;;;;;AAOG;AACI,eAAe,qBAAqB,CACvC,OAA6D,EAC7D,MAA4B,EAC5B,iBAAqC,EACrC,MAAc,EACd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