Commit iniziale

This commit is contained in:
Paolo A
2025-02-18 22:59:07 +00:00
commit 4bbf35cefb
6879 changed files with 623784 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import * as AuthErrorCodes from "./AuthErrorCodes.js";
export { AuthErrorCodes };
export declare const AuthErrorMessages: {
unexpected_error: string;
post_request_failed: string;
};
/**
* AuthErrorMessage class containing string constants used by error codes and messages.
* @deprecated Use AuthErrorCodes instead
*/
export declare const AuthErrorMessage: {
unexpectedError: {
code: string;
desc: string;
};
postRequestFailed: {
code: string;
desc: string;
};
};
/**
* General error class thrown by the MSAL.js library.
*/
export declare class AuthError extends Error {
/**
* Short string denoting error
*/
errorCode: string;
/**
* Detailed description of error
*/
errorMessage: string;
/**
* Describes the subclass of an error
*/
subError: string;
/**
* CorrelationId associated with the error
*/
correlationId: string;
constructor(errorCode?: string, errorMessage?: string, suberror?: string);
setCorrelationId(correlationId: string): void;
}
export declare function createAuthError(code: string, additionalMessage?: string): AuthError;
//# sourceMappingURL=AuthError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AuthError.d.ts","sourceRoot":"","sources":["../../src/error/AuthError.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,eAAO,MAAM,iBAAiB;;;CAI7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;CAS5B,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,SAAS,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAaxE,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAGhD;AAED,wBAAgB,eAAe,CAC3B,IAAI,EAAE,MAAM,EACZ,iBAAiB,CAAC,EAAE,MAAM,GAC3B,SAAS,CAOX"}

View File

@@ -0,0 +1,56 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { Constants } from '../utils/Constants.mjs';
import { unexpectedError, postRequestFailed } from './AuthErrorCodes.mjs';
import * as AuthErrorCodes from './AuthErrorCodes.mjs';
export { AuthErrorCodes };
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const AuthErrorMessages = {
[unexpectedError]: "Unexpected error in authentication.",
[postRequestFailed]: "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.",
};
/**
* AuthErrorMessage class containing string constants used by error codes and messages.
* @deprecated Use AuthErrorCodes instead
*/
const AuthErrorMessage = {
unexpectedError: {
code: unexpectedError,
desc: AuthErrorMessages[unexpectedError],
},
postRequestFailed: {
code: postRequestFailed,
desc: AuthErrorMessages[postRequestFailed],
},
};
/**
* General error class thrown by the MSAL.js library.
*/
class AuthError extends Error {
constructor(errorCode, errorMessage, suberror) {
const errorString = errorMessage
? `${errorCode}: ${errorMessage}`
: errorCode;
super(errorString);
Object.setPrototypeOf(this, AuthError.prototype);
this.errorCode = errorCode || Constants.EMPTY_STRING;
this.errorMessage = errorMessage || Constants.EMPTY_STRING;
this.subError = suberror || Constants.EMPTY_STRING;
this.name = "AuthError";
}
setCorrelationId(correlationId) {
this.correlationId = correlationId;
}
}
function createAuthError(code, additionalMessage) {
return new AuthError(code, additionalMessage
? `${AuthErrorMessages[code]} ${additionalMessage}`
: AuthErrorMessages[code]);
}
export { AuthError, AuthErrorMessage, AuthErrorMessages, createAuthError };
//# sourceMappingURL=AuthError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AuthError.mjs","sources":["../../src/error/AuthError.ts"],"sourcesContent":[null],"names":["AuthErrorCodes.unexpect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AS,CAChB,IAAI,EACJ,iBAAiB;UACX,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAA,CAAA,EAAI,iBAAiB,CAAE,CAAA;AACnD,UAAE,iBAAiB,CAAC,IAAI,CAAC,CAChC,CAAC;AACN;;;;"}

View File

@@ -0,0 +1,6 @@
/**
* AuthErrorMessage class containing string constants used by error codes and messages.
*/
export declare const unexpectedError = "unexpected_error";
export declare const postRequestFailed = "post_request_failed";
//# sourceMappingURL=AuthErrorCodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AuthErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/AuthErrorCodes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"}

View File

@@ -0,0 +1,14 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* AuthErrorMessage class containing string constants used by error codes and messages.
*/
const unexpectedError = "unexpected_error";
const postRequestFailed = "post_request_failed";
export { postRequestFailed, unexpectedError };
//# sourceMappingURL=AuthErrorCodes.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AuthErrorCodes.mjs","sources":["../../src/error/AuthErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;AACI,MAAM,eAAe,GAAG,mBAAmB;AAC3C,MAAM,iBAAiB,GAAG;;;;"}

View File

@@ -0,0 +1,21 @@
import * as CacheErrorCodes from "./CacheErrorCodes.js";
export { CacheErrorCodes };
export declare const CacheErrorMessages: {
cache_quota_exceeded: string;
cache_error_unknown: string;
};
/**
* Error thrown when there is an error with the cache
*/
export declare class CacheError extends Error {
/**
* Short string denoting error
*/
errorCode: string;
/**
* Detailed description of error
*/
errorMessage: string;
constructor(errorCode: string, errorMessage?: string);
}
//# sourceMappingURL=CacheError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CacheError.d.ts","sourceRoot":"","sources":["../../src/error/CacheError.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,kBAAkB;;;CAK9B,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;gBAET,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAcvD"}

View File

@@ -0,0 +1,33 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { cacheUnknownErrorCode, cacheQuotaExceededErrorCode } from './CacheErrorCodes.mjs';
import * as CacheErrorCodes from './CacheErrorCodes.mjs';
export { CacheErrorCodes };
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const CacheErrorMessages = {
[cacheQuotaExceededErrorCode]: "Exceeded cache storage capacity.",
[cacheUnknownErrorCode]: "Unexpected error occurred when using cache storage.",
};
/**
* Error thrown when there is an error with the cache
*/
class CacheError extends Error {
constructor(errorCode, errorMessage) {
const message = errorMessage ||
(CacheErrorMessages[errorCode]
? CacheErrorMessages[errorCode]
: CacheErrorMessages[cacheUnknownErrorCode]);
super(`${errorCode}: ${message}`);
Object.setPrototypeOf(this, CacheError.prototype);
this.name = "CacheError";
this.errorCode = errorCode;
this.errorMessage = message;
}
}
export { CacheError, CacheErrorMessages };
//# sourceMappingURL=CacheError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CacheError.mjs","sources":["../../src/error/CacheError.ts"],"sourcesContent":[null],"names":["CacheErrorCodes.cacheQuotaExceededErrorCode","CacheErrorCodes.cacheUnknownErrorCode"],"mappings":";;;;;;AAAA;;;AAGG;AAKU,MAAA,kBAAkB,GAAG;AAC9B,IAAA,CAACA,2BAA2C,GACxC,kCAAkC;AACtC,IAAA,CAACC,qBAAqC,GAClC,qDAAqD;EAC3D;AAEF;;AAEG;AACG,MAAO,UAAW,SAAQ,KAAK,CAAA;IAWjC,WAAY,CAAA,SAAiB,EAAE,YAAqB,EAAA;QAChD,MAAM,OAAO,GACT,YAAY;aACX,kBAAkB,CAAC,SAAS,CAAC;AAC1B,kBAAE,kBAAkB,CAAC,SAAS,CAAC;kBAC7B,kBAAkB,CAACA,qBAAqC,CAAC,CAAC,CAAC;AAErE,QAAA,KAAK,CAAC,CAAG,EAAA,SAAS,KAAK,OAAO,CAAA,CAAE,CAAC,CAAC;QAClC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;AAElD,QAAA,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;AAC3B,QAAA,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;KAC/B;AACJ;;;;"}

View File

@@ -0,0 +1,3 @@
export declare const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
export declare const cacheUnknownErrorCode = "cache_error_unknown";
//# sourceMappingURL=CacheErrorCodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CacheErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/CacheErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAClE,eAAO,MAAM,qBAAqB,wBAAwB,CAAC"}

View File

