Commit iniziale
This commit is contained in:
3
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts
generated
vendored
Normal file
3
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ClientAssertionCallback } from "../account/ClientCredentials.js";
|
||||
export declare function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise<string>;
|
||||
//# sourceMappingURL=ClientAssertionUtils.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ClientAssertionUtils.d.ts","sourceRoot":"","sources":["../../src/utils/ClientAssertionUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EAE1B,MAAM,iCAAiC,CAAC;AAEzC,wBAAsB,kBAAkB,CACpC,eAAe,EAAE,MAAM,GAAG,uBAAuB,EACjD,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAUjB"}
|
||||
21
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs
generated
vendored
Normal file
21
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-05 */
|
||||
'use strict';
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
||||
if (typeof clientAssertion === "string") {
|
||||
return clientAssertion;
|
||||
}
|
||||
else {
|
||||
const config = {
|
||||
clientId: clientId,
|
||||
tokenEndpoint: tokenEndpoint,
|
||||
};
|
||||
return clientAssertion(config);
|
||||
}
|
||||
}
|
||||
|
||||
export { getClientAssertion };
|
||||
//# sourceMappingURL=ClientAssertionUtils.mjs.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ClientAssertionUtils.mjs","sources":["../../src/utils/ClientAssertionUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAOI,eAAe,kBAAkB,CACpC,eAAiD,EACjD,QAAgB,EAChB,aAAsB,EAAA;AAEtB,IAAA,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;AACrC,QAAA,OAAO,eAAe,CAAC;AAC1B,KAAA;AAAM,SAAA;AACH,QAAA,MAAM,MAAM,GAA0B;AAClC,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,aAAa,EAAE,aAAa;SAC/B,CAAC;AACF,QAAA,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AAClC,KAAA;AACL;;;;"}
|
||||
305
node_modules/@azure/msal-common/dist/utils/Constants.d.ts
generated
vendored
Normal file
305
node_modules/@azure/msal-common/dist/utils/Constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,305 @@
|
||||
export declare const Constants: {
|
||||
LIBRARY_NAME: string;
|
||||
SKU: string;
|
||||
CACHE_PREFIX: string;
|
||||
DEFAULT_AUTHORITY: string;
|
||||
DEFAULT_AUTHORITY_HOST: string;
|
||||
DEFAULT_COMMON_TENANT: string;
|
||||
ADFS: string;
|
||||
DSTS: string;
|
||||
AAD_INSTANCE_DISCOVERY_ENDPT: string;
|
||||
CIAM_AUTH_URL: string;
|
||||
AAD_TENANT_DOMAIN_SUFFIX: string;
|
||||
RESOURCE_DELIM: string;
|
||||
NO_ACCOUNT: string;
|
||||
CLAIMS: string;
|
||||
CONSUMER_UTID: string;
|
||||
OPENID_SCOPE: string;
|
||||
PROFILE_SCOPE: string;
|
||||
OFFLINE_ACCESS_SCOPE: string;
|
||||
EMAIL_SCOPE: string;
|
||||
CODE_RESPONSE_TYPE: string;
|
||||
CODE_GRANT_TYPE: string;
|
||||
RT_GRANT_TYPE: string;
|
||||
FRAGMENT_RESPONSE_MODE: string;
|
||||
S256_CODE_CHALLENGE_METHOD: string;
|
||||
URL_FORM_CONTENT_TYPE: string;
|
||||
AUTHORIZATION_PENDING: string;
|
||||
NOT_DEFINED: string;
|
||||
EMPTY_STRING: string;
|
||||
NOT_APPLICABLE: string;
|
||||
NOT_AVAILABLE: string;
|
||||
FORWARD_SLASH: string;
|
||||
IMDS_ENDPOINT: string;
|
||||
IMDS_VERSION: string;
|
||||
IMDS_TIMEOUT: number;
|
||||
AZURE_REGION_AUTO_DISCOVER_FLAG: string;
|
||||
REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: string;
|
||||
KNOWN_PUBLIC_CLOUDS: string[];
|
||||
TOKEN_RESPONSE_TYPE: string;
|
||||
ID_TOKEN_RESPONSE_TYPE: string;
|
||||
SHR_NONCE_VALIDITY: number;
|
||||
INVALID_INSTANCE: string;
|
||||
};
|
||||
export declare const HttpStatus: {
|
||||
readonly SUCCESS: 200;
|
||||
readonly SUCCESS_RANGE_START: 200;
|
||||
readonly SUCCESS_RANGE_END: 299;
|
||||
readonly REDIRECT: 302;
|
||||
readonly CLIENT_ERROR: 400;
|
||||
readonly CLIENT_ERROR_RANGE_START: 400;
|
||||
readonly BAD_REQUEST: 400;
|
||||
readonly UNAUTHORIZED: 401;
|
||||
readonly NOT_FOUND: 404;
|
||||
readonly REQUEST_TIMEOUT: 408;
|
||||
readonly TOO_MANY_REQUESTS: 429;
|
||||
readonly CLIENT_ERROR_RANGE_END: 499;
|
||||
readonly SERVER_ERROR: 500;
|
||||
readonly SERVER_ERROR_RANGE_START: 500;
|
||||
readonly SERVICE_UNAVAILABLE: 503;
|
||||
readonly GATEWAY_TIMEOUT: 504;
|
||||
readonly SERVER_ERROR_RANGE_END: 599;
|
||||
readonly MULTI_SIDED_ERROR: 600;
|
||||
};
|
||||
export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus];
|
||||
export declare const OIDC_DEFAULT_SCOPES: string[];
|
||||
export declare const OIDC_SCOPES: string[];
|
||||
/**
|
||||
* Request header names
|
||||
*/
|
||||
export declare const HeaderNames: {
|
||||
readonly CONTENT_TYPE: "Content-Type";
|
||||
readonly CONTENT_LENGTH: "Content-Length";
|
||||
readonly RETRY_AFTER: "Retry-After";
|
||||
readonly CCS_HEADER: "X-AnchorMailbox";
|
||||
readonly WWWAuthenticate: "WWW-Authenticate";
|
||||
readonly AuthenticationInfo: "Authentication-Info";
|
||||
readonly X_MS_REQUEST_ID: "x-ms-request-id";
|
||||
readonly X_MS_HTTP_VERSION: "x-ms-httpver";
|
||||
};
|
||||
export type HeaderNames = (typeof HeaderNames)[keyof typeof HeaderNames];
|
||||
/**
|
||||
* Persistent cache keys MSAL which stay while user is logged in.
|
||||
*/
|
||||
export declare const PersistentCacheKeys: {
|
||||
readonly ACTIVE_ACCOUNT_FILTERS: "active-account-filters";
|
||||
};
|
||||
export type PersistentCacheKeys = (typeof PersistentCacheKeys)[keyof typeof PersistentCacheKeys];
|
||||
/**
|
||||
* String constants related to AAD Authority
|
||||
*/
|
||||
export declare const AADAuthorityConstants: {
|
||||
readonly COMMON: "common";
|
||||
readonly ORGANIZATIONS: "organizations";
|
||||
readonly CONSUMERS: "consumers";
|
||||
};
|
||||
export type AADAuthorityConstants = (typeof AADAuthorityConstants)[keyof typeof AADAuthorityConstants];
|
||||
/**
|
||||
* Claims request keys
|
||||
*/
|
||||
export declare const ClaimsRequestKeys: {
|
||||
readonly ACCESS_TOKEN: "access_token";
|
||||
readonly XMS_CC: "xms_cc";
|
||||
};
|
||||
export type ClaimsRequestKeys = (typeof ClaimsRequestKeys)[keyof typeof ClaimsRequestKeys];
|
||||
/**
|
||||
* we considered making this "enum" in the request instead of string, however it looks like the allowed list of
|
||||
* prompt values kept changing over past couple of years. There are some undocumented prompt values for some
|
||||
* internal partners too, hence the choice of generic "string" type instead of the "enum"
|
||||
*/
|
||||
export declare const PromptValue: {
|
||||
LOGIN: string;
|
||||
SELECT_ACCOUNT: string;
|
||||
CONSENT: string;
|
||||
NONE: string;
|
||||
CREATE: string;
|
||||
NO_SESSION: string;
|
||||
};
|
||||
/**
|
||||
* allowed values for codeVerifier
|
||||
*/
|
||||
export declare const CodeChallengeMethodValues: {
|
||||
PLAIN: string;
|
||||
S256: string;
|
||||
};
|
||||
/**
|
||||
* allowed values for server response type
|
||||
*/
|
||||
export declare const ServerResponseType: {
|
||||
readonly QUERY: "query";
|
||||
readonly FRAGMENT: "fragment";
|
||||
};
|
||||
export type ServerResponseType = (typeof ServerResponseType)[keyof typeof ServerResponseType];
|
||||
/**
|
||||
* allowed values for response_mode
|
||||
*/
|
||||
export declare const ResponseMode: {
|
||||
readonly FORM_POST: "form_post";
|
||||
readonly QUERY: "query";
|
||||
readonly FRAGMENT: "fragment";
|
||||
};
|
||||
export type ResponseMode = (typeof ResponseMode)[keyof typeof ResponseMode];
|
||||
/**
|
||||
* allowed grant_type
|
||||
*/
|
||||
export declare const GrantType: {
|
||||
readonly IMPLICIT_GRANT: "implicit";
|
||||
readonly AUTHORIZATION_CODE_GRANT: "authorization_code";
|
||||
readonly CLIENT_CREDENTIALS_GRANT: "client_credentials";
|
||||
readonly RESOURCE_OWNER_PASSWORD_GRANT: "password";
|
||||
readonly REFRESH_TOKEN_GRANT: "refresh_token";
|
||||
readonly DEVICE_CODE_GRANT: "device_code";
|
||||
readonly JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
||||
};
|
||||
export type GrantType = (typeof GrantType)[keyof typeof GrantType];
|
||||
/**
|
||||
* Account types in Cache
|
||||
*/
|
||||
export declare const CacheAccountType: {
|
||||
readonly MSSTS_ACCOUNT_TYPE: "MSSTS";
|
||||
readonly ADFS_ACCOUNT_TYPE: "ADFS";
|
||||
readonly MSAV1_ACCOUNT_TYPE: "MSA";
|
||||
readonly GENERIC_ACCOUNT_TYPE: "Generic";
|
||||
};
|
||||
export type CacheAccountType = (typeof CacheAccountType)[keyof typeof CacheAccountType];
|
||||
/**
|
||||
* Separators used in cache
|
||||
*/
|
||||
export declare const Separators: {
|
||||
readonly CACHE_KEY_SEPARATOR: "-";
|
||||
readonly CLIENT_INFO_SEPARATOR: ".";
|
||||
};
|
||||
export type Separators = (typeof Separators)[keyof typeof Separators];
|
||||
/**
|
||||
* Credential Type stored in the cache
|
||||
*/
|
||||
export declare const CredentialType: {
|
||||
readonly ID_TOKEN: "IdToken";
|
||||
readonly ACCESS_TOKEN: "AccessToken";
|
||||
readonly ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme";
|
||||
readonly REFRESH_TOKEN: "RefreshToken";
|
||||
};
|
||||
export type CredentialType = (typeof CredentialType)[keyof typeof CredentialType];
|
||||
/**
|
||||
* Combine all cache types
|
||||
*/
|
||||
export declare const CacheType: {
|
||||
readonly ADFS: 1001;
|
||||
readonly MSA: 1002;
|
||||
readonly MSSTS: 1003;
|
||||
readonly GENERIC: 1004;
|
||||
readonly ACCESS_TOKEN: 2001;
|
||||
readonly REFRESH_TOKEN: 2002;
|
||||
readonly ID_TOKEN: 2003;
|
||||
readonly APP_METADATA: 3001;
|
||||
readonly UNDEFINED: 9999;
|
||||
};
|
||||
export type CacheType = (typeof CacheType)[keyof typeof CacheType];
|
||||
/**
|
||||
* More Cache related constants
|
||||
*/
|
||||
export declare const APP_METADATA = "appmetadata";
|
||||
export declare const CLIENT_INFO = "client_info";
|
||||
export declare const THE_FAMILY_ID = "1";
|
||||
export declare const AUTHORITY_METADATA_CONSTANTS: {
|
||||
CACHE_KEY: string;
|
||||
REFRESH_TIME_SECONDS: number;
|
||||
};
|
||||
export declare const AuthorityMetadataSource: {
|
||||
readonly CONFIG: "config";
|
||||
readonly CACHE: "cache";
|
||||
readonly NETWORK: "network";
|
||||
readonly HARDCODED_VALUES: "hardcoded_values";
|
||||
};
|
||||
export type AuthorityMetadataSource = (typeof AuthorityMetadataSource)[keyof typeof AuthorityMetadataSource];
|
||||
export declare const SERVER_TELEM_CONSTANTS: {
|
||||
SCHEMA_VERSION: number;
|
||||
MAX_CUR_HEADER_BYTES: number;
|
||||
MAX_LAST_HEADER_BYTES: number;
|
||||
MAX_CACHED_ERRORS: number;
|
||||
CACHE_KEY: string;
|
||||
CATEGORY_SEPARATOR: string;
|
||||
VALUE_SEPARATOR: string;
|
||||
OVERFLOW_TRUE: string;
|
||||
OVERFLOW_FALSE: string;
|
||||
UNKNOWN_ERROR: string;
|
||||
};
|
||||
/**
|
||||
* Type of the authentication request
|
||||
*/
|
||||
export declare const AuthenticationScheme: {
|
||||
readonly BEARER: "Bearer";
|
||||
readonly POP: "pop";
|
||||
readonly SSH: "ssh-cert";
|
||||
};
|
||||
export type AuthenticationScheme = (typeof AuthenticationScheme)[keyof typeof AuthenticationScheme];
|
||||
/**
|
||||
* Constants related to throttling
|
||||
*/
|
||||
export declare const ThrottlingConstants: {
|
||||
DEFAULT_THROTTLE_TIME_SECONDS: number;
|
||||
DEFAULT_MAX_THROTTLE_TIME_SECONDS: number;
|
||||
THROTTLING_PREFIX: string;
|
||||
X_MS_LIB_CAPABILITY_VALUE: string;
|
||||
};
|
||||
export declare const Errors: {
|
||||
INVALID_GRANT_ERROR: string;
|
||||
CLIENT_MISMATCH_ERROR: string;
|
||||
};
|
||||
/**
|
||||
* Password grant parameters
|
||||
*/
|
||||
export declare const PasswordGrantConstants: {
|
||||
readonly username: "username";
|
||||
readonly password: "password";
|
||||
};
|
||||
export type PasswordGrantConstants = (typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants];
|
||||
/**
|
||||
* Response codes
|
||||
*/
|
||||
export declare const ResponseCodes: {
|
||||
readonly httpSuccess: 200;
|
||||
readonly httpBadRequest: 400;
|
||||
};
|
||||
export type ResponseCodes = (typeof ResponseCodes)[keyof typeof ResponseCodes];
|
||||
/**
|
||||
* Region Discovery Sources
|
||||
*/
|
||||
export declare const RegionDiscoverySources: {
|
||||
readonly FAILED_AUTO_DETECTION: "1";
|
||||
readonly INTERNAL_CACHE: "2";
|
||||
readonly ENVIRONMENT_VARIABLE: "3";
|
||||
readonly IMDS: "4";
|
||||
};
|
||||
export type RegionDiscoverySources = (typeof RegionDiscoverySources)[keyof typeof RegionDiscoverySources];
|
||||
/**
|
||||
* Region Discovery Outcomes
|
||||
*/
|
||||
export declare const RegionDiscoveryOutcomes: {
|
||||
readonly CONFIGURED_MATCHES_DETECTED: "1";
|
||||
readonly CONFIGURED_NO_AUTO_DETECTION: "2";
|
||||
readonly CONFIGURED_NOT_DETECTED: "3";
|
||||
readonly AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4";
|
||||
readonly AUTO_DETECTION_REQUESTED_FAILED: "5";
|
||||
};
|
||||
export type RegionDiscoveryOutcomes = (typeof RegionDiscoveryOutcomes)[keyof typeof RegionDiscoveryOutcomes];
|
||||
/**
|
||||
* Specifies the reason for fetching the access token from the identity provider
|
||||
*/
|
||||
export declare const CacheOutcome: {
|
||||
readonly NOT_APPLICABLE: "0";
|
||||
readonly FORCE_REFRESH_OR_CLAIMS: "1";
|
||||
readonly NO_CACHED_ACCESS_TOKEN: "2";
|
||||
readonly CACHED_ACCESS_TOKEN_EXPIRED: "3";
|
||||
readonly PROACTIVELY_REFRESHED: "4";
|
||||
};
|
||||
export type CacheOutcome = (typeof CacheOutcome)[keyof typeof CacheOutcome];
|
||||
export declare const JsonWebTokenTypes: {
|
||||
readonly Jwt: "JWT";
|
||||
readonly Jwk: "JWK";
|
||||
readonly Pop: "pop";
|
||||
};
|
||||
export type JsonWebTokenTypes = (typeof JsonWebTokenTypes)[keyof typeof JsonWebTokenTypes];
|
||||
export declare const ONE_DAY_IN_MS = 86400000;
|
||||
export declare const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
||||
//# sourceMappingURL=Constants.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../src/utils/Constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;CAmBb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,UAI/B,CAAC;AAEF,eAAO,MAAM,WAAW,UAAkD,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;CASd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;CAEtB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC7B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;CAGr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,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,WAAW,CAAC;AAGtC,eAAO,MAAM,gCAAgC,MAAM,CAAC"}
|
||||
322
node_modules/@azure/msal-common/dist/utils/Constants.mjs
generated
vendored
Normal file
322
node_modules/@azure/msal-common/dist/utils/Constants.mjs
generated
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-05 */
|
||||
'use strict';
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
const Constants = {
|
||||
LIBRARY_NAME: "MSAL.JS",
|
||||
SKU: "msal.js.common",
|
||||
// Prefix for all library cache entries
|
||||
CACHE_PREFIX: "msal",
|
||||
// default authority
|
||||
DEFAULT_AUTHORITY: "https://login.microsoftonline.com/common/",
|
||||
DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com",
|
||||
DEFAULT_COMMON_TENANT: "common",
|
||||
// ADFS String
|
||||
ADFS: "adfs",
|
||||
DSTS: "dstsv2",
|
||||
// Default AAD Instance Discovery Endpoint
|
||||
AAD_INSTANCE_DISCOVERY_ENDPT: "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",
|
||||
// CIAM URL
|
||||
CIAM_AUTH_URL: ".ciamlogin.com",
|
||||
AAD_TENANT_DOMAIN_SUFFIX: ".onmicrosoft.com",
|
||||
// Resource delimiter - used for certain cache entries
|
||||
RESOURCE_DELIM: "|",
|
||||
// Placeholder for non-existent account ids/objects
|
||||
NO_ACCOUNT: "NO_ACCOUNT",
|
||||
// Claims
|
||||
CLAIMS: "claims",
|
||||
// Consumer UTID
|
||||
CONSUMER_UTID: "9188040d-6c67-4c5b-b112-36a304b66dad",
|
||||
// Default scopes
|
||||
OPENID_SCOPE: "openid",
|
||||
PROFILE_SCOPE: "profile",
|
||||
OFFLINE_ACCESS_SCOPE: "offline_access",
|
||||
EMAIL_SCOPE: "email",
|
||||
// Default response type for authorization code flow
|
||||
CODE_RESPONSE_TYPE: "code",
|
||||
CODE_GRANT_TYPE: "authorization_code",
|
||||
RT_GRANT_TYPE: "refresh_token",
|
||||
FRAGMENT_RESPONSE_MODE: "fragment",
|
||||
S256_CODE_CHALLENGE_METHOD: "S256",
|
||||
URL_FORM_CONTENT_TYPE: "application/x-www-form-urlencoded;charset=utf-8",
|
||||
AUTHORIZATION_PENDING: "authorization_pending",
|
||||
NOT_DEFINED: "not_defined",
|
||||
EMPTY_STRING: "",
|
||||
NOT_APPLICABLE: "N/A",
|
||||
NOT_AVAILABLE: "Not Available",
|
||||
FORWARD_SLASH: "/",
|
||||
IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location",
|
||||
IMDS_VERSION: "2020-06-01",
|
||||
IMDS_TIMEOUT: 2000,
|
||||
AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect",
|
||||
REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com",
|
||||
KNOWN_PUBLIC_CLOUDS: [
|
||||
"login.microsoftonline.com",
|
||||
"login.windows.net",
|
||||
"login.microsoft.com",
|
||||
"sts.windows.net",
|
||||
],
|
||||
TOKEN_RESPONSE_TYPE: "token",
|
||||
ID_TOKEN_RESPONSE_TYPE: "id_token",
|
||||
SHR_NONCE_VALIDITY: 240,
|
||||
INVALID_INSTANCE: "invalid_instance",
|
||||
};
|
||||
const HttpStatus = {
|
||||
SUCCESS: 200,
|
||||
SUCCESS_RANGE_START: 200,
|
||||
SUCCESS_RANGE_END: 299,
|
||||
REDIRECT: 302,
|
||||
CLIENT_ERROR: 400,
|
||||
CLIENT_ERROR_RANGE_START: 400,
|
||||
BAD_REQUEST: 400,
|
||||
UNAUTHORIZED: 401,
|
||||
NOT_FOUND: 404,
|
||||
REQUEST_TIMEOUT: 408,
|
||||
TOO_MANY_REQUESTS: 429,
|
||||
CLIENT_ERROR_RANGE_END: 499,
|
||||
SERVER_ERROR: 500,
|
||||
SERVER_ERROR_RANGE_START: 500,
|
||||
SERVICE_UNAVAILABLE: 503,
|
||||
GATEWAY_TIMEOUT: 504,
|
||||
SERVER_ERROR_RANGE_END: 599,
|
||||
MULTI_SIDED_ERROR: 600,
|
||||
};
|
||||
const OIDC_DEFAULT_SCOPES = [
|
||||
Constants.OPENID_SCOPE,
|
||||
Constants.PROFILE_SCOPE,
|
||||
Constants.OFFLINE_ACCESS_SCOPE,
|
||||
];
|
||||
const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE];
|
||||
/**
|
||||
* Request header names
|
||||
*/
|
||||
const HeaderNames = {
|
||||
CONTENT_TYPE: "Content-Type",
|
||||
CONTENT_LENGTH: "Content-Length",
|
||||
RETRY_AFTER: "Retry-After",
|
||||
CCS_HEADER: "X-AnchorMailbox",
|
||||
WWWAuthenticate: "WWW-Authenticate",
|
||||
AuthenticationInfo: "Authentication-Info",
|
||||
X_MS_REQUEST_ID: "x-ms-request-id",
|
||||
X_MS_HTTP_VERSION: "x-ms-httpver",
|
||||
};
|
||||
/**
|
||||
* Persistent cache keys MSAL which stay while user is logged in.
|
||||
*/
|
||||
const PersistentCacheKeys = {
|
||||
ACTIVE_ACCOUNT_FILTERS: "active-account-filters", // new cache entry for active_account for a more robust version for browser
|
||||
};
|
||||
/**
|
||||
* String constants related to AAD Authority
|
||||
*/
|
||||
const AADAuthorityConstants = {
|
||||
COMMON: "common",
|
||||
ORGANIZATIONS: "organizations",
|
||||
CONSUMERS: "consumers",
|
||||
};
|
||||
/**
|
||||
* Claims request keys
|
||||
*/
|
||||
const ClaimsRequestKeys = {
|
||||
ACCESS_TOKEN: "access_token",
|
||||
XMS_CC: "xms_cc",
|
||||
};
|
||||
/**
|
||||
* we considered making this "enum" in the request instead of string, however it looks like the allowed list of
|
||||
* prompt values kept changing over past couple of years. There are some undocumented prompt values for some
|
||||
* internal partners too, hence the choice of generic "string" type instead of the "enum"
|
||||
*/
|
||||
const PromptValue = {
|
||||
LOGIN: "login",
|
||||
SELECT_ACCOUNT: "select_account",
|
||||
CONSENT: "consent",
|
||||
NONE: "none",
|
||||
CREATE: "create",
|
||||
NO_SESSION: "no_session",
|
||||
};
|
||||
/**
|
||||
* allowed values for codeVerifier
|
||||
*/
|
||||
const CodeChallengeMethodValues = {
|
||||
PLAIN: "plain",
|
||||
S256: "S256",
|
||||
};
|
||||
/**
|
||||
* allowed values for server response type
|
||||
*/
|
||||
const ServerResponseType = {
|
||||
QUERY: "query",
|
||||
FRAGMENT: "fragment",
|
||||
};
|
||||
/**
|
||||
* allowed values for response_mode
|
||||
*/
|
||||
const ResponseMode = {
|
||||
...ServerResponseType,
|
||||
FORM_POST: "form_post",
|
||||
};
|
||||
/**
|
||||
* allowed grant_type
|
||||
*/
|
||||
const GrantType = {
|
||||
IMPLICIT_GRANT: "implicit",
|
||||
AUTHORIZATION_CODE_GRANT: "authorization_code",
|
||||
CLIENT_CREDENTIALS_GRANT: "client_credentials",
|
||||
RESOURCE_OWNER_PASSWORD_GRANT: "password",
|
||||
REFRESH_TOKEN_GRANT: "refresh_token",
|
||||
DEVICE_CODE_GRANT: "device_code",
|
||||
JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
||||
};
|
||||
/**
|
||||
* Account types in Cache
|
||||
*/
|
||||
const CacheAccountType = {
|
||||
MSSTS_ACCOUNT_TYPE: "MSSTS",
|
||||
ADFS_ACCOUNT_TYPE: "ADFS",
|
||||
MSAV1_ACCOUNT_TYPE: "MSA",
|
||||
GENERIC_ACCOUNT_TYPE: "Generic", // NTLM, Kerberos, FBA, Basic etc
|
||||
};
|
||||
/**
|
||||
* Separators used in cache
|
||||
*/
|
||||
const Separators = {
|
||||
CACHE_KEY_SEPARATOR: "-",
|
||||
CLIENT_INFO_SEPARATOR: ".",
|
||||
};
|
||||
/**
|
||||
* Credential Type stored in the cache
|
||||
*/
|
||||
const CredentialType = {
|
||||
ID_TOKEN: "IdToken",
|
||||
ACCESS_TOKEN: "AccessToken",
|
||||
ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme",
|
||||
REFRESH_TOKEN: "RefreshToken",
|
||||
};
|
||||
/**
|
||||
* Combine all cache types
|
||||
*/
|
||||
const CacheType = {
|
||||
ADFS: 1001,
|
||||
MSA: 1002,
|
||||
MSSTS: 1003,
|
||||
GENERIC: 1004,
|
||||
ACCESS_TOKEN: 2001,
|
||||
REFRESH_TOKEN: 2002,
|
||||
ID_TOKEN: 2003,
|
||||
APP_METADATA: 3001,
|
||||
UNDEFINED: 9999,
|
||||
};
|
||||
/**
|
||||
* More Cache related constants
|
||||
*/
|
||||
const APP_METADATA = "appmetadata";
|
||||
const CLIENT_INFO = "client_info";
|
||||
const THE_FAMILY_ID = "1";
|
||||
const AUTHORITY_METADATA_CONSTANTS = {
|
||||
CACHE_KEY: "authority-metadata",
|
||||
REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours
|
||||
};
|
||||
const AuthorityMetadataSource = {
|
||||
CONFIG: "config",
|
||||
CACHE: "cache",
|
||||
NETWORK: "network",
|
||||
HARDCODED_VALUES: "hardcoded_values",
|
||||
};
|
||||
const SERVER_TELEM_CONSTANTS = {
|
||||
SCHEMA_VERSION: 5,
|
||||
MAX_CUR_HEADER_BYTES: 80,
|
||||
MAX_LAST_HEADER_BYTES: 330,
|
||||
MAX_CACHED_ERRORS: 50,
|
||||
CACHE_KEY: "server-telemetry",
|
||||
CATEGORY_SEPARATOR: "|",
|
||||
VALUE_SEPARATOR: ",",
|
||||
OVERFLOW_TRUE: "1",
|
||||
OVERFLOW_FALSE: "0",
|
||||
UNKNOWN_ERROR: "unknown_error",
|
||||
};
|
||||
/**
|
||||
* Type of the authentication request
|
||||
*/
|
||||
const AuthenticationScheme = {
|
||||
BEARER: "Bearer",
|
||||
POP: "pop",
|
||||
SSH: "ssh-cert",
|
||||
};
|
||||
/**
|
||||
* Constants related to throttling
|
||||
*/
|
||||
const ThrottlingConstants = {
|
||||
// Default time to throttle RequestThumbprint in seconds
|
||||
DEFAULT_THROTTLE_TIME_SECONDS: 60,
|
||||
// Default maximum time to throttle in seconds, overrides what the server sends back
|
||||
DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600,
|
||||
// Prefix for storing throttling entries
|
||||
THROTTLING_PREFIX: "throttling",
|
||||
// Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling
|
||||
X_MS_LIB_CAPABILITY_VALUE: "retry-after, h429",
|
||||
};
|
||||
const Errors = {
|
||||
INVALID_GRANT_ERROR: "invalid_grant",
|
||||
CLIENT_MISMATCH_ERROR: "client_mismatch",
|
||||
};
|
||||
/**
|
||||
* Password grant parameters
|
||||
*/
|
||||
const PasswordGrantConstants = {
|
||||
username: "username",
|
||||
password: "password",
|
||||
};
|
||||
/**
|
||||
* Response codes
|
||||
*/
|
||||
const ResponseCodes = {
|
||||
httpSuccess: 200,
|
||||
httpBadRequest: 400,
|
||||
};
|
||||
/**
|
||||
* Region Discovery Sources
|
||||
*/
|
||||
const RegionDiscoverySources = {
|
||||
FAILED_AUTO_DETECTION: "1",
|
||||
INTERNAL_CACHE: "2",
|
||||
ENVIRONMENT_VARIABLE: "3",
|
||||
IMDS: "4",
|
||||
};
|
||||
/**
|
||||
* Region Discovery Outcomes
|
||||
*/
|
||||
const RegionDiscoveryOutcomes = {
|
||||
CONFIGURED_MATCHES_DETECTED: "1",
|
||||
CONFIGURED_NO_AUTO_DETECTION: "2",
|
||||
CONFIGURED_NOT_DETECTED: "3",
|
||||
AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4",
|
||||
AUTO_DETECTION_REQUESTED_FAILED: "5",
|
||||
};
|
||||
/**
|
||||
* Specifies the reason for fetching the access token from the identity provider
|
||||
*/
|
||||
const CacheOutcome = {
|
||||
// When a token is found in the cache or the cache is not supposed to be hit when making the request
|
||||
NOT_APPLICABLE: "0",
|
||||
// When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested
|
||||
FORCE_REFRESH_OR_CLAIMS: "1",
|
||||
// When the token request goes to the identity provider because no cached access token exists
|
||||
NO_CACHED_ACCESS_TOKEN: "2",
|
||||
// When the token request goes to the identity provider because cached access token expired
|
||||
CACHED_ACCESS_TOKEN_EXPIRED: "3",
|
||||
// When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed
|
||||
PROACTIVELY_REFRESHED: "4",
|
||||
};
|
||||
const JsonWebTokenTypes = {
|
||||
Jwt: "JWT",
|
||||
Jwk: "JWK",
|
||||
Pop: "pop",
|
||||
};
|
||||
const ONE_DAY_IN_MS = 86400000;
|
||||
// Token renewal offset default in seconds
|
||||
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
||||
|
||||
export { AADAuthorityConstants, APP_METADATA, AUTHORITY_METADATA_CONSTANTS, AuthenticationScheme, AuthorityMetadataSource, CLIENT_INFO, CacheAccountType, CacheOutcome, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Errors, GrantType, HeaderNames, HttpStatus, JsonWebTokenTypes, OIDC_DEFAULT_SCOPES, OIDC_SCOPES, ONE_DAY_IN_MS, PasswordGrantConstants, PersistentCacheKeys, PromptValue, RegionDiscoveryOutcomes, RegionDiscoverySources, ResponseCodes, ResponseMode, SERVER_TELEM_CONSTANTS, Separators, ServerResponseType, THE_FAMILY_ID, ThrottlingConstants };
|
||||
//# sourceMappingURL=Constants.mjs.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/Constants.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/Constants.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
28
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts
generated
vendored
Normal file
28
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Logger } from "../logger/Logger.js";
|
||||
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
|
||||
/**
|
||||
* Wraps a function with a performance measurement.
|
||||
* Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction)
|
||||
* @param callback
|
||||
* @param eventName
|
||||
* @param logger
|
||||
* @param telemetryClient
|
||||
* @param correlationId
|
||||
* @returns
|
||||
* @internal
|
||||
*/
|
||||
export declare const invoke: <T extends any[], U>(callback: (...args: T) => U, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => U;
|
||||
/**
|
||||
* Wraps an async function with a performance measurement.
|
||||
* Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction)
|
||||
* @param callback
|
||||
* @param eventName
|
||||
* @param logger
|
||||
* @param telemetryClient
|
||||
* @param correlationId
|
||||
* @returns
|
||||
* @internal
|
||||
*
|
||||
*/
|
||||
export declare const invokeAsync: <T extends any[], U>(callback: (...args: T) => Promise<U>, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => Promise<U>;
|
||||
//# sourceMappingURL=FunctionWrappers.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"FunctionWrappers.d.ts","sourceRoot":"","sources":["../../src/utils/FunctionWrappers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,+DAEJ,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,sBAuCzB,CAAC;AAEF;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,wEAET,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,+BAyCzB,CAAC"}
|
||||
99
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs
generated
vendored
Normal file
99
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-05 */
|
||||
'use strict';
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* Wraps a function with a performance measurement.
|
||||
* Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction)
|
||||
* @param callback
|
||||
* @param eventName
|
||||
* @param logger
|
||||
* @param telemetryClient
|
||||
* @param correlationId
|
||||
* @returns
|
||||
* @internal
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const invoke = (callback, eventName, logger, telemetryClient, correlationId) => {
|
||||
return (...args) => {
|
||||
logger.trace(`Executing function ${eventName}`);
|
||||
const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);
|
||||
if (correlationId) {
|
||||
// Track number of times this API is called in a single request
|
||||
const eventCount = eventName + "CallCount";
|
||||
telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);
|
||||
}
|
||||
try {
|
||||
const result = callback(...args);
|
||||
inProgressEvent?.end({
|
||||
success: true,
|
||||
});
|
||||
logger.trace(`Returning result from ${eventName}`);
|
||||
return result;
|
||||
}
|
||||
catch (e) {
|
||||
logger.trace(`Error occurred in ${eventName}`);
|
||||
try {
|
||||
logger.trace(JSON.stringify(e));
|
||||
}
|
||||
catch (e) {
|
||||
logger.trace("Unable to print error message.");
|
||||
}
|
||||
inProgressEvent?.end({
|
||||
success: false,
|
||||
}, e);
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Wraps an async function with a performance measurement.
|
||||
* Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction)
|
||||
* @param callback
|
||||
* @param eventName
|
||||
* @param logger
|
||||
* @param telemetryClient
|
||||
* @param correlationId
|
||||
* @returns
|
||||
* @internal
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId) => {
|
||||
return (...args) => {
|
||||
logger.trace(`Executing function ${eventName}`);
|
||||
const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);
|
||||
if (correlationId) {
|
||||
// Track number of times this API is called in a single request
|
||||
const eventCount = eventName + "CallCount";
|
||||
telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);
|
||||
}
|
||||
telemetryClient?.setPreQueueTime(eventName, correlationId);
|
||||
return callback(...args)
|
||||
.then((response) => {
|
||||
logger.trace(`Returning result from ${eventName}`);
|
||||
inProgressEvent?.end({
|
||||
success: true,
|
||||
});
|
||||
return response;
|
||||
})
|
||||
.catch((e) => {
|
||||
logger.trace(`Error occurred in ${eventName}`);
|
||||
try {
|
||||
logger.trace(JSON.stringify(e));
|
||||
}
|
||||
catch (e) {
|
||||
logger.trace("Unable to print error message.");
|
||||
}
|
||||
inProgressEvent?.end({
|
||||
success: false,
|
||||
}, e);
|
||||
throw e;
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
export { invoke, invokeAsync };
|
||||
//# sourceMappingURL=FunctionWrappers.mjs.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"FunctionWrappers.mjs","sources":["../../src/utils/FunctionWrappers.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAKH;;;;;;;;;;AAUG;AACH;AACO,MAAM,MAAM,GAAG,CAClB,QAA2B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AAC;AACF,YAAA,MAAM,CAAC,CAAC;AACZ,SAAC,CAAC,CAAC;AACX,KAAC,CAAC;AACN;;;;"}
|
||||
7
node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts
generated
vendored
Normal file
7
node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Key-Value type to support queryParams, extraQueryParams and claims
|
||||
*/
|
||||
export type StringDict = {
|
||||
[key: string]: string;
|
||||
};
|
||||
//# sourceMappingURL=MsalTypes.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"MsalTypes.d.ts","sourceRoot":"","sources":["../../src/utils/MsalTypes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC"}
|
||||
43
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts
generated
vendored
Normal file
43
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import { ICrypto } from "../crypto/ICrypto.js";
|
||||
/**
|
||||
* Type which defines the object that is stringified, encoded and sent in the state value.
|
||||
* Contains the following:
|
||||
* - id - unique identifier for this request
|
||||
* - ts - timestamp for the time the request was made. Used to ensure that token expiration is not calculated incorrectly.
|
||||
* - platformState - string value sent from the platform.
|
||||
*/
|
||||
export type LibraryStateObject = {
|
||||
id: string;
|
||||
meta?: Record<string, string>;
|
||||
};
|
||||
/**
|
||||
* Type which defines the stringified and encoded object sent to the service in the authorize request.
|
||||
*/
|
||||
export type RequestStateObject = {
|
||||
userRequestState: string;
|
||||
libraryState: LibraryStateObject;
|
||||
};
|
||||
/**
|
||||
* Class which provides helpers for OAuth 2.0 protocol specific values
|
||||
*/
|
||||
export declare class ProtocolUtils {
|
||||
/**
|
||||
* Appends user state with random guid, or returns random guid.
|
||||
* @param userState
|
||||
* @param randomGuid
|
||||
*/
|
||||
static setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record<string, string>): string;
|
||||
/**
|
||||
* Generates the state value used by the common library.
|
||||
* @param randomGuid
|
||||
* @param cryptoObj
|
||||
*/
|
||||
static generateLibraryState(cryptoObj: ICrypto, meta?: Record<string, string>): string;
|
||||
/**
|
||||
* Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
|
||||
* @param state
|
||||
* @param cryptoObj
|
||||
*/
|
||||
static parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject;
|
||||
}
|
||||
//# sourceMappingURL=ProtocolUtils.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ProtocolUtils.d.ts","sourceRoot":"","sources":["../../src/utils/ProtocolUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAM/C;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,kBAAkB,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACtB;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,OAAO,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAUT;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CACvB,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAmBT;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CACpB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,MAAM,GACd,kBAAkB;CA6BxB"}
|
||||
78
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs
generated
vendored
Normal file
78
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-05 */
|
||||
'use strict';
|
||||
import { Constants } from './Constants.mjs';
|
||||
import { createClientAuthError } from '../error/ClientAuthError.mjs';
|
||||
import { noCryptoObject, invalidState } from '../error/ClientAuthErrorCodes.mjs';
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* Class which provides helpers for OAuth 2.0 protocol specific values
|
||||
*/
|
||||
class ProtocolUtils {
|
||||
/**
|
||||
* Appends user state with random guid, or returns random guid.
|
||||
* @param userState
|
||||
* @param randomGuid
|
||||
*/
|
||||
static setRequestState(cryptoObj, userState, meta) {
|
||||
const libraryState = ProtocolUtils.generateLibraryState(cryptoObj, meta);
|
||||
return userState
|
||||
? `${libraryState}${Constants.RESOURCE_DELIM}${userState}`
|
||||
: libraryState;
|
||||
}
|
||||
/**
|
||||
* Generates the state value used by the common library.
|
||||
* @param randomGuid
|
||||
* @param cryptoObj
|
||||
*/
|
||||
static generateLibraryState(cryptoObj, meta) {
|
||||
if (!cryptoObj) {
|
||||
throw createClientAuthError(noCryptoObject);
|
||||
}
|
||||
// Create a state object containing a unique id and the timestamp of the request creation
|
||||
const stateObj = {
|
||||
id: cryptoObj.createNewGuid(),
|
||||
};
|
||||
if (meta) {
|
||||
stateObj.meta = meta;
|
||||
}
|
||||
const stateString = JSON.stringify(stateObj);
|
||||
return cryptoObj.base64Encode(stateString);
|
||||
}
|
||||
/**
|
||||
* Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
|
||||
* @param state
|
||||
* @param cryptoObj
|
||||
*/
|
||||
static parseRequestState(cryptoObj, state) {
|
||||
if (!cryptoObj) {
|
||||
throw createClientAuthError(noCryptoObject);
|
||||
}
|
||||
if (!state) {
|
||||
throw createClientAuthError(invalidState);
|
||||
}
|
||||
try {
|
||||
// Split the state between library state and user passed state and decode them separately
|
||||
const splitState = state.split(Constants.RESOURCE_DELIM);
|
||||
const libraryState = splitState[0];
|
||||
const userState = splitState.length > 1
|
||||
? splitState.slice(1).join(Constants.RESOURCE_DELIM)
|
||||
: Constants.EMPTY_STRING;
|
||||
const libraryStateString = cryptoObj.base64Decode(libraryState);
|
||||
const libraryStateObj = JSON.parse(libraryStateString);
|
||||
return {
|
||||
userRequestState: userState || Constants.EMPTY_STRING,
|
||||
libraryState: libraryStateObj,
|
||||
};
|
||||
}
|
||||
catch (e) {
|
||||
throw createClientAuthError(invalidState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { ProtocolUtils };
|
||||
//# sourceMappingURL=ProtocolUtils.mjs.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ProtocolUtils.mjs","sources":["../../src/utils/ProtocolUtils.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.noCryptoObject","ClientAuthErrorCodes.invalidState"],"mappings":";;;;;;AAAA;;;AAGG;AA6BH;;AAEG;MACU,aAAa,CAAA;AACtB;;;;AAIG;AACH,IAAA,OAAO,eAAe,CAClB,SAAkB,EAClB,S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AC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC;AACpD,kBAAE,SAAS,CAAC,YAAY,CAAC;YACjC,MAAM,kBAAkB,GAAG,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YAChE,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAC9B,kBAAkB,CACC,CAAC;YACxB,OAAO;AACH,gBAAA,gBAAgB,EAAE,SAAS,IAAI,SAAS,CAAC,YAAY;AACrD,gBAAA,YAAY,EAAE,eAAe;aAChC,CAAC;AACL,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,MAAM,qBAAqB,CAACA,YAAiC,CAAC,CAAC;AAClE,SAAA;KACJ;AACJ;;;;"}
|
||||
41
node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts
generated
vendored
Normal file
41
node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export declare class StringUtils {
|
||||
/**
|
||||
* Check if stringified object is empty
|
||||
* @param strObj
|
||||
*/
|
||||
static isEmptyObj(strObj?: string): boolean;
|
||||
static startsWith(str: string, search: string): boolean;
|
||||
static endsWith(str: string, search: string): boolean;
|
||||
/**
|
||||
* Parses string into an object.
|
||||
*
|
||||
* @param query
|
||||
*/
|
||||
static queryStringToObject<T>(query: string): T;
|
||||
/**
|
||||
* Trims entries in an array.
|
||||
*
|
||||
* @param arr
|
||||
*/
|
||||
static trimArrayEntries(arr: Array<string>): Array<string>;
|
||||
/**
|
||||
* Removes empty strings from array
|
||||
* @param arr
|
||||
*/
|
||||
static removeEmptyStringsFromArray(arr: Array<string>): Array<string>;
|
||||
/**
|
||||
* Attempts to parse a string into JSON
|
||||
* @param str
|
||||
*/
|
||||
static jsonParseHelper<T>(str: string): T | null;
|
||||
/**
|
||||
* Tests if a given string matches a given pattern, with support for wildcards and queries.
|
||||
* @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries
|
||||
* @param input String to match against
|
||||
*/
|
||||
static matchPattern(pattern: string, input: string): boolean;
|
||||
}
|
||||
//# sourceMappingURL=StringUtils.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../../src/utils/StringUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,WAAW;IACpB;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;IAU3C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvD,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAOrD;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;IAe/C;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAI1D;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAMrE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAQhD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAe/D"}
|
||||
100
node_modules/@azure/msal-common/dist/utils/StringUtils.mjs
generated
vendored
Normal file
100
node_modules/@azure/msal-common/dist/utils/StringUtils.mjs
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-05 */
|
||||
'use strict';
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
class StringUtils {
|
||||
/**
|
||||
* Check if stringified object is empty
|
||||
* @param strObj
|
||||
*/
|
||||
static isEmptyObj(strObj) {
|
||||
if (strObj) {
|
||||
try {
|
||||
const obj = JSON.parse(strObj);
|
||||
return Object.keys(obj).length === 0;
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
static startsWith(str, search) {
|
||||
return str.indexOf(search) === 0;
|
||||
}
|
||||
static endsWith(str, search) {
|
||||
return (str.length >= search.length &&
|
||||
str.lastIndexOf(search) === str.length - search.length);
|
||||
}
|
||||
/**
|
||||
* Parses string into an object.
|
||||
*
|
||||
* @param query
|
||||
*/
|
||||
static queryStringToObject(query) {
|
||||
const obj = {};
|
||||
const params = query.split("&");
|
||||
const decode = (s) => decodeURIComponent(s.replace(/\+/g, " "));
|
||||
params.forEach((pair) => {
|
||||
if (pair.trim()) {
|
||||
const [key, value] = pair.split(/=(.+)/g, 2); // Split on the first occurence of the '=' character
|
||||
if (key && value) {
|
||||
obj[decode(key)] = decode(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
/**
|
||||
* Trims entries in an array.
|
||||
*
|
||||
* @param arr
|
||||
*/
|
||||
static trimArrayEntries(arr) {
|
||||
return arr.map((entry) => entry.trim());
|
||||
}
|
||||
/**
|
||||
* Removes empty strings from array
|
||||
* @param arr
|
||||
*/
|
||||
static removeEmptyStringsFromArray(arr) {
|
||||
return arr.filter((entry) => {
|
||||
return !!entry;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Attempts to parse a string into JSON
|
||||
* @param str
|
||||
*/
|
||||
static jsonParseHelper(str) {
|
||||
try {
|
||||
return JSON.parse(str);
|
||||
}
|
||||
catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Tests if a given string matches a given pattern, with support for wildcards and queries.
|
||||
* @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries
|
||||
* @param input String to match against
|
||||
*/
|
||||
static matchPattern(pattern, input) {
|
||||
/**
|
||||
* Wildcard support: https://stackoverflow.com/a/3117248/4888559
|
||||
* Queries: replaces "?" in string with escaped "\?" for regex test
|
||||
*/
|
||||
// eslint-disable-next-line security/detect-non-literal-regexp
|
||||
const regex = new RegExp(pattern
|
||||
.replace(/\\/g, "\\\\")
|
||||
.replace(/\*/g, "[^ ]*")
|
||||
.replace(/\?/g, "\\?"));
|
||||
return regex.test(input);
|
||||
}
|
||||
}
|
||||
|
||||
export { StringUtils };
|
||||
//# sourceMappingURL=StringUtils.mjs.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/StringUtils.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/StringUtils.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"StringUtils.mjs","sources":["../../src/utils/StringUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;MACU,WAAW,CAAA;AACpB;;;AAGG;IACH,OAAO,UAAU,CAAC,MAAe,EAAA;AAC7B,QAAA,IAAI,MAAM,EAAE;YACR,IAAI;gBACA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACxC,aAAA;YAAC,OAAO,CAAC,EAAE,GAAE;AACjB,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;KACf;AAED,IAAA,OAAO,UAAU,CAAC,GAAW,EAAE,MAAc,EAAA;QACzC,OAAO,GAAG,CAAC,OAAO,CAAC,MA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AAC,CAAC,KAAK,CAAC;AACnB,SAAC,CAAC,CAAC;KACN;AAED;;;AAGG;IACH,OAAO,eAAe,CAAI,GAAW,EAAA;QACjC,IAAI;AACA,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAM,CAAC;AAC/B,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;KACJ;AAED;;;;AAIG;AACH,IAAA,OAAO,YAAY,CAAC,OAAe,EAAE,KAAa,EAAA;AAC9C;;;AAGG;;AAEH,QAAA,MAAM,KAAK,GAAW,IAAI,MAAM,CAC5B,OAAO;AACF,aAAA,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;AACtB,aAAA,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC;AACvB,aAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAC7B,CAAC;AAEF,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5B;AACJ;;;;"}
|
||||
26
node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts
generated
vendored
Normal file
26
node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Utility functions for managing date and time operations.
|
||||
*/
|
||||
/**
|
||||
* return the current time in Unix time (seconds).
|
||||
*/
|
||||
export declare function nowSeconds(): number;
|
||||
/**
|
||||
* check if a token is expired based on given UTC time in seconds.
|
||||
* @param expiresOn
|
||||
*/
|
||||
export declare function isTokenExpired(expiresOn: string, offset: number): boolean;
|
||||
/**
|
||||
* If the current time is earlier than the time that a token was cached at, we must discard the token
|
||||
* i.e. The system clock was turned back after acquiring the cached token
|
||||
* @param cachedAt
|
||||
* @param offset
|
||||
*/
|
||||
export declare function wasClockTurnedBack(cachedAt: string): boolean;
|
||||
/**
|
||||
* Waits for t number of milliseconds
|
||||
* @param t number
|
||||
* @param value T
|
||||
*/
|
||||
export declare function delay<T>(t: number, value?: T): Promise<T | void>;
|
||||
//# sourceMappingURL=TimeUtils.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TimeUtils.d.ts","sourceRoot":"","sources":["../../src/utils/TimeUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAGnC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAOzE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAEhE"}
|
||||
48
node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs
generated
vendored
Normal file
48
node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-05 */
|
||||
'use strict';
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* Utility functions for managing date and time operations.
|
||||
*/
|
||||
/**
|
||||
* return the current time in Unix time (seconds).
|
||||
*/
|
||||
function nowSeconds() {
|
||||
// Date.getTime() returns in milliseconds.
|
||||
return Math.round(new Date().getTime() / 1000.0);
|
||||
}
|
||||
/**
|
||||
* check if a token is expired based on given UTC time in seconds.
|
||||
* @param expiresOn
|
||||
*/
|
||||
function isTokenExpired(expiresOn, offset) {
|
||||
// check for access token expiry
|
||||
const expirationSec = Number(expiresOn) || 0;
|
||||
const offsetCurrentTimeSec = nowSeconds() + offset;
|
||||
// If current time + offset is greater than token expiration time, then token is expired.
|
||||
return offsetCurrentTimeSec > expirationSec;
|
||||
}
|
||||
/**
|
||||
* If the current time is earlier than the time that a token was cached at, we must discard the token
|
||||
* i.e. The system clock was turned back after acquiring the cached token
|
||||
* @param cachedAt
|
||||
* @param offset
|
||||
*/
|
||||
function wasClockTurnedBack(cachedAt) {
|
||||
const cachedAtSec = Number(cachedAt);
|
||||
return cachedAtSec > nowSeconds();
|
||||
}
|
||||
/**
|
||||
* Waits for t number of milliseconds
|
||||
* @param t number
|
||||
* @param value T
|
||||
*/
|
||||
function delay(t, value) {
|
||||
return new Promise((resolve) => setTimeout(() => resolve(value), t));
|
||||
}
|
||||
|
||||
export { delay, isTokenExpired, nowSeconds, wasClockTurnedBack };
|
||||
//# sourceMappingURL=TimeUtils.mjs.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TimeUtils.mjs","sources":["../../src/utils/TimeUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;AAEH;;AAEG;SACa,UAAU,GAAA;;AAEtB,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;AACrD,CAAC;AAED;;;AAGG;AACa,SAAA,cAAc,CAAC,SAAiB,EAAE,MAAc,EAAA;;IAE5D,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC7C,IAAA,MAAM,oBAAoB,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;;IAGnD,OAAO,oBAAoB,GAAG,aAAa,CAAC;AAChD,CAAC;AAED;;;;;AAKG;AACG,SAAU,kBAAkB,CAAC,QAAgB,EAAA;AAC/C,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAErC,IAAA,OAAO,WAAW,GAAG,UAAU,EAAE,CAAC;AACtC,CAAC;AAED;;;;AAIG;AACa,SAAA,KAAK,CAAI,CAAS,EAAE,KAAS,EAAA;IACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE;;;;"}
|
||||
11
node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts
generated
vendored
Normal file
11
node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js";
|
||||
/**
|
||||
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
||||
* @param hashString
|
||||
*/
|
||||
export declare function stripLeadingHashOrQuery(responseString: string): string;
|
||||
/**
|
||||
* Returns URL hash as server auth code response object.
|
||||
*/
|
||||
export declare function getDeserializedResponse(responseString: string): ServerAuthorizationCodeResponse | null;
|
||||
//# sourceMappingURL=UrlUtils.d.ts.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"UrlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/UrlUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AAMjG;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAWtE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,cAAc,EAAE,MAAM,GACvB,+BAA+B,GAAG,IAAI,CA0BxC"}
|
||||
52
node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs
generated
vendored
Normal file
52
node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-05 */
|
||||
'use strict';
|
||||
import { createClientAuthError } from '../error/ClientAuthError.mjs';
|
||||
import { hashNotDeserialized } from '../error/ClientAuthErrorCodes.mjs';
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
||||
* @param hashString
|
||||
*/
|
||||
function stripLeadingHashOrQuery(responseString) {
|
||||
if (responseString.startsWith("#/")) {
|
||||
return responseString.substring(2);
|
||||
}
|
||||
else if (responseString.startsWith("#") ||
|
||||
responseString.startsWith("?")) {
|
||||
return responseString.substring(1);
|
||||
}
|
||||
return responseString;
|
||||
}
|
||||
/**
|
||||
* Returns URL hash as server auth code response object.
|
||||
*/
|
||||
function getDeserializedResponse(responseString) {
|
||||
// Check if given hash is empty
|
||||
if (!responseString || responseString.indexOf("=") < 0) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
// Strip the # or ? symbol if present
|
||||
const normalizedResponse = stripLeadingHashOrQuery(responseString);
|
||||
// If # symbol was not present, above will return empty string, so give original hash value
|
||||
const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse));
|
||||
// Check for known response properties
|
||||
if (deserializedHash.code ||
|
||||
deserializedHash.error ||
|
||||
deserializedHash.error_description ||
|
||||
deserializedHash.state) {
|
||||
return deserializedHash;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
throw createClientAuthError(hashNotDeserialized);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export { getDeserializedResponse, stripLeadingHashOrQuery };
|
||||
//# sourceMappingURL=UrlUtils.mjs.map
|
||||
1
node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"UrlUtils.mjs","sources":["../../src/utils/UrlUtils.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.hashNotDeserialized"],"mappings":";;;;;AAAA;;;AAGG;AAQH;;;AAGG;AACG,SAAU,uBAAuB,CAAC,cAAsB,EAAA;AAC1D,IAAA,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACjC,QAAA,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACtC,KAAA;AAAM,SAAA,IACH,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC;AAC9B,QAAA,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAChC;AACE,QAAA,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACtC,KAAA;AAED,IAAA,OAAO,cAAc,CAAC;AAC1B,CAAC;AAED;;AAEG;AACG,SAAU,uBAAuB,CACnC,cAAsB,EAAA;;IAGtB,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AACpD,QAAA,OAAO,IAAI,CAAC;AACf,KAAA;IACD,IAAI;;AAEA,QAAA,MAAM,kBAAkB,GAAG,uBAAuB,CAAC,cAAc,CAAC,CAAC;;AAEnE,QAAA,MAAM,gBAAgB,GAClB,MAAM,CAAC,WAAW,CAAC,IAAI,eAAe,CAAC,kBAAkB,CAAC,CAAC,CAAC;;QAGhE,IACI,gBAAgB,CAAC,IAAI;AACrB,YAAA,gBAAgB,CAAC,KAAK;AACtB,YAAA,gBAAgB,CAAC,iBAAiB;YAClC,gBAAgB,CAAC,KAAK,EACxB;AACE,YAAA,OAAO,gBAAgB,CAAC;AAC3B,SAAA;AACJ,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACR,QAAA,MAAM,qBAAqB,CAACA,mBAAwC,CAAC,CAAC;AACzE,KAAA;AAED,IAAA,OAAO,IAAI,CAAC;AAChB;;;;"}
|
||||
Reference in New Issue
Block a user