@@ -0,0 +1,11 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
const cacheUnknownErrorCode = "cache_error_unknown";
export { cacheQuotaExceededErrorCode, cacheUnknownErrorCode };
//# sourceMappingURL=CacheErrorCodes.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CacheErrorCodes.mjs","sources":["../../src/error/CacheErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,2BAA2B,GAAG,uBAAuB;AAC3D,MAAM,qBAAqB,GAAG;;;;"}

View File

@@ -0,0 +1,238 @@
import { AuthError } from "./AuthError.js";
import * as ClientAuthErrorCodes from "./ClientAuthErrorCodes.js";
export { ClientAuthErrorCodes };
/**
* ClientAuthErrorMessage class containing string constants used by error codes and messages.
*/
export declare const ClientAuthErrorMessages: {
client_info_decoding_error: string;
client_info_empty_error: string;
token_parsing_error: string;
null_or_empty_token: string;
endpoints_resolution_error: string;
network_error: string;
openid_config_error: string;
hash_not_deserialized: string;
invalid_state: string;
state_mismatch: string;
state_not_found: string;
nonce_mismatch: string;
auth_time_not_found: string;
max_age_transpired: string;
multiple_matching_tokens: string;
multiple_matching_accounts: string;
multiple_matching_appMetadata: string;
request_cannot_be_made: string;
cannot_remove_empty_scope: string;
cannot_append_scopeset: string;
empty_input_scopeset: string;
device_code_polling_cancelled: string;
device_code_expired: string;
device_code_unknown_error: string;
no_account_in_silent_request: string;
invalid_cache_record: string;
invalid_cache_environment: string;
no_account_found: string;
no_crypto_object: string;
unexpected_credential_type: string;
invalid_assertion: string;
invalid_client_credential: string;
token_refresh_required: string;
user_timeout_reached: string;
token_claims_cnf_required_for_signedjwt: string;
authorization_code_missing_from_server_response: string;
binding_key_not_removed: string;
end_session_endpoint_not_supported: string;
key_id_missing: string;
no_network_connectivity: string;
user_canceled: string;
missing_tenant_id_error: string;
method_not_implemented: string;
nested_app_auth_bridge_disabled: string;
};
/**
* String constants used by error codes and messages.
* @deprecated Use ClientAuthErrorCodes instead
*/
export declare const ClientAuthErrorMessage: {
clientInfoDecodingError: {
code: string;
desc: string;
};
clientInfoEmptyError: {
code: string;
desc: string;
};
tokenParsingError: {
code: string;
desc: string;
};
nullOrEmptyToken: {
code: string;
desc: string;
};
endpointResolutionError: {
code: string;
desc: string;
};
networkError: {
code: string;
desc: string;
};
unableToGetOpenidConfigError: {
code: string;
desc: string;
};
hashNotDeserialized: {
code: string;
desc: string;
};
invalidStateError: {
code: string;
desc: string;
};
stateMismatchError: {
code: string;
desc: string;
};
stateNotFoundError: {
code: string;
desc: string;
};
nonceMismatchError: {
code: string;
desc: string;
};
authTimeNotFoundError: {
code: string;
desc: string;
};
maxAgeTranspired: {
code: string;
desc: string;
};
multipleMatchingTokens: {
code: string;
desc: string;
};
multipleMatchingAccounts: {
code: string;
desc: string;
};
multipleMatchingAppMetadata: {
code: string;
desc: string;
};
tokenRequestCannotBeMade: {
code: string;
desc: string;
};
removeEmptyScopeError: {
code: string;
desc: string;
};
appendScopeSetError: {
code: string;
desc: string;
};
emptyInputScopeSetError: {
code: string;
desc: string;
};
DeviceCodePollingCancelled: {
code: string;
desc: string;
};
DeviceCodeExpired: {
code: string;
desc: string;
};
DeviceCodeUnknownError: {
code: string;
desc: string;
};
NoAccountInSilentRequest: {
code: string;
desc: string;
};
invalidCacheRecord: {
code: string;
desc: string;
};
invalidCacheEnvironment: {
code: string;
desc: string;
};
noAccountFound: {
code: string;
desc: string;
};
noCryptoObj: {
code: string;
desc: string;
};
unexpectedCredentialType: {
code: string;
desc: string;
};
invalidAssertion: {
code: string;
desc: string;
};
invalidClientCredential: {
code: string;
desc: string;
};
tokenRefreshRequired: {
code: string;
desc: string;
};
userTimeoutReached: {
code: string;
desc: string;
};
tokenClaimsRequired: {
code: string;
desc: string;
};
noAuthorizationCodeFromServer: {
code: string;
desc: string;
};
bindingKeyNotRemovedError: {
code: string;
desc: string;
};
logoutNotSupported: {
code: string;
desc: string;
};
keyIdMissing: {
code: string;
desc: string;
};
noNetworkConnectivity: {
code: string;
desc: string;
};
userCanceledError: {
code: string;
desc: string;
};
missingTenantIdError: {
code: string;
desc: string;
};
nestedAppAuthBridgeDisabled: {
code: string;
desc: string;
};
};
/**
* Error thrown when there is an error in the client code running on the browser.
*/
export declare class ClientAuthError extends AuthError {
constructor(errorCode: string, additionalMessage?: string);
}
export declare function createClientAuthError(errorCode: string, additionalMessage?: string): ClientAuthError;
//# sourceMappingURL=ClientAuthError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientAuthError.d.ts","sourceRoot":"","sources":["../../src/error/ClientAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;GAEG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyNlC,CAAC;AAEF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,SAAS,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM;CAW5D;AAED,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe,CAEjB"}

View File

@@ -0,0 +1,259 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { AuthError } from './AuthError.mjs';
import { clientInfoDecodingError, clientInfoEmptyError, tokenParsingError, nullOrEmptyToken, endpointResolutionError, networkError, openIdConfigError, hashNotDeserialized, invalidState, stateMismatch, stateNotFound, nonceMismatch, authTimeNotFound, maxAgeTranspired, multipleMatchingTokens, multipleMatchingAccounts, multipleMatchingAppMetadata, requestCannotBeMade, cannotRemoveEmptyScope, cannotAppendScopeSet, emptyInputScopeSet, deviceCodePollingCancelled, deviceCodeExpired, deviceCodeUnknownError, noAccountInSilentRequest, invalidCacheRecord, invalidCacheEnvironment, noAccountFound, noCryptoObject, unexpectedCredentialType, invalidAssertion, invalidClientCredential, tokenRefreshRequired, userTimeoutReached, tokenClaimsCnfRequiredForSignedJwt, authorizationCodeMissingFromServerResponse, bindingKeyNotRemoved, endSessionEndpointNotSupported, keyIdMissing, noNetworkConnectivity, userCanceled, missingTenantIdError, nestedAppAuthBridgeDisabled, methodNotImplemented } from './ClientAuthErrorCodes.mjs';
import * as ClientAuthErrorCodes from './ClientAuthErrorCodes.mjs';
export { ClientAuthErrorCodes };
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* ClientAuthErrorMessage class containing string constants used by error codes and messages.
*/
const ClientAuthErrorMessages = {
[clientInfoDecodingError]: "The client info could not be parsed/decoded correctly",
[clientInfoEmptyError]: "The client info was empty",
[tokenParsingError]: "Token cannot be parsed",
[nullOrEmptyToken]: "The token is null or empty",
[endpointResolutionError]: "Endpoints cannot be resolved",
[networkError]: "Network request failed",
[openIdConfigError]: "Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",
[hashNotDeserialized]: "The hash parameters could not be deserialized",
[invalidState]: "State was not the expected format",
[stateMismatch]: "State mismatch error",
[stateNotFound]: "State not found",
[nonceMismatch]: "Nonce mismatch error",
[authTimeNotFound]: "Max Age was requested and the ID token is missing the auth_time variable." +
" auth_time is an optional claim and is not enabled by default - it must be enabled." +
" See https://aka.ms/msaljs/optional-claims for more information.",
[maxAgeTranspired]: "Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",
[multipleMatchingTokens]: "The cache contains multiple tokens satisfying the requirements. " +
"Call AcquireToken again providing more requirements such as authority or account.",
[multipleMatchingAccounts]: "The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",
[multipleMatchingAppMetadata]: "The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",
[requestCannotBeMade]: "Token request cannot be made without authorization code or refresh token.",
[cannotRemoveEmptyScope]: "Cannot remove null or empty scope from ScopeSet",
[cannotAppendScopeSet]: "Cannot append ScopeSet",
[emptyInputScopeSet]: "Empty input ScopeSet cannot be processed",
[deviceCodePollingCancelled]: "Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",
[deviceCodeExpired]: "Device code is expired.",
[deviceCodeUnknownError]: "Device code stopped polling for unknown reasons.",
[noAccountInSilentRequest]: "Please pass an account object, silent flow is not supported without account information",
[invalidCacheRecord]: "Cache record object was null or undefined.",
[invalidCacheEnvironment]: "Invalid environment when attempting to create cache entry",
[noAccountFound]: "No account found in cache for given key.",
[noCryptoObject]: "No crypto object detected.",
[unexpectedCredentialType]: "Unexpected credential type.",
[invalidAssertion]: "Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",
[invalidClientCredential]: "Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",
[tokenRefreshRequired]: "Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",
[userTimeoutReached]: "User defined timeout for device code polling reached",
[tokenClaimsCnfRequiredForSignedJwt]: "Cannot generate a POP jwt if the token_claims are not populated",
[authorizationCodeMissingFromServerResponse]: "Server response does not contain an authorization code to proceed",
[bindingKeyNotRemoved]: "Could not remove the credential's binding key from storage.",
[endSessionEndpointNotSupported]: "The provided authority does not support logout",
[keyIdMissing]: "A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",
[noNetworkConnectivity]: "No network connectivity. Check your internet connection.",
[userCanceled]: "User cancelled the flow.",
[missingTenantIdError]: "A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",
[methodNotImplemented]: "This method has not been implemented",
[nestedAppAuthBridgeDisabled]: "The nested app auth bridge is disabled",
};
/**
* String constants used by error codes and messages.
* @deprecated Use ClientAuthErrorCodes instead
*/
const ClientAuthErrorMessage = {
clientInfoDecodingError: {
code: clientInfoDecodingError,
desc: ClientAuthErrorMessages[clientInfoDecodingError],
},
clientInfoEmptyError: {
code: clientInfoEmptyError,
desc: ClientAuthErrorMessages[clientInfoEmptyError],
},
tokenParsingError: {
code: tokenParsingError,
desc: ClientAuthErrorMessages[tokenParsingError],
},
nullOrEmptyToken: {
code: nullOrEmptyToken,
desc: ClientAuthErrorMessages[nullOrEmptyToken],
},
endpointResolutionError: {
code: endpointResolutionError,
desc: ClientAuthErrorMessages[endpointResolutionError],
},
networkError: {
code: networkError,
desc: ClientAuthErrorMessages[networkError],
},
unableToGetOpenidConfigError: {
code: openIdConfigError,
desc: ClientAuthErrorMessages[openIdConfigError],
},
hashNotDeserialized: {
code: hashNotDeserialized,
desc: ClientAuthErrorMessages[hashNotDeserialized],
},
invalidStateError: {
code: invalidState,
desc: ClientAuthErrorMessages[invalidState],
},
stateMismatchError: {
code: stateMismatch,
desc: ClientAuthErrorMessages[stateMismatch],
},
stateNotFoundError: {
code: stateNotFound,
desc: ClientAuthErrorMessages[stateNotFound],
},
nonceMismatchError: {
code: nonceMismatch,
desc: ClientAuthErrorMessages[nonceMismatch],
},
authTimeNotFoundError: {
code: authTimeNotFound,
desc: ClientAuthErrorMessages[authTimeNotFound],
},
maxAgeTranspired: {
code: maxAgeTranspired,
desc: ClientAuthErrorMessages[maxAgeTranspired],
},
multipleMatchingTokens: {
code: multipleMatchingTokens,
desc: ClientAuthErrorMessages[multipleMatchingTokens],
},
multipleMatchingAccounts: {
code: multipleMatchingAccounts,
desc: ClientAuthErrorMessages[multipleMatchingAccounts],
},
multipleMatchingAppMetadata: {
code: multipleMatchingAppMetadata,
desc: ClientAuthErrorMessages[multipleMatchingAppMetadata],
},
tokenRequestCannotBeMade: {
code: requestCannotBeMade,
desc: ClientAuthErrorMessages[requestCannotBeMade],
},
removeEmptyScopeError: {
code: cannotRemoveEmptyScope,
desc: ClientAuthErrorMessages[cannotRemoveEmptyScope],
},
appendScopeSetError: {
code: cannotAppendScopeSet,
desc: ClientAuthErrorMessages[cannotAppendScopeSet],
},
emptyInputScopeSetError: {
code: emptyInputScopeSet,
desc: ClientAuthErrorMessages[emptyInputScopeSet],
},
DeviceCodePollingCancelled: {
code: deviceCodePollingCancelled,
desc: ClientAuthErrorMessages[deviceCodePollingCancelled],
},
DeviceCodeExpired: {
code: deviceCodeExpired,
desc: ClientAuthErrorMessages[deviceCodeExpired],
},
DeviceCodeUnknownError: {
code: deviceCodeUnknownError,
desc: ClientAuthErrorMessages[deviceCodeUnknownError],
},
NoAccountInSilentRequest: {
code: noAccountInSilentRequest,
desc: ClientAuthErrorMessages[noAccountInSilentRequest],
},
invalidCacheRecord: {
code: invalidCacheRecord,
desc: ClientAuthErrorMessages[invalidCacheRecord],
},
invalidCacheEnvironment: {
code: invalidCacheEnvironment,
desc: ClientAuthErrorMessages[invalidCacheEnvironment],
},
noAccountFound: {
code: noAccountFound,
desc: ClientAuthErrorMessages[noAccountFound],
},
noCryptoObj: {
code: noCryptoObject,
desc: ClientAuthErrorMessages[noCryptoObject],
},
unexpectedCredentialType: {
code: unexpectedCredentialType,
desc: ClientAuthErrorMessages[unexpectedCredentialType],
},
invalidAssertion: {
code: invalidAssertion,
desc: ClientAuthErrorMessages[invalidAssertion],
},
invalidClientCredential: {
code: invalidClientCredential,
desc: ClientAuthErrorMessages[invalidClientCredential],
},
tokenRefreshRequired: {
code: tokenRefreshRequired,
desc: ClientAuthErrorMessages[tokenRefreshRequired],
},
userTimeoutReached: {
code: userTimeoutReached,
desc: ClientAuthErrorMessages[userTimeoutReached],
},
tokenClaimsRequired: {
code: tokenClaimsCnfRequiredForSignedJwt,
desc: ClientAuthErrorMessages[tokenClaimsCnfRequiredForSignedJwt],
},
noAuthorizationCodeFromServer: {
code: authorizationCodeMissingFromServerResponse,
desc: ClientAuthErrorMessages[authorizationCodeMissingFromServerResponse],
},
bindingKeyNotRemovedError: {
code: bindingKeyNotRemoved,
desc: ClientAuthErrorMessages[bindingKeyNotRemoved],
},
logoutNotSupported: {
code: endSessionEndpointNotSupported,
desc: ClientAuthErrorMessages[endSessionEndpointNotSupported],
},
keyIdMissing: {
code: keyIdMissing,
desc: ClientAuthErrorMessages[keyIdMissing],
},
noNetworkConnectivity: {
code: noNetworkConnectivity,
desc: ClientAuthErrorMessages[noNetworkConnectivity],
},
userCanceledError: {
code: userCanceled,
desc: ClientAuthErrorMessages[userCanceled],
},
missingTenantIdError: {
code: missingTenantIdError,
desc: ClientAuthErrorMessages[missingTenantIdError],
},
nestedAppAuthBridgeDisabled: {
code: nestedAppAuthBridgeDisabled,
desc: ClientAuthErrorMessages[nestedAppAuthBridgeDisabled],
},
};
/**
* Error thrown when there is an error in the client code running on the browser.
*/
class ClientAuthError extends AuthError {
constructor(errorCode, additionalMessage) {
super(errorCode, additionalMessage
? `${ClientAuthErrorMessages[errorCode]}: ${additionalMessage}`
: ClientAuthErrorMessages[errorCode]);
this.name = "ClientAuthError";
Object.setPrototypeOf(this, ClientAuthError.prototype);
}
}
function createClientAuthError(errorCode, additionalMessage) {
return new ClientAuthError(errorCode, additionalMessage);
}
export { ClientAuthError, ClientAuthErrorMessage, ClientAuthErrorMessages, createClientAuthError };
//# sourceMappingURL=ClientAuthError.mjs.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,45 @@
export declare const clientInfoDecodingError = "client_info_decoding_error";
export declare const clientInfoEmptyError = "client_info_empty_error";
export declare const tokenParsingError = "token_parsing_error";
export declare const nullOrEmptyToken = "null_or_empty_token";
export declare const endpointResolutionError = "endpoints_resolution_error";
export declare const networkError = "network_error";
export declare const openIdConfigError = "openid_config_error";
export declare const hashNotDeserialized = "hash_not_deserialized";
export declare const invalidState = "invalid_state";
export declare const stateMismatch = "state_mismatch";
export declare const stateNotFound = "state_not_found";
export declare const nonceMismatch = "nonce_mismatch";
export declare const authTimeNotFound = "auth_time_not_found";
export declare const maxAgeTranspired = "max_age_transpired";
export declare const multipleMatchingTokens = "multiple_matching_tokens";
export declare const multipleMatchingAccounts = "multiple_matching_accounts";
export declare const multipleMatchingAppMetadata = "multiple_matching_appMetadata";
export declare const requestCannotBeMade = "request_cannot_be_made";
export declare const cannotRemoveEmptyScope = "cannot_remove_empty_scope";
export declare const cannotAppendScopeSet = "cannot_append_scopeset";
export declare const emptyInputScopeSet = "empty_input_scopeset";
export declare const deviceCodePollingCancelled = "device_code_polling_cancelled";
export declare const deviceCodeExpired = "device_code_expired";
export declare const deviceCodeUnknownError = "device_code_unknown_error";
export declare const noAccountInSilentRequest = "no_account_in_silent_request";
export declare const invalidCacheRecord = "invalid_cache_record";
export declare const invalidCacheEnvironment = "invalid_cache_environment";
export declare const noAccountFound = "no_account_found";
export declare const noCryptoObject = "no_crypto_object";
export declare const unexpectedCredentialType = "unexpected_credential_type";
export declare const invalidAssertion = "invalid_assertion";
export declare const invalidClientCredential = "invalid_client_credential";
export declare const tokenRefreshRequired = "token_refresh_required";
export declare const userTimeoutReached = "user_timeout_reached";
export declare const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt";
export declare const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response";
export declare const bindingKeyNotRemoved = "binding_key_not_removed";
export declare const endSessionEndpointNotSupported = "end_session_endpoint_not_supported";
export declare const keyIdMissing = "key_id_missing";
export declare const noNetworkConnectivity = "no_network_connectivity";
export declare const userCanceled = "user_canceled";
export declare const missingTenantIdError = "missing_tenant_id_error";
export declare const methodNotImplemented = "method_not_implemented";
export declare const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
//# sourceMappingURL=ClientAuthErrorCodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/ClientAuthErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB,+BAA+B,CAAC;AACpE,eAAO,MAAM,oBAAoB,4BAA4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AACnE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,kCAAkC,4CACF,CAAC;AAC9C,eAAO,MAAM,0CAA0C,oDACF,CAAC;AACtD,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,8BAA8B,uCACH,CAAC;AACzC,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAC7C,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAC/D,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,2BAA2B,oCAAoC,CAAC"}

View File

@@ -0,0 +1,53 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const clientInfoDecodingError = "client_info_decoding_error";
const clientInfoEmptyError = "client_info_empty_error";
const tokenParsingError = "token_parsing_error";
const nullOrEmptyToken = "null_or_empty_token";
const endpointResolutionError = "endpoints_resolution_error";
const networkError = "network_error";
const openIdConfigError = "openid_config_error";
const hashNotDeserialized = "hash_not_deserialized";
const invalidState = "invalid_state";
const stateMismatch = "state_mismatch";
const stateNotFound = "state_not_found";
const nonceMismatch = "nonce_mismatch";
const authTimeNotFound = "auth_time_not_found";
const maxAgeTranspired = "max_age_transpired";
const multipleMatchingTokens = "multiple_matching_tokens";
const multipleMatchingAccounts = "multiple_matching_accounts";
const multipleMatchingAppMetadata = "multiple_matching_appMetadata";
const requestCannotBeMade = "request_cannot_be_made";
const cannotRemoveEmptyScope = "cannot_remove_empty_scope";
const cannotAppendScopeSet = "cannot_append_scopeset";
const emptyInputScopeSet = "empty_input_scopeset";
const deviceCodePollingCancelled = "device_code_polling_cancelled";
const deviceCodeExpired = "device_code_expired";
const deviceCodeUnknownError = "device_code_unknown_error";
const noAccountInSilentRequest = "no_account_in_silent_request";
const invalidCacheRecord = "invalid_cache_record";
const invalidCacheEnvironment = "invalid_cache_environment";
const noAccountFound = "no_account_found";
const noCryptoObject = "no_crypto_object";
const unexpectedCredentialType = "unexpected_credential_type";
const invalidAssertion = "invalid_assertion";
const invalidClientCredential = "invalid_client_credential";
const tokenRefreshRequired = "token_refresh_required";
const userTimeoutReached = "user_timeout_reached";
const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt";
const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response";
const bindingKeyNotRemoved = "binding_key_not_removed";
const endSessionEndpointNotSupported = "end_session_endpoint_not_supported";
const keyIdMissing = "key_id_missing";
const noNetworkConnectivity = "no_network_connectivity";
const userCanceled = "user_canceled";
const missingTenantIdError = "missing_tenant_id_error";
const methodNotImplemented = "method_not_implemented";
const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
export { authTimeNotFound, authorizationCodeMissingFromServerResponse, bindingKeyNotRemoved, cannotAppendScopeSet, cannotRemoveEmptyScope, clientInfoDecodingError, clientInfoEmptyError, deviceCodeExpired, deviceCodePollingCancelled, deviceCodeUnknownError, emptyInputScopeSet, endSessionEndpointNotSupported, endpointResolutionError, hashNotDeserialized, invalidAssertion, invalidCacheEnvironment, invalidCacheRecord, invalidClientCredential, invalidState, keyIdMissing, maxAgeTranspired, methodNotImplemented, missingTenantIdError, multipleMatchingAccounts, multipleMatchingAppMetadata, multipleMatchingTokens, nestedAppAuthBridgeDisabled, networkError, noAccountFound, noAccountInSilentRequest, noCryptoObject, noNetworkConnectivity, nonceMismatch, nullOrEmptyToken, openIdConfigError, requestCannotBeMade, stateMismatch, stateNotFound, tokenClaimsCnfRequiredForSignedJwt, tokenParsingError, tokenRefreshRequired, unexpectedCredentialType, userCanceled, userTimeoutReached };
//# sourceMappingURL=ClientAuthErrorCodes.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientAu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,yBAAyB;AACtD,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,kCAAkC,GAC3C,0CAA0C;AACvC,MAAM,0CAA0C,GACnD,kDAAkD;AAC/C,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,8BAA8B,GACvC,qCAAqC;AAClC,MAAM,YAAY,GAAG,iBAAiB;AACtC,MAAM,qBAAqB,GAAG,0BAA0B;AACxD,MAAM,YAAY,GAAG,gBAAgB;AACrC,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,2BAA2B,GAAG;;;;"}

View File

@@ -0,0 +1,129 @@
import { AuthError } from "./AuthError.js";
import * as ClientConfigurationErrorCodes from "./ClientConfigurationErrorCodes.js";
export { ClientConfigurationErrorCodes };
export declare const ClientConfigurationErrorMessages: {
redirect_uri_empty: string;
claims_request_parsing_error: string;
authority_uri_insecure: string;
url_parse_error: string;
empty_url_error: string;
empty_input_scopes_error: string;
invalid_prompt_value: string;
invalid_claims: string;
token_request_empty: string;
logout_request_empty: string;
invalid_code_challenge_method: string;
pkce_params_missing: string;
invalid_cloud_discovery_metadata: string;
invalid_authority_metadata: string;
untrusted_authority: string;
missing_ssh_jwk: string;
missing_ssh_kid: string;
missing_nonce_authentication_header: string;
invalid_authentication_header: string;
cannot_set_OIDCOptions: string;
cannot_allow_platform_broker: string;
authority_mismatch: string;
};
/**
* ClientConfigurationErrorMessage class containing string constants used by error codes and messages.
* @deprecated Use ClientConfigurationErrorCodes instead
*/
export declare const ClientConfigurationErrorMessage: {
redirectUriNotSet: {
code: string;
desc: string;
};
claimsRequestParsingError: {
code: string;
desc: string;
};
authorityUriInsecure: {
code: string;
desc: string;
};
urlParseError: {
code: string;
desc: string;
};
urlEmptyError: {
code: string;
desc: string;
};
emptyScopesError: {
code: string;
desc: string;
};
invalidPrompt: {
code: string;
desc: string;
};
invalidClaimsRequest: {
code: string;
desc: string;
};
tokenRequestEmptyError: {
code: string;
desc: string;
};
logoutRequestEmptyError: {
code: string;
desc: string;
};
invalidCodeChallengeMethod: {
code: string;
desc: string;
};
invalidCodeChallengeParams: {
code: string;
desc: string;
};
invalidCloudDiscoveryMetadata: {
code: string;
desc: string;
};
invalidAuthorityMetadata: {
code: string;
desc: string;
};
untrustedAuthority: {
code: string;
desc: string;
};
missingSshJwk: {
code: string;
desc: string;
};
missingSshKid: {
code: string;
desc: string;
};
missingNonceAuthenticationHeader: {
code: string;
desc: string;
};
invalidAuthenticationHeader: {
code: string;
desc: string;
};
cannotSetOIDCOptions: {
code: string;
desc: string;
};
cannotAllowPlatformBroker: {
code: string;
desc: string;
};
authorityMismatch: {
code: string;
desc: string;
};
};
/**
* Error thrown when there is an error in configuration of the MSAL.js library.
*/
export declare class ClientConfigurationError extends AuthError {
constructor(errorCode: string);
}
export declare function createClientConfigurationError(errorCode: string): ClientConfigurationError;
//# sourceMappingURL=ClientConfigurationError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientConfigurationError.d.ts","sourceRoot":"","sources":["../../src/error/ClientConfigurationError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,6BAA6B,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAEzC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;CA4C5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqI3C,CAAC;AAEF;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,SAAS;gBACvC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,8BAA8B,CAC1C,SAAS,EAAE,MAAM,GAClB,wBAAwB,CAE1B"}

View File

@@ -0,0 +1,145 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { AuthError } from './AuthError.mjs';
import { redirectUriEmpty, claimsRequestParsingError, authorityUriInsecure, urlParseError, urlEmptyError, emptyInputScopesError, invalidPromptValue, invalidClaims, tokenRequestEmpty, logoutRequestEmpty, invalidCodeChallengeMethod, pkceParamsMissing, invalidCloudDiscoveryMetadata, invalidAuthorityMetadata, untrustedAuthority, missingSshJwk, missingSshKid, missingNonceAuthenticationHeader, invalidAuthenticationHeader, cannotSetOIDCOptions, cannotAllowPlatformBroker, authorityMismatch } from './ClientConfigurationErrorCodes.mjs';
import * as ClientConfigurationErrorCodes from './ClientConfigurationErrorCodes.mjs';
export { ClientConfigurationErrorCodes };
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const ClientConfigurationErrorMessages = {
[redirectUriEmpty]: "A redirect URI is required for all calls, and none has been set.",
[claimsRequestParsingError]: "Could not parse the given claims request object.",
[authorityUriInsecure]: "Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",
[urlParseError]: "URL could not be parsed into appropriate segments.",
[urlEmptyError]: "URL was empty or null.",
[emptyInputScopesError]: "Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",
[invalidPromptValue]: "Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",
[invalidClaims]: "Given claims parameter must be a stringified JSON object.",
[tokenRequestEmpty]: "Token request was empty and not found in cache.",
[logoutRequestEmpty]: "The logout request was null or undefined.",
[invalidCodeChallengeMethod]: 'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',
[pkceParamsMissing]: "Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",
[invalidCloudDiscoveryMetadata]: "Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",
[invalidAuthorityMetadata]: "Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",
[untrustedAuthority]: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",
[missingSshJwk]: "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",
[missingSshKid]: "Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",
[missingNonceAuthenticationHeader]: "Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",
[invalidAuthenticationHeader]: "Invalid authentication header provided",
[cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",
[cannotAllowPlatformBroker]: "Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",
[authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",
};
/**
* ClientConfigurationErrorMessage class containing string constants used by error codes and messages.
* @deprecated Use ClientConfigurationErrorCodes instead
*/
const ClientConfigurationErrorMessage = {
redirectUriNotSet: {
code: redirectUriEmpty,
desc: ClientConfigurationErrorMessages[redirectUriEmpty],
},
claimsRequestParsingError: {
code: claimsRequestParsingError,
desc: ClientConfigurationErrorMessages[claimsRequestParsingError],
},
authorityUriInsecure: {
code: authorityUriInsecure,
desc: ClientConfigurationErrorMessages[authorityUriInsecure],
},
urlParseError: {
code: urlParseError,
desc: ClientConfigurationErrorMessages[urlParseError],
},
urlEmptyError: {
code: urlEmptyError,
desc: ClientConfigurationErrorMessages[urlEmptyError],
},
emptyScopesError: {
code: emptyInputScopesError,
desc: ClientConfigurationErrorMessages[emptyInputScopesError],
},
invalidPrompt: {
code: invalidPromptValue,
desc: ClientConfigurationErrorMessages[invalidPromptValue],
},
invalidClaimsRequest: {
code: invalidClaims,
desc: ClientConfigurationErrorMessages[invalidClaims],
},
tokenRequestEmptyError: {
code: tokenRequestEmpty,
desc: ClientConfigurationErrorMessages[tokenRequestEmpty],
},
logoutRequestEmptyError: {
code: logoutRequestEmpty,
desc: ClientConfigurationErrorMessages[logoutRequestEmpty],
},
invalidCodeChallengeMethod: {
code: invalidCodeChallengeMethod,
desc: ClientConfigurationErrorMessages[invalidCodeChallengeMethod],
},
invalidCodeChallengeParams: {
code: pkceParamsMissing,
desc: ClientConfigurationErrorMessages[pkceParamsMissing],
},
invalidCloudDiscoveryMetadata: {
code: invalidCloudDiscoveryMetadata,
desc: ClientConfigurationErrorMessages[invalidCloudDiscoveryMetadata],
},
invalidAuthorityMetadata: {
code: invalidAuthorityMetadata,
desc: ClientConfigurationErrorMessages[invalidAuthorityMetadata],
},
untrustedAuthority: {
code: untrustedAuthority,
desc: ClientConfigurationErrorMessages[untrustedAuthority],
},
missingSshJwk: {
code: missingSshJwk,
desc: ClientConfigurationErrorMessages[missingSshJwk],
},
missingSshKid: {
code: missingSshKid,
desc: ClientConfigurationErrorMessages[missingSshKid],
},
missingNonceAuthenticationHeader: {
code: missingNonceAuthenticationHeader,
desc: ClientConfigurationErrorMessages[missingNonceAuthenticationHeader],
},
invalidAuthenticationHeader: {
code: invalidAuthenticationHeader,
desc: ClientConfigurationErrorMessages[invalidAuthenticationHeader],
},
cannotSetOIDCOptions: {
code: cannotSetOIDCOptions,
desc: ClientConfigurationErrorMessages[cannotSetOIDCOptions],
},
cannotAllowPlatformBroker: {
code: cannotAllowPlatformBroker,
desc: ClientConfigurationErrorMessages[cannotAllowPlatformBroker],
},
authorityMismatch: {
code: authorityMismatch,
desc: ClientConfigurationErrorMessages[authorityMismatch],
},
};
/**
* Error thrown when there is an error in configuration of the MSAL.js library.
*/
class ClientConfigurationError extends AuthError {
constructor(errorCode) {
super(errorCode, ClientConfigurationErrorMessages[errorCode]);
this.name = "ClientConfigurationError";
Object.setPrototypeOf(this, ClientConfigurationError.prototype);
}
}
function createClientConfigurationError(errorCode) {
return new ClientConfigurationError(errorCode);
}
export { ClientConfigurationError, ClientConfigurationErrorMessage, ClientConfigurationErrorMessages, createClientConfigurationError };
//# sourceMappingURL=ClientConfigurationError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientConfigurationError.mjs","sources":["../../src/error/ClientConfigurationError.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.redirectUriEmpty","ClientConfigurationErrorCodes.claimsRequestParsingError","ClientConfigurationErrorCodes.authorityUriInsecure","ClientConfigurationErrorCodes.urlParseError","ClientConfigurationErrorCodes.urlEmptyError","ClientConfigurationErrorCodes.emptyInputScopesError","ClientConfigurationErrorCodes.invalidPromptValue","ClientConfigurationErrorCodes.invalidClaims","ClientConfigurationErrorCodes.tokenRequestEmpty","ClientConfigurationErrorCodes.logoutRequestEmpty","ClientConfigurationErrorCodes.invalidCodeChallengeMethod","ClientConfigurationErrorCodes.pkceParamsMissing","ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata","ClientConfigurationErrorCodes.invalidAuthorityMetadata","ClientConfigurationErrorCodes.untrustedAuthority","ClientConfigurationErrorCodes.missingSshJwk","ClientConfigurationErrorCodes.missingSshKid","ClientConfigurationErrorCodes.missingNonceAuthenticationHeader","ClientConfigurationErrorCodes.invalidAuthenticationHeader","ClientConfigurationErrorCodes.cannotSetOIDCOptions","ClientConfigurationErrorCodes.cannotAllowPlatformBroker","ClientConfigurationErrorCodes.authorityMismatch"],"mappings":";;;;;;;AAAA;;;AAGG;AAMU,MAAA,gCAAgC,GAAG;AAC5C,IAAA,CAACA,gBAA8C,GAC3C,kEAAkE;AACtE,IAAA,CAACC,yBAAuD,GACpD,kDAAkD;AACtD,IAAA,CAACC,oBAAkD,GAC/C,2NAA2N;AAC/N,IAAA,CAACC,aAA2C,GACxC,oDAAoD;AACxD,IAAA,CAACC,aAA2C,GAAG,wBAAwB;AACvE,IAAA,CAACC,qBAAmD,GAChD,gHAAgH;AACpH,IAAA,CAACC,kBAAgD,GAC7C,sLAAsL;AAC1L,IAAA,CAACC,aAA2C,GACxC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const redirectUriEmpty = "redirect_uri_empty";
export declare const claimsRequestParsingError = "claims_request_parsing_error";
export declare const authorityUriInsecure = "authority_uri_insecure";
export declare const urlParseError = "url_parse_error";
export declare const urlEmptyError = "empty_url_error";
export declare const emptyInputScopesError = "empty_input_scopes_error";
export declare const invalidPromptValue = "invalid_prompt_value";
export declare const invalidClaims = "invalid_claims";
export declare const tokenRequestEmpty = "token_request_empty";
export declare const logoutRequestEmpty = "logout_request_empty";
export declare const invalidCodeChallengeMethod = "invalid_code_challenge_method";
export declare const pkceParamsMissing = "pkce_params_missing";
export declare const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata";
export declare const invalidAuthorityMetadata = "invalid_authority_metadata";
export declare const untrustedAuthority = "untrusted_authority";
export declare const missingSshJwk = "missing_ssh_jwk";
export declare const missingSshKid = "missing_ssh_kid";
export declare const missingNonceAuthenticationHeader = "missing_nonce_authentication_header";
export declare const invalidAuthenticationHeader = "invalid_authentication_header";
export declare const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
export declare const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
export declare const authorityMismatch = "authority_mismatch";
//# sourceMappingURL=ClientConfigurationErrorCodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientConfigurationErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/ClientConfigurationErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AACxE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAChE,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAChF,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,gCAAgC,wCACJ,CAAC;AAC1C,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAC3E,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AACxE,eAAO,MAAM,iBAAiB,uBAAuB,CAAC"}

View File

@@ -0,0 +1,31 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const redirectUriEmpty = "redirect_uri_empty";
const claimsRequestParsingError = "claims_request_parsing_error";
const authorityUriInsecure = "authority_uri_insecure";
const urlParseError = "url_parse_error";
const urlEmptyError = "empty_url_error";
const emptyInputScopesError = "empty_input_scopes_error";
const invalidPromptValue = "invalid_prompt_value";
const invalidClaims = "invalid_claims";
const tokenRequestEmpty = "token_request_empty";
const logoutRequestEmpty = "logout_request_empty";
const invalidCodeChallengeMethod = "invalid_code_challenge_method";
const pkceParamsMissing = "pkce_params_missing";
const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata";
const invalidAuthorityMetadata = "invalid_authority_metadata";
const untrustedAuthority = "untrusted_authority";
const missingSshJwk = "missing_ssh_jwk";
const missingSshKid = "missing_ssh_kid";
const missingNonceAuthenticationHeader = "missing_nonce_authentication_header";
const invalidAuthenticationHeader = "invalid_authentication_header";
const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
const authorityMismatch = "authority_mismatch";
export { authorityMismatch, authorityUriInsecure, cannotAllowPlatformBroker, cannotSetOIDCOptions, claimsRequestParsingError, emptyInputScopesError, invalidAuthenticationHeader, invalidAuthorityMetadata, invalidClaims, invalidCloudDiscoveryMetadata, invalidCodeChallengeMethod, invalidPromptValue, logoutRequestEmpty, missingNonceAuthenticationHeader, missingSshJwk, missingSshKid, pkceParamsMissing, redirectUriEmpty, tokenRequestEmpty, untrustedAuthority, urlEmptyError, urlParseError };
//# sourceMappingURL=ClientConfigurationErrorCodes.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientConfigurationErrorCodes.mjs","sources":["../../src/error/ClientConfigurationErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,gBAAgB,GAAG,qBAAqB;AAC9C,MAAM,yBAAyB,GAAG,+BAA+B;AACjE,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,qBAAqB,GAAG,2BAA2B;AACzD,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,aAAa,GAAG,iBAAiB;AACvC,MAAM,iBAAiB,GAAG,sBAAsB;AAChD,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,0BAA0B,GAAG,gCAAgC;AACnE,MAAM,iBAAiB,GAAG,sBAAsB;AAChD,MAAM,6BAA6B,GAAG,mCAAmC;AACzE,MAAM,wBAAwB,GAAG,6BAA6B;AAC9D,MAAM,kBAAkB,GAAG,sBAAsB;AACjD,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,gCAAgC,GACzC,sCAAsC;AACnC,MAAM,2BAA2B,GAAG,gCAAgC;AACpE,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,yBAAyB,GAAG,+BAA+B;AACjE,MAAM,iBAAiB,GAAG;;;;"}

View File

@@ -0,0 +1,66 @@
import { AuthError } from "./AuthError.js";
import * as InteractionRequiredAuthErrorCodes from "./InteractionRequiredAuthErrorCodes.js";
export { InteractionRequiredAuthErrorCodes };
/**
* InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required
*/
export declare const InteractionRequiredServerErrorMessage: string[];
export declare const InteractionRequiredAuthSubErrorMessage: string[];
/**
* Interaction required errors defined by the SDK
* @deprecated Use InteractionRequiredAuthErrorCodes instead
*/
export declare const InteractionRequiredAuthErrorMessage: {
noTokensFoundError: {
code: string;
desc: string;
};
native_account_unavailable: {
code: string;
desc: string;
};
bad_token: {
code: string;
desc: string;
};
};
/**
* Error thrown when user interaction is required.
*/
export declare class InteractionRequiredAuthError extends AuthError {
/**
* The time the error occured at
*/
timestamp: string;
/**
* TraceId associated with the error
*/
traceId: string;
/**
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/claims-challenge.md
*
* A string with extra claims needed for the token request to succeed
* web site: redirect the user to the authorization page and set the extra claims
* web api: include the claims in the WWW-Authenticate header that are sent back to the client so that it knows to request a token with the extra claims
* desktop application or browser context: include the claims when acquiring the token interactively
* app to app context (client_credentials): include the claims in the AcquireTokenByClientCredential request
*/
claims: string;
/**
* Server error number;
*/
readonly errorNo?: string;
constructor(errorCode?: string, errorMessage?: string, subError?: string, timestamp?: string, traceId?: string, correlationId?: string, claims?: string, errorNo?: string);
}
/**
* Helper function used to determine if an error thrown by the server requires interaction to resolve
* @param errorCode
* @param errorString
* @param subError
*/
export declare function isInteractionRequiredError(errorCode?: string, errorString?: string, subError?: string): boolean;
/**
* Creates an InteractionRequiredAuthError
*/
export declare function createInteractionRequiredAuthError(errorCode: string): InteractionRequiredAuthError;
//# sourceMappingURL=InteractionRequiredAuthError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"InteractionRequiredAuthError.d.ts","sourceRoot":"","sources":["../../src/error/InteractionRequiredAuthError.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,iCAAiC,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,iCAAiC,EAAE,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,qCAAqC,UAKjD,CAAC;AAEF,eAAO,MAAM,sCAAsC,UAOlD,CAAC;AAaF;;;GAGG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;CAmB/C,CAAC;AAEF;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;gBAGtB,SAAS,CAAC,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM;CAYvB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACtC,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,GAClB,OAAO,CAkBT;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAC9C,SAAS,EAAE,MAAM,GAClB,4BAA4B,CAK9B"}

View File

@@ -0,0 +1,96 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { Constants } from '../utils/Constants.mjs';
import { AuthError } from './AuthError.mjs';
import { noTokensFound, nativeAccountUnavailable, badToken, refreshTokenExpired, interactionRequired, consentRequired, loginRequired } from './InteractionRequiredAuthErrorCodes.mjs';
import * as InteractionRequiredAuthErrorCodes from './InteractionRequiredAuthErrorCodes.mjs';
export { InteractionRequiredAuthErrorCodes };
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required
*/
const InteractionRequiredServerErrorMessage = [
interactionRequired,
consentRequired,
loginRequired,
badToken,
];
const InteractionRequiredAuthSubErrorMessage = [
"message_only",
"additional_action",
"basic_action",
"user_password_expired",
"consent_required",
"bad_token",
];
const InteractionRequiredAuthErrorMessages = {
[noTokensFound]: "No refresh token found in the cache. Please sign-in.",
[nativeAccountUnavailable]: "The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",
[refreshTokenExpired]: "Refresh token has expired.",
[badToken]: "Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",
};
/**
* Interaction required errors defined by the SDK
* @deprecated Use InteractionRequiredAuthErrorCodes instead
*/
const InteractionRequiredAuthErrorMessage = {
noTokensFoundError: {
code: noTokensFound,
desc: InteractionRequiredAuthErrorMessages[noTokensFound],
},
native_account_unavailable: {
code: nativeAccountUnavailable,
desc: InteractionRequiredAuthErrorMessages[nativeAccountUnavailable],
},
bad_token: {
code: badToken,
desc: InteractionRequiredAuthErrorMessages[badToken],
},
};
/**
* Error thrown when user interaction is required.
*/
class InteractionRequiredAuthError extends AuthError {
constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) {
super(errorCode, errorMessage, subError);
Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);
this.timestamp = timestamp || Constants.EMPTY_STRING;
this.traceId = traceId || Constants.EMPTY_STRING;
this.correlationId = correlationId || Constants.EMPTY_STRING;
this.claims = claims || Constants.EMPTY_STRING;
this.name = "InteractionRequiredAuthError";
this.errorNo = errorNo;
}
}
/**
* Helper function used to determine if an error thrown by the server requires interaction to resolve
* @param errorCode
* @param errorString
* @param subError
*/
function isInteractionRequiredError(errorCode, errorString, subError) {
const isInteractionRequiredErrorCode = !!errorCode &&
InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;
const isInteractionRequiredSubError = !!subError &&
InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;
const isInteractionRequiredErrorDesc = !!errorString &&
InteractionRequiredServerErrorMessage.some((irErrorCode) => {
return errorString.indexOf(irErrorCode) > -1;
});
return (isInteractionRequiredErrorCode ||
isInteractionRequiredErrorDesc ||
isInteractionRequiredSubError);
}
/**
* Creates an InteractionRequiredAuthError
*/
function createInteractionRequiredAuthError(errorCode) {
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
}
export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, InteractionRequiredAuthSubErrorMessage, InteractionRequiredServerErrorMessage, createInteractionRequiredAuthError, isInteractionRequiredError };
//# sourceMappingURL=InteractionRequiredAuthError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"InteractionRequiredAuthError.mjs","sources":["../../src/error/InteractionRequiredAuthError.ts"],"sourcesContent":[null],"names":["InteractionRequiredAuthErrorCodes.interactionRequired","InteractionRequiredAuthErrorCodes.consentRequired","InteractionRequiredAuthErrorCodes.loginRequired","InteractionRequiredAuthErrorCodes.badToken","InteractionRequiredAuthErrorCodes.noTokensFound","InteractionRequiredAuthErrorCodes.nativeAccountUnavailable","InteractionRequiredAuthErrorCodes.refreshTokenExpired"],"mappings":";;;;;;;;AAAA;;;AAGG;AAOH;;AAEG;AACU,MAAA,qCAAqC,GAAG;AACjD,IAAAA,mBAAqD;AACrD,IAAAC,eAAiD;AACjD,IAAAC,aAA+C;AAC/C,IAAAC,QAA0C;EAC5C;AAEW,MAAA,sCAAsC,GAAG;IAClD,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,uBAAuB;IACvB,kBAAkB;IAClB,WAAW;EACb;AAEF,MAAM,oCAAoC,GAAG;AACzC,IAAA,CAACC,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GAAG,OAAO,CAAC;KAC1B;AACJ,CAAA;AAED;;;;;AAKG;SACa,0BAA0B,CACtC,SAAkB,EAClB,WAAoB,EACpB,QAAiB,EAAA;AAEjB,IAAA,MAAM,8BAA8B,GAChC,CAAC,CAAC,SAAS;QACX,qCAAqC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AAClE,IAAA,MAAM,6BAA6B,GAC/B,CAAC,CAAC,QAAQ;QACV,sCAAsC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;AAClE,IAAA,MAAM,8BAA8B,GAChC,CAAC,CAAC,WAAW;AACb,QAAA,qCAAqC,CAAC,IAAI,CAAC,CAAC,WAAW,KAAI;YACvD,OAAO,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;AACjD,SAAC,CAAC,CAAC;AAEP,IAAA,QACI,8BAA8B;QAC9B,8BAA8B;AAC9B,QAAA,6BAA6B,EAC/B;AACN,CAAC;AAED;;AAEG;AACG,SAAU,kCAAkC,CAC9C,SAAiB,EAAA;IAEjB,OAAO,IAAI,4BAA4B,CACnC,SAAS,EACT,oCAAoC,CAAC,SAAS,CAAC,CAClD,CAAC;AACN;;;;"}

View File

@@ -0,0 +1,8 @@
export declare const noTokensFound = "no_tokens_found";
export declare const nativeAccountUnavailable = "native_account_unavailable";
export declare const refreshTokenExpired = "refresh_token_expired";
export declare const interactionRequired = "interaction_required";
export declare const consentRequired = "consent_required";
export declare const loginRequired = "login_required";
export declare const badToken = "bad_token";
//# sourceMappingURL=InteractionRequiredAuthErrorCodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"InteractionRequiredAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/InteractionRequiredAuthErrorCodes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAG3D,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,QAAQ,cAAc,CAAC"}

View File

@@ -0,0 +1,18 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
// Codes defined by MSAL
const noTokensFound = "no_tokens_found";
const nativeAccountUnavailable = "native_account_unavailable";
const refreshTokenExpired = "refresh_token_expired";
// Codes potentially returned by server
const interactionRequired = "interaction_required";
const consentRequired = "consent_required";
const loginRequired = "login_required";
const badToken = "bad_token";
export { badToken, consentRequired, interactionRequired, loginRequired, nativeAccountUnavailable, noTokensFound, refreshTokenExpired };
//# sourceMappingURL=InteractionRequiredAuthErrorCodes.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"InteractionRequiredAuthErrorCodes.mjs","sources":["../../src/error/InteractionRequiredAuthErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;AACO,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,wBAAwB,GAAG,6BAA6B;AAC9D,MAAM,mBAAmB,GAAG,wBAAwB;AAE3D;AACO,MAAM,mBAAmB,GAAG,uBAAuB;AACnD,MAAM,eAAe,GAAG,mBAAmB;AAC3C,MAAM,aAAa,GAAG,iBAAiB;AACvC,MAAM,QAAQ,GAAG;;;;"}

View File

@@ -0,0 +1,16 @@
import { AuthError } from "./AuthError.js";
import * as JoseHeaderErrorCodes from "./JoseHeaderErrorCodes.js";
export { JoseHeaderErrorCodes };
export declare const JoseHeaderErrorMessages: {
missing_kid_error: string;
missing_alg_error: string;
};
/**
* Error thrown when there is an error in the client code running on the browser.
*/
export declare class JoseHeaderError extends AuthError {
constructor(errorCode: string, errorMessage?: string);
}
/** Returns JoseHeaderError object */
export declare function createJoseHeaderError(code: string): JoseHeaderError;
//# sourceMappingURL=JoseHeaderError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"JoseHeaderError.d.ts","sourceRoot":"","sources":["../../src/error/JoseHeaderError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,eAAO,MAAM,uBAAuB;;;CAKnC,CAAC;AAEF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAMvD;AAED,qCAAqC;AACrC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAEnE"}

View File

@@ -0,0 +1,30 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { AuthError } from './AuthError.mjs';
import { missingKidError, missingAlgError } from './JoseHeaderErrorCodes.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const JoseHeaderErrorMessages = {
[missingKidError]: "The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",
[missingAlgError]: "The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided.",
};
/**
* Error thrown when there is an error in the client code running on the browser.
*/
class JoseHeaderError extends AuthError {
constructor(errorCode, errorMessage) {
super(errorCode, errorMessage);
this.name = "JoseHeaderError";
Object.setPrototypeOf(this, JoseHeaderError.prototype);
}
}
/** Returns JoseHeaderError object */
function createJoseHeaderError(code) {
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
}
export { JoseHeaderError, JoseHeaderErrorMessages, createJoseHeaderError };
//# sourceMappingURL=JoseHeaderError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"JoseHeaderError.mjs","sources":["../../src/error/JoseHeaderError.ts"],"sourcesContent":[null],"names":["JoseHeaderErrorCodes.missingKidError","JoseHeaderErrorCodes.missingAlgError"],"mappings":";;;;;AAAA;;;AAGG;AAMU,MAAA,uBAAuB,GAAG;AACnC,IAAA,CAACA,eAAoC,GACjC,oJAAoJ;AACxJ,IAAA,CAACC,eAAoC,GACjC,wJAAwJ;EAC9J;AAEF;;AAEG;AACG,MAAO,eAAgB,SAAQ,SAAS,CAAA;IAC1C,WAAY,CAAA,SAAiB,EAAE,YAAqB,EAAA;AAChD,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC/B,QAAA,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAE9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;KAC1D;AACJ,CAAA;AAED;AACM,SAAU,qBAAqB,CAAC,IAAY,EAAA;IAC9C,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC;AACpE;;;;"}

View File

@@ -0,0 +1,3 @@
export declare const missingKidError = "missing_kid_error";
export declare const missingAlgError = "missing_alg_error";
//# sourceMappingURL=JoseHeaderErrorCodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"JoseHeaderErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/JoseHeaderErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,eAAe,sBAAsB,CAAC"}

View File

@@ -0,0 +1,11 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const missingKidError = "missing_kid_error";
const missingAlgError = "missing_alg_error";
export { missingAlgError, missingKidError };
//# sourceMappingURL=JoseHeaderErrorCodes.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"JoseHeaderErrorCodes.mjs","sources":["../../src/error/JoseHeaderErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,eAAe,GAAG,oBAAoB;AAC5C,MAAM,eAAe,GAAG;;;;"}

View File

@@ -0,0 +1,19 @@
import { AuthError } from "./AuthError.js";
/**
* Represents network related errors
*/
export declare class NetworkError extends AuthError {
error: AuthError;
httpStatus?: number;
responseHeaders?: Record<string, string>;
constructor(error: AuthError, httpStatus?: number, responseHeaders?: Record<string, string>);
}
/**
* Creates NetworkError object for a failed network request
* @param error - Error to be thrown back to the caller
* @param httpStatus - Status code of the network request
* @param responseHeaders - Response headers of the network request, when available
* @returns NetworkError object
*/
export declare function createNetworkError(error: AuthError, httpStatus?: number, responseHeaders?: Record<string, string>): NetworkError;
//# sourceMappingURL=NetworkError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NetworkError.d.ts","sourceRoot":"","sources":["../../src/error/NetworkError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACvC,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAGrC,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAU/C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,YAAY,CAEd"}

View File

@@ -0,0 +1,34 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { AuthError } from './AuthError.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* Represents network related errors
*/
class NetworkError extends AuthError {
constructor(error, httpStatus, responseHeaders) {
super(error.errorCode, error.errorMessage, error.subError);
Object.setPrototypeOf(this, NetworkError.prototype);
this.name = "NetworkError";
this.error = error;
this.httpStatus = httpStatus;
this.responseHeaders = responseHeaders;
}
}
/**
* Creates NetworkError object for a failed network request
* @param error - Error to be thrown back to the caller
* @param httpStatus - Status code of the network request
* @param responseHeaders - Response headers of the network request, when available
* @returns NetworkError object
*/
function createNetworkError(error, httpStatus, responseHeaders) {
return new NetworkError(error, httpStatus, responseHeaders);
}
export { NetworkError, createNetworkError };
//# sourceMappingURL=NetworkError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NetworkError.mjs","sources":["../../src/error/NetworkError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACG,MAAO,YAAa,SAAQ,SAAS,CAAA;AAKvC,IAAA,WAAA,CACI,KAAgB,EAChB,UAAmB,EACnB,eAAwC,EAAA;AAExC,QAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE3D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,QAAA,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;AAC3B,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;KAC1C;AACJ,CAAA;AAED;;;;;;AAMG;SACa,kBAAkB,CAC9B,KAAgB,EAChB,UAAmB,EACnB,eAAwC,EAAA;IAExC,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;AAChE;;;;"}

View File

@@ -0,0 +1,16 @@
import { AuthError } from "./AuthError.js";
/**
* Error thrown when there is an error with the server code, for example, unavailability.
*/
export declare class ServerError extends AuthError {
/**
* Server error number;
*/
readonly errorNo?: string;
/**
* Http status number;
*/
readonly status?: number;
constructor(errorCode?: string, errorMessage?: string, subError?: string, errorNo?: string, status?: number);
}
//# sourceMappingURL=ServerError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ServerError.d.ts","sourceRoot":"","sources":["../../src/error/ServerError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,WAAY,SAAQ,SAAS;IACtC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAGrB,SAAS,CAAC,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM;CAStB"}

View File

@@ -0,0 +1,23 @@
/*! @azure/msal-common v15.1.1 2025-02-05 */
'use strict';
import { AuthError } from './AuthError.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* Error thrown when there is an error with the server code, for example, unavailability.
*/
class ServerError extends AuthError {
constructor(errorCode, errorMessage, subError, errorNo, status) {
super(errorCode, errorMessage, subError);
this.name = "ServerError";
this.errorNo = errorNo;
this.status = status;
Object.setPrototypeOf(this, ServerError.prototype);
}
}
export { ServerError };
//# sourceMappingURL=ServerError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ServerError.mjs","sources":["../../src/error/ServerError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACG,MAAO,WAAY,SAAQ,SAAS,CAAA;IAWtC,WACI,CAAA,SAAkB,EAClB,YAAqB,EACrB,QAAiB,EACjB,OAAgB,EAChB,MAAe,EAAA;AAEf,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;AAC1B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;KACtD;AACJ;;;;"}