@azure/msal-browser 2.38.4 → 2.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/_virtual/_tslib.js +1 -1
- package/dist/app/ClientApplication.js +3 -3
- package/dist/app/ClientApplication.js.map +1 -1
- package/dist/app/IPublicClientApplication.d.ts +1 -0
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.js +5 -2
- package/dist/app/IPublicClientApplication.js.map +1 -1
- package/dist/app/PublicClientApplication.d.ts +8 -0
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.js +30 -3
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
- package/dist/cache/AsyncMemoryStorage.js +1 -1
- package/dist/cache/AsyncMemoryStorage.js.map +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +11 -1
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.js +31 -3
- package/dist/cache/BrowserCacheManager.js.map +1 -1
- package/dist/cache/BrowserStorage.js +1 -1
- package/dist/cache/BrowserStorage.js.map +1 -1
- package/dist/cache/CryptoKeyStore.js +1 -1
- package/dist/cache/CryptoKeyStore.js.map +1 -1
- package/dist/cache/DatabaseStorage.js +1 -1
- package/dist/cache/DatabaseStorage.js.map +1 -1
- package/dist/cache/MemoryStorage.js +1 -1
- package/dist/cache/MemoryStorage.js.map +1 -1
- package/dist/cache/TokenCache.d.ts +1 -0
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.js +18 -18
- package/dist/cache/TokenCache.js.map +1 -1
- package/dist/config/Configuration.js +1 -1
- package/dist/config/Configuration.js.map +1 -1
- package/dist/crypto/BrowserCrypto.js +1 -1
- package/dist/crypto/BrowserCrypto.js.map +1 -1
- package/dist/crypto/CryptoOps.js +1 -1
- package/dist/crypto/CryptoOps.js.map +1 -1
- package/dist/crypto/GuidGenerator.js +1 -1
- package/dist/crypto/GuidGenerator.js.map +1 -1
- package/dist/crypto/ModernBrowserCrypto.js +1 -1
- package/dist/crypto/ModernBrowserCrypto.js.map +1 -1
- package/dist/crypto/MsBrowserCrypto.js +1 -1
- package/dist/crypto/MsBrowserCrypto.js.map +1 -1
- package/dist/crypto/MsrBrowserCrypto.js +1 -1
- package/dist/crypto/MsrBrowserCrypto.js.map +1 -1
- package/dist/crypto/PkceGenerator.js +1 -1
- package/dist/crypto/PkceGenerator.js.map +1 -1
- package/dist/crypto/SignedHttpRequest.js +1 -1
- package/dist/crypto/SignedHttpRequest.js.map +1 -1
- package/dist/encode/Base64Decode.js +1 -1
- package/dist/encode/Base64Decode.js.map +1 -1
- package/dist/encode/Base64Encode.js +1 -1
- package/dist/encode/Base64Encode.js.map +1 -1
- package/dist/error/BrowserAuthError.js +1 -1
- package/dist/error/BrowserAuthError.js.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.js +1 -1
- package/dist/error/BrowserConfigurationAuthError.js.map +1 -1
- package/dist/error/NativeAuthError.js +1 -1
- package/dist/error/NativeAuthError.js.map +1 -1
- package/dist/event/EventHandler.js +1 -1
- package/dist/event/EventHandler.js.map +1 -1
- package/dist/event/EventMessage.js +1 -1
- package/dist/event/EventMessage.js.map +1 -1
- package/dist/event/EventType.js +1 -1
- package/dist/event/EventType.js.map +1 -1
- package/dist/index.cjs.js +228 -214
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/interaction_client/BaseInteractionClient.js +2 -2
- package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +1 -10
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.js +17 -23
- package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
- package/dist/interaction_client/PopupClient.js +1 -1
- package/dist/interaction_client/PopupClient.js.map +1 -1
- package/dist/interaction_client/RedirectClient.js +1 -1
- package/dist/interaction_client/RedirectClient.js.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
- package/dist/interaction_client/SilentCacheClient.js +1 -1
- package/dist/interaction_client/SilentCacheClient.js.map +1 -1
- package/dist/interaction_client/SilentIframeClient.js +1 -1
- package/dist/interaction_client/SilentIframeClient.js.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.js +1 -1
- package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.js +2 -2
- package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
- package/dist/interaction_handler/InteractionHandler.js +1 -1
- package/dist/interaction_handler/InteractionHandler.js.map +1 -1
- package/dist/interaction_handler/RedirectHandler.js +1 -1
- package/dist/interaction_handler/RedirectHandler.js.map +1 -1
- package/dist/interaction_handler/SilentHandler.js +1 -1
- package/dist/interaction_handler/SilentHandler.js.map +1 -1
- package/dist/internals.js +1 -1
- package/dist/internals.js.map +1 -1
- package/dist/navigation/NavigationClient.js +1 -1
- package/dist/navigation/NavigationClient.js.map +1 -1
- package/dist/network/FetchClient.js +1 -1
- package/dist/network/FetchClient.js.map +1 -1
- package/dist/network/XhrClient.js +1 -1
- package/dist/network/XhrClient.js.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.js +2 -2
- package/dist/packageMetadata.js.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.js +1 -1
- package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js.map +1 -1
- package/dist/utils/BrowserConstants.js +1 -1
- package/dist/utils/BrowserConstants.js.map +1 -1
- package/dist/utils/BrowserProtocolUtils.js +1 -1
- package/dist/utils/BrowserProtocolUtils.js.map +1 -1
- package/dist/utils/BrowserStringUtils.js +1 -1
- package/dist/utils/BrowserStringUtils.js.map +1 -1
- package/dist/utils/BrowserUtils.js +1 -1
- package/dist/utils/BrowserUtils.js.map +1 -1
- package/dist/utils/MathUtils.js +1 -1
- package/dist/utils/MathUtils.js.map +1 -1
- package/lib/msal-browser.js +230 -216
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +37 -38
- package/package.json +95 -95
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuidGenerator.js","sources":["../../src/crypto/GuidGenerator.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants , IGuidGenerator } from \"@azure/msal-common\";\r\nimport { MathUtils } from \"../utils/MathUtils\";\r\nimport { BrowserCrypto } from \"./BrowserCrypto\";\r\nexport class GuidGenerator implements IGuidGenerator {\r\n\r\n // browser crypto object used to generate random values\r\n private cryptoObj: BrowserCrypto;\r\n\r\n constructor(cryptoObj: BrowserCrypto) {\r\n this.cryptoObj = cryptoObj;\r\n }\r\n\r\n /*\r\n * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or\r\n * pseudo-random numbers.\r\n * The algorithm is as follows:\r\n * Set the two most significant bits (bits 6 and 7) of the\r\n * clock_seq_hi_and_reserved to zero and one, respectively.\r\n * Set the four most significant bits (bits 12 through 15) of the\r\n * time_hi_and_version field to the 4-bit version number from\r\n * Section 4.1.3. Version4\r\n * Set all the other bits to randomly (or pseudo-randomly) chosen\r\n * values.\r\n * UUID = time-low \"-\" time-mid \"-\"time-high-and-version \"-\"clock-seq-reserved and low(2hexOctet)\"-\" node\r\n * time-low = 4hexOctet\r\n * time-mid = 2hexOctet\r\n * time-high-and-version = 2hexOctet\r\n * clock-seq-and-reserved = hexOctet:\r\n * clock-seq-low = hexOctet\r\n * node = 6hexOctet\r\n * Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\r\n * y could be 1000, 1001, 1010, 1011 since most significant two bits needs to be 10\r\n * y values are 8, 9, A, B\r\n */\r\n generateGuid(): string {\r\n try {\r\n const buffer: Uint8Array = new Uint8Array(16);\r\n this.cryptoObj.getRandomValues(buffer);\r\n\r\n // buffer[6] and buffer[7] represents the time_hi_and_version field. We will set the four most significant bits (4 through 7) of buffer[6] to represent decimal number 4 (UUID version number).\r\n buffer[6] |= 0x40; // buffer[6] | 01000000 will set the 6 bit to 1.\r\n buffer[6] &= 0x4f; // buffer[6] & 01001111 will set the 4, 5, and 7 bit to 0 such that bits 4-7 == 0100 = \"4\".\r\n\r\n // buffer[8] represents the clock_seq_hi_and_reserved field. We will set the two most significant bits (6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively.\r\n buffer[8] |= 0x80; // buffer[8] | 10000000 will set the 7 bit to 1.\r\n buffer[8] &= 0xbf; // buffer[8] & 10111111 will set the 6 bit to 0.\r\n\r\n return MathUtils.decimalToHex(buffer[0]) + MathUtils.decimalToHex(buffer[1])\r\n + MathUtils.decimalToHex(buffer[2]) + MathUtils.decimalToHex(buffer[3])\r\n + \"-\" + MathUtils.decimalToHex(buffer[4]) + MathUtils.decimalToHex(buffer[5])\r\n + \"-\" + MathUtils.decimalToHex(buffer[6]) + MathUtils.decimalToHex(buffer[7])\r\n + \"-\" + MathUtils.decimalToHex(buffer[8]) + MathUtils.decimalToHex(buffer[9])\r\n + \"-\" + MathUtils.decimalToHex(buffer[10]) + MathUtils.decimalToHex(buffer[11])\r\n + MathUtils.decimalToHex(buffer[12]) + MathUtils.decimalToHex(buffer[13])\r\n + MathUtils.decimalToHex(buffer[14]) + MathUtils.decimalToHex(buffer[15]);\r\n }\r\n catch (err) {\r\n const guidHolder: string = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\";\r\n const hex: string = \"0123456789abcdef\";\r\n let r: number = 0;\r\n let guidResponse: string = Constants.EMPTY_STRING;\r\n for (let i: number = 0; i < 36; i++) {\r\n if (guidHolder[i] !== \"-\" && guidHolder[i] !== \"4\") {\r\n // each x and y needs to be random\r\n r = Math.random() * 16 | 0;\r\n }\r\n if (guidHolder[i] === \"x\") {\r\n guidResponse += hex[r];\r\n } else if (guidHolder[i] === \"y\") {\r\n // clock-seq-and-reserved first hex is filtered and remaining hex values are random\r\n r &= 0x3; // bit and with 0011 to set pos 2 to zero ?0??\r\n r |= 0x8; // set pos 3 to 1 as 1???\r\n guidResponse += hex[r];\r\n } else {\r\n guidResponse += guidHolder[i];\r\n }\r\n }\r\n return guidResponse;\r\n }\r\n }\r\n\r\n /**\r\n * verifies if a string is GUID\r\n * @param guid\r\n */\r\n isGuid(guid: string): boolean {\r\n const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\r\n return regexGuid.test(guid);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA
|
|
1
|
+
{"version":3,"file":"GuidGenerator.js","sources":["../../src/crypto/GuidGenerator.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants , IGuidGenerator } from \"@azure/msal-common\";\r\nimport { MathUtils } from \"../utils/MathUtils\";\r\nimport { BrowserCrypto } from \"./BrowserCrypto\";\r\nexport class GuidGenerator implements IGuidGenerator {\r\n\r\n // browser crypto object used to generate random values\r\n private cryptoObj: BrowserCrypto;\r\n\r\n constructor(cryptoObj: BrowserCrypto) {\r\n this.cryptoObj = cryptoObj;\r\n }\r\n\r\n /*\r\n * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or\r\n * pseudo-random numbers.\r\n * The algorithm is as follows:\r\n * Set the two most significant bits (bits 6 and 7) of the\r\n * clock_seq_hi_and_reserved to zero and one, respectively.\r\n * Set the four most significant bits (bits 12 through 15) of the\r\n * time_hi_and_version field to the 4-bit version number from\r\n * Section 4.1.3. Version4\r\n * Set all the other bits to randomly (or pseudo-randomly) chosen\r\n * values.\r\n * UUID = time-low \"-\" time-mid \"-\"time-high-and-version \"-\"clock-seq-reserved and low(2hexOctet)\"-\" node\r\n * time-low = 4hexOctet\r\n * time-mid = 2hexOctet\r\n * time-high-and-version = 2hexOctet\r\n * clock-seq-and-reserved = hexOctet:\r\n * clock-seq-low = hexOctet\r\n * node = 6hexOctet\r\n * Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\r\n * y could be 1000, 1001, 1010, 1011 since most significant two bits needs to be 10\r\n * y values are 8, 9, A, B\r\n */\r\n generateGuid(): string {\r\n try {\r\n const buffer: Uint8Array = new Uint8Array(16);\r\n this.cryptoObj.getRandomValues(buffer);\r\n\r\n // buffer[6] and buffer[7] represents the time_hi_and_version field. We will set the four most significant bits (4 through 7) of buffer[6] to represent decimal number 4 (UUID version number).\r\n buffer[6] |= 0x40; // buffer[6] | 01000000 will set the 6 bit to 1.\r\n buffer[6] &= 0x4f; // buffer[6] & 01001111 will set the 4, 5, and 7 bit to 0 such that bits 4-7 == 0100 = \"4\".\r\n\r\n // buffer[8] represents the clock_seq_hi_and_reserved field. We will set the two most significant bits (6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively.\r\n buffer[8] |= 0x80; // buffer[8] | 10000000 will set the 7 bit to 1.\r\n buffer[8] &= 0xbf; // buffer[8] & 10111111 will set the 6 bit to 0.\r\n\r\n return MathUtils.decimalToHex(buffer[0]) + MathUtils.decimalToHex(buffer[1])\r\n + MathUtils.decimalToHex(buffer[2]) + MathUtils.decimalToHex(buffer[3])\r\n + \"-\" + MathUtils.decimalToHex(buffer[4]) + MathUtils.decimalToHex(buffer[5])\r\n + \"-\" + MathUtils.decimalToHex(buffer[6]) + MathUtils.decimalToHex(buffer[7])\r\n + \"-\" + MathUtils.decimalToHex(buffer[8]) + MathUtils.decimalToHex(buffer[9])\r\n + \"-\" + MathUtils.decimalToHex(buffer[10]) + MathUtils.decimalToHex(buffer[11])\r\n + MathUtils.decimalToHex(buffer[12]) + MathUtils.decimalToHex(buffer[13])\r\n + MathUtils.decimalToHex(buffer[14]) + MathUtils.decimalToHex(buffer[15]);\r\n }\r\n catch (err) {\r\n const guidHolder: string = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\";\r\n const hex: string = \"0123456789abcdef\";\r\n let r: number = 0;\r\n let guidResponse: string = Constants.EMPTY_STRING;\r\n for (let i: number = 0; i < 36; i++) {\r\n if (guidHolder[i] !== \"-\" && guidHolder[i] !== \"4\") {\r\n // each x and y needs to be random\r\n r = Math.random() * 16 | 0;\r\n }\r\n if (guidHolder[i] === \"x\") {\r\n guidResponse += hex[r];\r\n } else if (guidHolder[i] === \"y\") {\r\n // clock-seq-and-reserved first hex is filtered and remaining hex values are random\r\n r &= 0x3; // bit and with 0011 to set pos 2 to zero ?0??\r\n r |= 0x8; // set pos 3 to 1 as 1???\r\n guidResponse += hex[r];\r\n } else {\r\n guidResponse += guidHolder[i];\r\n }\r\n }\r\n return guidResponse;\r\n }\r\n }\r\n\r\n /**\r\n * verifies if a string is GUID\r\n * @param guid\r\n */\r\n isGuid(guid: string): boolean {\r\n const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\r\n return regexGuid.test(guid);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAKH,IAAA,aAAA,kBAAA,YAAA;AAKI,IAAA,SAAA,aAAA,CAAY,SAAwB,EAAA;AAChC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC9B;AAED;;;;;;;;;;;;;;;;;;;;;AAqBG;AACH,IAAA,aAAA,CAAA,SAAA,CAAA,YAAY,GAAZ,YAAA;QACI,IAA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O,IAAY,EAAA;QACf,IAAM,SAAS,GAAG,4EAA4E,CAAC;AAC/F,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC/B,CAAA;IACL,OAAC,aAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernBrowserCrypto.js","sources":["../../src/crypto/ModernBrowserCrypto.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\r\nimport { ISubtleCrypto } from \"./ISubtleCrypto\";\r\n\r\nexport class ModernBrowserCrypto implements ISubtleCrypto {\r\n getRandomValues(dataBuffer: Uint8Array): Uint8Array {\r\n return window.crypto.getRandomValues(dataBuffer);\r\n }\r\n\r\n async generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair> {\r\n return window.crypto.subtle.generateKey(algorithm, extractable, keyUsages) as Promise<CryptoKeyPair>;\r\n }\r\n\r\n async exportKey(key: CryptoKey): Promise<JsonWebKey> {\r\n return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key) as Promise<JsonWebKey>;\r\n }\r\n\r\n async importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey> {\r\n return window.crypto.subtle.importKey(KEY_FORMAT_JWK, keyData, algorithm, extractable, keyUsages) as Promise<CryptoKey>;\r\n }\r\n\r\n async sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer> {\r\n return window.crypto.subtle.sign(algorithm, key, data) as Promise<ArrayBuffer>;\r\n }\r\n\r\n async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer> {\r\n return window.crypto.subtle.digest(algorithm, data) as Promise<ArrayBuffer>;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA
|
|
1
|
+
{"version":3,"file":"ModernBrowserCrypto.js","sources":["../../src/crypto/ModernBrowserCrypto.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\r\nimport { ISubtleCrypto } from \"./ISubtleCrypto\";\r\n\r\nexport class ModernBrowserCrypto implements ISubtleCrypto {\r\n getRandomValues(dataBuffer: Uint8Array): Uint8Array {\r\n return window.crypto.getRandomValues(dataBuffer);\r\n }\r\n\r\n async generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair> {\r\n return window.crypto.subtle.generateKey(algorithm, extractable, keyUsages) as Promise<CryptoKeyPair>;\r\n }\r\n\r\n async exportKey(key: CryptoKey): Promise<JsonWebKey> {\r\n return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key) as Promise<JsonWebKey>;\r\n }\r\n\r\n async importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey> {\r\n return window.crypto.subtle.importKey(KEY_FORMAT_JWK, keyData, algorithm, extractable, keyUsages) as Promise<CryptoKey>;\r\n }\r\n\r\n async sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer> {\r\n return window.crypto.subtle.sign(algorithm, key, data) as Promise<ArrayBuffer>;\r\n }\r\n\r\n async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer> {\r\n return window.crypto.subtle.digest(algorithm, data) as Promise<ArrayBuffer>;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAKH,IAAA,mBAAA,kBAAA,YAAA;AAAA,IAAA,SAAA,mBAAA,GAAA;KAwBC;IAvBG,mBAAe,CAAA,SAAA,CAAA,eAAA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,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAyB,CAAC,CAAA;;;AAC/E,KAAA,CAAA;IACL,OAAC,mBAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsBrowserCrypto.js","sources":["../../src/crypto/MsBrowserCrypto.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants } from \"@azure/msal-common\";\r\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\r\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\r\nimport { ISubtleCrypto } from \"./ISubtleCrypto\";\r\n\r\nexport class MsBrowserCrypto implements ISubtleCrypto {\r\n getRandomValues(dataBuffer: Uint8Array): Uint8Array {\r\n return window[\"msCrypto\"].getRandomValues(dataBuffer);\r\n }\r\n\r\n async generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair> {\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msGenerateKey = window[\"msCrypto\"].subtle.generateKey(algorithm, extractable, keyUsages);\r\n msGenerateKey.addEventListener(\"complete\", (e: { target: { result: CryptoKeyPair | PromiseLike<CryptoKeyPair>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n\r\n msGenerateKey.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n\r\n async exportKey(key: CryptoKey): Promise<JsonWebKey> {\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msExportKey = window[\"msCrypto\"].subtle.exportKey(KEY_FORMAT_JWK, key);\r\n msExportKey.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer; }; }) => {\r\n const resultBuffer: ArrayBuffer = e.target.result;\r\n\r\n const resultString = BrowserStringUtils.utf8ArrToString(new Uint8Array(resultBuffer))\r\n .replace(/\\r/g, Constants.EMPTY_STRING)\r\n .replace(/\\n/g, Constants.EMPTY_STRING)\r\n .replace(/\\t/g, Constants.EMPTY_STRING)\r\n .split(\" \").join(Constants.EMPTY_STRING)\r\n .replace(\"\\u0000\", Constants.EMPTY_STRING);\r\n\r\n try {\r\n resolve(JSON.parse(resultString));\r\n } catch (e) {\r\n reject(e);\r\n }\r\n });\r\n\r\n msExportKey.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n\r\n async importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey> {\r\n const keyString = BrowserStringUtils.getSortedObjectString(keyData);\r\n const keyBuffer = BrowserStringUtils.stringToArrayBuffer(keyString);\r\n\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msImportKey = window[\"msCrypto\"].subtle.importKey(KEY_FORMAT_JWK, keyBuffer, algorithm, extractable, keyUsages);\r\n msImportKey.addEventListener(\"complete\", (e: { target: { result: CryptoKey | PromiseLike<CryptoKey>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n\r\n msImportKey.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n\r\n async sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer> {\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msSign = window[\"msCrypto\"].subtle.sign(algorithm, key, data);\r\n msSign.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer | PromiseLike<ArrayBuffer>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n\r\n msSign.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n \r\n async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer> {\r\n return new Promise((resolve, reject) => {\r\n const digestOperation = window[\"msCrypto\"].subtle.digest(algorithm, data.buffer);\r\n digestOperation.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer | PromiseLike<ArrayBuffer>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n digestOperation.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"MsBrowserCrypto.js","sources":["../../src/crypto/MsBrowserCrypto.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants } from \"@azure/msal-common\";\r\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\r\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\r\nimport { ISubtleCrypto } from \"./ISubtleCrypto\";\r\n\r\nexport class MsBrowserCrypto implements ISubtleCrypto {\r\n getRandomValues(dataBuffer: Uint8Array): Uint8Array {\r\n return window[\"msCrypto\"].getRandomValues(dataBuffer);\r\n }\r\n\r\n async generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair> {\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msGenerateKey = window[\"msCrypto\"].subtle.generateKey(algorithm, extractable, keyUsages);\r\n msGenerateKey.addEventListener(\"complete\", (e: { target: { result: CryptoKeyPair | PromiseLike<CryptoKeyPair>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n\r\n msGenerateKey.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n\r\n async exportKey(key: CryptoKey): Promise<JsonWebKey> {\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msExportKey = window[\"msCrypto\"].subtle.exportKey(KEY_FORMAT_JWK, key);\r\n msExportKey.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer; }; }) => {\r\n const resultBuffer: ArrayBuffer = e.target.result;\r\n\r\n const resultString = BrowserStringUtils.utf8ArrToString(new Uint8Array(resultBuffer))\r\n .replace(/\\r/g, Constants.EMPTY_STRING)\r\n .replace(/\\n/g, Constants.EMPTY_STRING)\r\n .replace(/\\t/g, Constants.EMPTY_STRING)\r\n .split(\" \").join(Constants.EMPTY_STRING)\r\n .replace(\"\\u0000\", Constants.EMPTY_STRING);\r\n\r\n try {\r\n resolve(JSON.parse(resultString));\r\n } catch (e) {\r\n reject(e);\r\n }\r\n });\r\n\r\n msExportKey.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n\r\n async importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey> {\r\n const keyString = BrowserStringUtils.getSortedObjectString(keyData);\r\n const keyBuffer = BrowserStringUtils.stringToArrayBuffer(keyString);\r\n\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msImportKey = window[\"msCrypto\"].subtle.importKey(KEY_FORMAT_JWK, keyBuffer, algorithm, extractable, keyUsages);\r\n msImportKey.addEventListener(\"complete\", (e: { target: { result: CryptoKey | PromiseLike<CryptoKey>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n\r\n msImportKey.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n\r\n async sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer> {\r\n return new Promise((resolve: Function, reject: Function) => {\r\n const msSign = window[\"msCrypto\"].subtle.sign(algorithm, key, data);\r\n msSign.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer | PromiseLike<ArrayBuffer>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n\r\n msSign.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n \r\n async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer> {\r\n return new Promise((resolve, reject) => {\r\n const digestOperation = window[\"msCrypto\"].subtle.digest(algorithm, data.buffer);\r\n digestOperation.addEventListener(\"complete\", (e: { target: { result: ArrayBuffer | PromiseLike<ArrayBuffer>; }; }) => {\r\n resolve(e.target.result);\r\n });\r\n digestOperation.addEventListener(\"error\", (error: string) => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;AAOH,IAAA,eAAA,kBAAA,YAAA;AAAA,IAAA,SAAA,eAAA,GAAA;KAoFC;IAnFG,eAAe,CAAA,SAAA,CAAA,eAAA,GAAf,UAAgB,UAAsB,EAAA;QAClC,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;KACzD,CAAA;AAEK,IAAA,eAAA,CAAA,SAAA,CAAA,WAAW,GAAjB,UAAkB,SAAgC,EAAE,WAAoB,EAAE,SAAqB,EAAA;;;AAC3F,gBAAA,OAAA,CAAA,CAAA,aAAO,IAAI,OAAO,CAAC,UAAC,OAAiB,EAAE,MAAgB,EAAA;AACnD,wBAAA,IAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAC/F,wBAAA,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAC,CAAuE,EAAA;AAC/G,4BAAA,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7B,yBAAC,CAAC,CAAC;AAEH,wBAAA,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,KAAa,EAAA;4BAClD,MAAM,CAAC,KAAK,CAAC,CAAC;AAClB,yBAAC,CAAC,CAAC;AACP,qBAAC,CAAC,CAAC,CAAA;;;AACN,KAAA,CAAA;IAEK,eAAS,CAAA,SAAA,CAAA,SAAA,GAAf,UAAgB,GAAc,EAAA;;;AAC1B,gBAAA,OAAA,CAAA,CAAA,aAAO,IAAI,OAAO,CAAC,UAAC,OAAiB,EAAE,MAAgB,EAAA;AACnD,wBAAA,IAAM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AC,CAAC;AACP,qBAAC,CAAC,CAAC,CAAA;;;AACN,KAAA,CAAA;AAEK,IAAA,eAAA,CAAA,SAAA,CAAA,MAAM,GAAZ,UAAa,SAA8B,EAAE,IAAgB,EAAA;;;AACzD,gBAAA,OAAA,CAAA,CAAA,aAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM,EAAA;AAC/B,wBAAA,IAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;AACjF,wBAAA,eAAe,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAC,CAAmE,EAAA;AAC7G,4BAAA,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7B,yBAAC,CAAC,CAAC;AACH,wBAAA,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,KAAa,EAAA;4BACpD,MAAM,CAAC,KAAK,CAAC,CAAC;AAClB,yBAAC,CAAC,CAAC;AACP,qBAAC,CAAC,CAAC,CAAA;;;AACN,KAAA,CAAA;IACL,OAAC,eAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsrBrowserCrypto.js","sources":["../../src/crypto/MsrBrowserCrypto.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\r\nimport { ISubtleCrypto } from \"./ISubtleCrypto\";\r\n\r\ndeclare global {\r\n interface Window {\r\n msrCrypto: Crypto & {\r\n initPrng: (entropy: Uint8Array | number[]) => void\r\n }\r\n }\r\n}\r\n\r\nexport class MsrBrowserCrypto implements ISubtleCrypto {\r\n initPrng(entropy : Uint8Array): void {\r\n // Turn into array, as initPrng seems to not always like Uint8Array (even though it should support both)\r\n return window.msrCrypto.initPrng([...entropy]);\r\n }\r\n\r\n getRandomValues(dataBuffer: Uint8Array): Uint8Array {\r\n return window.msrCrypto.getRandomValues(dataBuffer);\r\n }\r\n\r\n async generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair> {\r\n return window.msrCrypto.subtle.generateKey(algorithm, extractable, keyUsages) as Promise<CryptoKeyPair>;\r\n }\r\n\r\n async exportKey(key: CryptoKey): Promise<JsonWebKey> {\r\n return window.msrCrypto.subtle.exportKey(KEY_FORMAT_JWK, key) as Promise<JsonWebKey> as Promise<JsonWebKey>;\r\n }\r\n\r\n async importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey> {\r\n return window.msrCrypto.subtle.importKey(KEY_FORMAT_JWK, keyData, algorithm, extractable, keyUsages) as Promise<CryptoKey>;\r\n }\r\n\r\n async sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer> {\r\n return window.msrCrypto.subtle.sign(algorithm, key, data) as Promise<ArrayBuffer>;\r\n }\r\n\r\n async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer> {\r\n return window.msrCrypto.subtle.digest(algorithm, data) as Promise<ArrayBuffer>; \r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA
|
|
1
|
+
{"version":3,"file":"MsrBrowserCrypto.js","sources":["../../src/crypto/MsrBrowserCrypto.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\r\nimport { ISubtleCrypto } from \"./ISubtleCrypto\";\r\n\r\ndeclare global {\r\n interface Window {\r\n msrCrypto: Crypto & {\r\n initPrng: (entropy: Uint8Array | number[]) => void\r\n }\r\n }\r\n}\r\n\r\nexport class MsrBrowserCrypto implements ISubtleCrypto {\r\n initPrng(entropy : Uint8Array): void {\r\n // Turn into array, as initPrng seems to not always like Uint8Array (even though it should support both)\r\n return window.msrCrypto.initPrng([...entropy]);\r\n }\r\n\r\n getRandomValues(dataBuffer: Uint8Array): Uint8Array {\r\n return window.msrCrypto.getRandomValues(dataBuffer);\r\n }\r\n\r\n async generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair> {\r\n return window.msrCrypto.subtle.generateKey(algorithm, extractable, keyUsages) as Promise<CryptoKeyPair>;\r\n }\r\n\r\n async exportKey(key: CryptoKey): Promise<JsonWebKey> {\r\n return window.msrCrypto.subtle.exportKey(KEY_FORMAT_JWK, key) as Promise<JsonWebKey> as Promise<JsonWebKey>;\r\n }\r\n\r\n async importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey> {\r\n return window.msrCrypto.subtle.importKey(KEY_FORMAT_JWK, keyData, algorithm, extractable, keyUsages) as Promise<CryptoKey>;\r\n }\r\n\r\n async sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer> {\r\n return window.msrCrypto.subtle.sign(algorithm, key, data) as Promise<ArrayBuffer>;\r\n }\r\n\r\n async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer> {\r\n return window.msrCrypto.subtle.digest(algorithm, data) as Promise<ArrayBuffer>; \r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAaH,IAAA,gBAAA,kBAAA,YAAA;AAAA,IAAA,SAAA,gBAAA,GAAA;KA6BC;IA5BG,gBAAQ,CAAA,SAAA,CAAA,QAAA,GAAR,UAAS,OAAoB,EAAA;;QAEzB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAK,QAAA,CAAA,OAAO,EAAE,CAAC;KAClD,CAAA;IAED,gBAAe,CAAA,SAAA,CAAA,eAAA,GAA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AAM,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAyB,CAAC,CAAA;;;AAClF,KAAA,CAAA;IACL,OAAC,gBAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkceGenerator.js","sources":["../../src/crypto/PkceGenerator.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { PkceCodes } from \"@azure/msal-common\";\r\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\r\nimport { Base64Encode } from \"../encode/Base64Encode\";\r\nimport { BrowserCrypto } from \"./BrowserCrypto\";\r\n\r\n// Constant byte array length\r\nconst RANDOM_BYTE_ARR_LENGTH = 32;\r\n\r\n/**\r\n * Class which exposes APIs to generate PKCE codes and code verifiers.\r\n */\r\nexport class PkceGenerator {\r\n\r\n private base64Encode: Base64Encode;\r\n private cryptoObj: BrowserCrypto;\r\n\r\n constructor(cryptoObj: BrowserCrypto) {\r\n this.base64Encode = new Base64Encode();\r\n this.cryptoObj = cryptoObj;\r\n }\r\n\r\n /**\r\n * Generates PKCE Codes. See the RFC for more information: https://tools.ietf.org/html/rfc7636\r\n */\r\n async generateCodes(): Promise<PkceCodes> {\r\n const codeVerifier = this.generateCodeVerifier();\r\n const codeChallenge = await this.generateCodeChallengeFromVerifier(codeVerifier);\r\n return {\r\n verifier: codeVerifier,\r\n challenge: codeChallenge\r\n };\r\n }\r\n\r\n /**\r\n * Generates a random 32 byte buffer and returns the base64\r\n * encoded string to be used as a PKCE Code Verifier\r\n */\r\n private generateCodeVerifier(): string {\r\n try {\r\n // Generate random values as utf-8\r\n const buffer: Uint8Array = new Uint8Array(RANDOM_BYTE_ARR_LENGTH);\r\n this.cryptoObj.getRandomValues(buffer);\r\n // encode verifier as base64\r\n const pkceCodeVerifierB64: string = this.base64Encode.urlEncodeArr(buffer);\r\n return pkceCodeVerifierB64;\r\n } catch (e) {\r\n throw BrowserAuthError.createPkceNotGeneratedError(e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a base64 encoded PKCE Code Challenge string from the\r\n * hash created from the PKCE Code Verifier supplied\r\n */\r\n private async generateCodeChallengeFromVerifier(pkceCodeVerifier: string): Promise<string> {\r\n try {\r\n // hashed verifier\r\n const pkceHashedCodeVerifier = await this.cryptoObj.sha256Digest(pkceCodeVerifier);\r\n // encode hash as base64\r\n return this.base64Encode.urlEncodeArr(new Uint8Array(pkceHashedCodeVerifier));\r\n } catch (e) {\r\n throw BrowserAuthError.createPkceNotGeneratedError(e);\r\n }\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"PkceGenerator.js","sources":["../../src/crypto/PkceGenerator.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { PkceCodes } from \"@azure/msal-common\";\r\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\r\nimport { Base64Encode } from \"../encode/Base64Encode\";\r\nimport { BrowserCrypto } from \"./BrowserCrypto\";\r\n\r\n// Constant byte array length\r\nconst RANDOM_BYTE_ARR_LENGTH = 32;\r\n\r\n/**\r\n * Class which exposes APIs to generate PKCE codes and code verifiers.\r\n */\r\nexport class PkceGenerator {\r\n\r\n private base64Encode: Base64Encode;\r\n private cryptoObj: BrowserCrypto;\r\n\r\n constructor(cryptoObj: BrowserCrypto) {\r\n this.base64Encode = new Base64Encode();\r\n this.cryptoObj = cryptoObj;\r\n }\r\n\r\n /**\r\n * Generates PKCE Codes. See the RFC for more information: https://tools.ietf.org/html/rfc7636\r\n */\r\n async generateCodes(): Promise<PkceCodes> {\r\n const codeVerifier = this.generateCodeVerifier();\r\n const codeChallenge = await this.generateCodeChallengeFromVerifier(codeVerifier);\r\n return {\r\n verifier: codeVerifier,\r\n challenge: codeChallenge\r\n };\r\n }\r\n\r\n /**\r\n * Generates a random 32 byte buffer and returns the base64\r\n * encoded string to be used as a PKCE Code Verifier\r\n */\r\n private generateCodeVerifier(): string {\r\n try {\r\n // Generate random values as utf-8\r\n const buffer: Uint8Array = new Uint8Array(RANDOM_BYTE_ARR_LENGTH);\r\n this.cryptoObj.getRandomValues(buffer);\r\n // encode verifier as base64\r\n const pkceCodeVerifierB64: string = this.base64Encode.urlEncodeArr(buffer);\r\n return pkceCodeVerifierB64;\r\n } catch (e) {\r\n throw BrowserAuthError.createPkceNotGeneratedError(e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a base64 encoded PKCE Code Challenge string from the\r\n * hash created from the PKCE Code Verifier supplied\r\n */\r\n private async generateCodeChallengeFromVerifier(pkceCodeVerifier: string): Promise<string> {\r\n try {\r\n // hashed verifier\r\n const pkceHashedCodeVerifier = await this.cryptoObj.sha256Digest(pkceCodeVerifier);\r\n // encode hash as base64\r\n return this.base64Encode.urlEncodeArr(new Uint8Array(pkceHashedCodeVerifier));\r\n } catch (e) {\r\n throw BrowserAuthError.createPkceNotGeneratedError(e);\r\n }\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAOH;AACA,IAAM,sBAAsB,GAAG,EAAE,CAAC;AAElC;;AAEG;AACH,IAAA,aAAA,kBAAA,YAAA;AAKI,IAAA,SAAA,aAAA,CAAY,SAAwB,EAAA;AAChC,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AACvC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC9B;AAED;;AAEG;AACG,IAAA,aAAA,CAAA,SAAA,CAAA,aAAa,GAAnB,YAAA;;;;;;AACU,wBAAA,YAAY,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;AAC3B,wBAAA,OAAA,CAAA,CAAA,YAAM,IAAI,CAAC,iCAAiC,CAAC,YAAY,CAAC,CAAA,CAAA;;AAA1E,wBAAA,aAAa,GAAG,EAA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cesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { CryptoOps } from \"./CryptoOps\";\r\nimport { Logger, LoggerOptions, PopTokenGenerator, SignedHttpRequestParameters } from \"@azure/msal-common\";\r\nimport { version, name } from \"../packageMetadata\";\r\n\r\nexport type SignedHttpRequestOptions = {\r\n loggerOptions: LoggerOptions\r\n};\r\n\r\nexport class SignedHttpRequest {\r\n private popTokenGenerator: PopTokenGenerator;\r\n private cryptoOps: CryptoOps;\r\n private shrParameters: SignedHttpRequestParameters;\r\n private logger: Logger;\r\n\r\n constructor(shrParameters: SignedHttpRequestParameters, shrOptions?: SignedHttpRequestOptions) {\r\n const loggerOptions = (shrOptions && shrOptions.loggerOptions) || {};\r\n this.logger = new Logger(loggerOptions, name, version);\r\n this.cryptoOps = new CryptoOps(this.logger);\r\n this.popTokenGenerator = new PopTokenGenerator(this.cryptoOps);\r\n this.shrParameters = shrParameters;\r\n }\r\n\r\n /**\r\n * Generates and caches a keypair for the given request options.\r\n * @returns Public key digest, which should be sent to the token issuer.\r\n */\r\n async generatePublicKeyThumbprint(): Promise<string> {\r\n const { kid } = await this.popTokenGenerator.generateKid(this.shrParameters);\r\n\r\n return kid;\r\n }\r\n\r\n /**\r\n * Generates a signed http request for the given payload with the given key.\r\n * @param payload Payload to sign (e.g. access token)\r\n * @param publicKeyThumbprint Public key digest (from generatePublicKeyThumbprint API)\r\n * @param claims Additional claims to include/override in the signed JWT \r\n * @returns Pop token signed with the corresponding private key\r\n */\r\n async signRequest(payload: string, publicKeyThumbprint: string, claims?: object): Promise<string> {\r\n return this.popTokenGenerator.signPayload(\r\n payload, \r\n publicKeyThumbprint,\r\n this.shrParameters, \r\n claims\r\n );\r\n }\r\n\r\n /**\r\n * Removes cached keys from browser for given public key thumbprint\r\n * @param publicKeyThumbprint Public key digest (from generatePublicKeyThumbprint API)\r\n * @returns If keys are properly deleted\r\n */\r\n async removeKeys(publicKeyThumbprint: string): Promise<boolean> {\r\n return await this.cryptoOps.removeTokenBindingKey(publicKeyThumbprint);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"SignedHttpRequest.js","sources":["../../src/crypto/SignedHttpRequest.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { CryptoOps } from \"./CryptoOps\";\r\nimport { Logger, LoggerOptions, PopTokenGenerator, SignedHttpRequestParameters } from \"@azure/msal-common\";\r\nimport { version, name } from \"../packageMetadata\";\r\n\r\nexport type SignedHttpRequestOptions = {\r\n loggerOptions: LoggerOptions\r\n};\r\n\r\nexport class SignedHttpRequest {\r\n private popTokenGenerator: PopTokenGenerator;\r\n private cryptoOps: CryptoOps;\r\n private shrParameters: SignedHttpRequestParameters;\r\n private logger: Logger;\r\n\r\n constructor(shrParameters: SignedHttpRequestParameters, shrOptions?: SignedHttpRequestOptions) {\r\n const loggerOptions = (shrOptions && shrOptions.loggerOptions) || {};\r\n this.logger = new Logger(loggerOptions, name, version);\r\n this.cryptoOps = new CryptoOps(this.logger);\r\n this.popTokenGenerator = new PopTokenGenerator(this.cryptoOps);\r\n this.shrParameters = shrParameters;\r\n }\r\n\r\n /**\r\n * Generates and caches a keypair for the given request options.\r\n * @returns Public key digest, which should be sent to the token issuer.\r\n */\r\n async generatePublicKeyThumbprint(): Promise<string> {\r\n const { kid } = await this.popTokenGenerator.generateKid(this.shrParameters);\r\n\r\n return kid;\r\n }\r\n\r\n /**\r\n * Generates a signed http request for the given payload with the given key.\r\n * @param payload Payload to sign (e.g. access token)\r\n * @param publicKeyThumbprint Public key digest (from generatePublicKeyThumbprint API)\r\n * @param claims Additional claims to include/override in the signed JWT \r\n * @returns Pop token signed with the corresponding private key\r\n */\r\n async signRequest(payload: string, publicKeyThumbprint: string, claims?: object): Promise<string> {\r\n return this.popTokenGenerator.signPayload(\r\n payload, \r\n publicKeyThumbprint,\r\n this.shrParameters, \r\n claims\r\n );\r\n }\r\n\r\n /**\r\n * Removes cached keys from browser for given public key thumbprint\r\n * @param publicKeyThumbprint Public key digest (from generatePublicKeyThumbprint API)\r\n * @returns If keys are properly deleted\r\n */\r\n async removeKeys(publicKeyThumbprint: string): Promise<boolean> {\r\n return await this.cryptoOps.removeTokenBindingKey(publicKeyThumbprint);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;AAUH,IAAA,iBAAA,kBAAA,YAAA;IAMI,SAAY,iBAAA,CAAA,aAA0C,EAAE,UAAqC,EAAA;QACzF,IAAM,aAAa,GAAG,CAAC,UAAU,IAAI,UAAU,CAAC,aAAa,KAAK,EAAE,CAAC;AACrE,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC/D,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACtC;AAED;;;AAGG;AACG,IAAA,iBAAA,CAAA,SAAA,CAAA,2BAA2B,GAAjC,YAAA;;;;;4BACoB,OAAM,CAAA,CAAA,YAAA,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA,CAAA;;AAApE,wBAAA,GAAG,GAAK,CAAA,EAA4D,CAAA,IAAA,EAAA,EAAjE,GAAA,CAAA;AAEX,wBAAA,OAAA,CAAA,CAAA,aAAO,GAAG,CAAC,CAAA;;;;AACd,KAAA,CAAA;AAED;;;;;;AAMG;AACG,IAAA,iBAAA,CAAA,SAAA,CAAA,WAAW,GAAjB,UAAkB,OAAe,EAAE,mBAA2B,EAAE,MAAe,EAAA;;;AAC3E,gBAAA,OAAA,CAAA,CAAA,aAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACrC,OAAO,EACP,mBAAmB,EACnB,IAAI,CAAC,aAAa,EAClB,MAAM,CACT,CAAC,CAAA;;;AACL,KAAA,CAAA;AAED;;;;AAIG;IACG,iBAAU,CAAA,SAAA,CAAA,UAAA,GAAhB,UAAiB,mBAA2B,EAAA;;;;4BACjC,OAAM,CAAA,CAAA,YAAA,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAA,CAAA;AAAtE,oBAAA,KAAA,CAAA,EAAA,OAAA,CAAA,CAAA,aAAO,SAA+D,CAAC,CAAA;;;;AAC1E,KAAA,CAAA;IACL,OAAC,iBAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base64Decode.js","sources":["../../src/encode/Base64Decode.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants } from \"@azure/msal-common\";\r\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\r\n\r\n/**\r\n * Class which exposes APIs to decode base64 strings to plaintext. See here for implementation details:\r\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64\r\n */\r\nexport class Base64Decode {\r\n\r\n /**\r\n * Returns a URL-safe plaintext decoded string from b64 encoded input.\r\n * @param input \r\n */\r\n decode(input: string): string {\r\n let encodedString = input.replace(/-/g, \"+\").replace(/_/g, \"/\");\r\n switch (encodedString.length % 4) {\r\n case 0:\r\n break;\r\n case 2:\r\n encodedString += \"==\";\r\n break;\r\n case 3:\r\n encodedString += \"=\";\r\n break;\r\n default:\r\n throw new Error(\"Invalid base64 string\");\r\n }\r\n\r\n const inputUtf8Arr = this.base64DecToArr(encodedString);\r\n return BrowserStringUtils.utf8ArrToString(inputUtf8Arr);\r\n }\r\n\r\n /**\r\n * Decodes base64 into Uint8Array\r\n * @param base64String \r\n * @param nBlockSize \r\n */\r\n private base64DecToArr(base64String: string, nBlockSize?: number): Uint8Array {\r\n const sB64Enc = base64String.replace(/[^A-Za-z0-9\\+\\/]/g, Constants.EMPTY_STRING);\r\n const nInLen = sB64Enc.length;\r\n const nOutLen = nBlockSize ? Math.ceil((nInLen * 3 + 1 >>> 2) / nBlockSize) * nBlockSize : nInLen * 3 + 1 >>> 2;\r\n const aBytes = new Uint8Array(nOutLen);\r\n\r\n for (let nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) {\r\n nMod4 = nInIdx & 3;\r\n nUint24 |= this.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4;\r\n if (nMod4 === 3 || nInLen - nInIdx === 1) {\r\n for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) {\r\n aBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 & 24) & 255;\r\n }\r\n nUint24 = 0;\r\n }\r\n }\r\n\r\n return aBytes;\r\n }\r\n\r\n /**\r\n * Base64 string to array decoding helper\r\n * @param charNum \r\n */\r\n private b64ToUint6(charNum: number): number {\r\n return charNum > 64 && charNum < 91 ?\r\n charNum - 65\r\n : charNum > 96 && charNum < 123 ? \r\n charNum - 71\r\n : charNum > 47 && charNum < 58 ?\r\n charNum + 4\r\n : charNum === 43 ?\r\n 62\r\n : charNum === 47 ?\r\n 63\r\n :\r\n 0;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA
|
|
1
|
+
{"version":3,"file":"Base64Decode.js","sources":["../../src/encode/Base64Decode.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants } from \"@azure/msal-common\";\r\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\r\n\r\n/**\r\n * Class which exposes APIs to decode base64 strings to plaintext. See here for implementation details:\r\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64\r\n */\r\nexport class Base64Decode {\r\n\r\n /**\r\n * Returns a URL-safe plaintext decoded string from b64 encoded input.\r\n * @param input \r\n */\r\n decode(input: string): string {\r\n let encodedString = input.replace(/-/g, \"+\").replace(/_/g, \"/\");\r\n switch (encodedString.length % 4) {\r\n case 0:\r\n break;\r\n case 2:\r\n encodedString += \"==\";\r\n break;\r\n case 3:\r\n encodedString += \"=\";\r\n break;\r\n default:\r\n throw new Error(\"Invalid base64 string\");\r\n }\r\n\r\n const inputUtf8Arr = this.base64DecToArr(encodedString);\r\n return BrowserStringUtils.utf8ArrToString(inputUtf8Arr);\r\n }\r\n\r\n /**\r\n * Decodes base64 into Uint8Array\r\n * @param base64String \r\n * @param nBlockSize \r\n */\r\n private base64DecToArr(base64String: string, nBlockSize?: number): Uint8Array {\r\n const sB64Enc = base64String.replace(/[^A-Za-z0-9\\+\\/]/g, Constants.EMPTY_STRING);\r\n const nInLen = sB64Enc.length;\r\n const nOutLen = nBlockSize ? Math.ceil((nInLen * 3 + 1 >>> 2) / nBlockSize) * nBlockSize : nInLen * 3 + 1 >>> 2;\r\n const aBytes = new Uint8Array(nOutLen);\r\n\r\n for (let nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) {\r\n nMod4 = nInIdx & 3;\r\n nUint24 |= this.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4;\r\n if (nMod4 === 3 || nInLen - nInIdx === 1) {\r\n for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) {\r\n aBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 & 24) & 255;\r\n }\r\n nUint24 = 0;\r\n }\r\n }\r\n\r\n return aBytes;\r\n }\r\n\r\n /**\r\n * Base64 string to array decoding helper\r\n * @param charNum \r\n */\r\n private b64ToUint6(charNum: number): number {\r\n return charNum > 64 && charNum < 91 ?\r\n charNum - 65\r\n : charNum > 96 && charNum < 123 ? \r\n charNum - 71\r\n : charNum > 47 && charNum < 58 ?\r\n charNum + 4\r\n : charNum === 43 ?\r\n 62\r\n : charNum === 47 ?\r\n 63\r\n :\r\n 0;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAKH;;;AAGG;AACH,IAAA,YAAA,kBAAA,YAAA;AAAA,IAAA,SAAA,YAAA,GAAA;KAoEC;AAlEG;;;AAGG;IACH,YAAM,CAAA,SAAA,CAAA,MAAA,GAAN,UAAO,KAAa,EAAA;AAChB,QAAA,IAAI,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAChE,QAAA,QAAQ,aAAa,CAAC,MAAM,GAAG,CAAC;AAC5B,YAAA,KAAK,CAAC;gBACF,MAAM;AACV,YAAA,KAAK,CAAC;gBACF,aAAa,IAAI,IAAI,CAAC;gBACtB,MAAM;AACV,YAAA,KAAK,CAAC;gBACF,aAAa,IAAI,GAAG,CAAC;gBACrB,MAAM;AACV,YAAA;AACI,gBAAA,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;AAChD,SAAA;QAED,IAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;AACxD,QAAA,OAAO,kBAAkB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;KAC3D,CAAA;AAED;;;;AAIG;AACK,IAAA,YAAA,CAAA,SAAA,CAAA,cAAc,GAAtB,UAAuB,YAAoB,EAAE,UAAmB,EAAA;AAC5D,QAAA,IAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAA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EAAE,IAAI,OAAO,GAAG,EAAE;AAC/B,YAAA,OAAO,GAAG,EAAE;cACV,OAAO,GAAG,EAAE,IAAI,OAAO,GAAG,GAAG;AAC3B,gBAAA,OAAO,GAAG,EAAE;kBACV,OAAO,GAAG,EAAE,IAAI,OAAO,GAAG,EAAE;AAC1B,oBAAA,OAAO,GAAG,CAAC;AACX,sBAAE,OAAO,KAAK,EAAE;wBACZ,EAAE;AACF,0BAAE,OAAO,KAAK,EAAE;4BACZ,EAAE;;AAEF,gCAAA,CAAC,CAAC;KACzB,CAAA;IACL,OAAC,YAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base64Encode.js","sources":["../../src/encode/Base64Encode.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants } from \"@azure/msal-common\";\r\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\r\n\r\n/**\r\n * Class which exposes APIs to encode plaintext to base64 encoded string. See here for implementation details:\r\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64\r\n */\r\nexport class Base64Encode {\r\n \r\n /**\r\n * Returns URL Safe b64 encoded string from a plaintext string.\r\n * @param input \r\n */\r\n urlEncode(input: string): string {\r\n return encodeURIComponent(this.encode(input)\r\n .replace(/=/g, Constants.EMPTY_STRING)\r\n .replace(/\\+/g, \"-\")\r\n .replace(/\\//g, \"_\"));\r\n }\r\n\r\n /**\r\n * Returns URL Safe b64 encoded string from an int8Array.\r\n * @param inputArr \r\n */\r\n urlEncodeArr(inputArr: Uint8Array): string {\r\n return this.base64EncArr(inputArr)\r\n .replace(/=/g, Constants.EMPTY_STRING)\r\n .replace(/\\+/g, \"-\")\r\n .replace(/\\//g, \"_\");\r\n }\r\n\r\n /**\r\n * Returns b64 encoded string from plaintext string.\r\n * @param input \r\n */\r\n encode(input: string): string {\r\n const inputUtf8Arr = BrowserStringUtils.stringToUtf8Arr(input);\r\n return this.base64EncArr(inputUtf8Arr);\r\n }\r\n\r\n /**\r\n * Base64 encode byte array\r\n * @param aBytes \r\n */\r\n private base64EncArr(aBytes: Uint8Array): string { \r\n const eqLen = (3 - (aBytes.length % 3)) % 3;\r\n let sB64Enc = Constants.EMPTY_STRING;\r\n \r\n for (let nMod3, nLen = aBytes.length, nUint24 = 0, nIdx = 0; nIdx < nLen; nIdx++) {\r\n nMod3 = nIdx % 3;\r\n /* Uncomment the following line in order to split the output in lines 76-character long: */\r\n /*\r\n *if (nIdx > 0 && (nIdx * 4 / 3) % 76 === 0) { sB64Enc += \"\\r\\n\"; }\r\n */\r\n nUint24 |= aBytes[nIdx] << (16 >>> nMod3 & 24);\r\n if (nMod3 === 2 || aBytes.length - nIdx === 1) {\r\n sB64Enc += String.fromCharCode(\r\n this.uint6ToB64(nUint24 >>> 18 & 63), \r\n this.uint6ToB64(nUint24 >>> 12 & 63), \r\n this.uint6ToB64(nUint24 >>> 6 & 63), \r\n this.uint6ToB64(nUint24 & 63)\r\n );\r\n nUint24 = 0;\r\n }\r\n }\r\n\r\n return eqLen === 0 ? sB64Enc : sB64Enc.substring(0, sB64Enc.length - eqLen) + (eqLen === 1 ? \"=\" : \"==\");\r\n }\r\n\r\n /**\r\n * Base64 string to array encoding helper\r\n * @param nUint6 \r\n */\r\n private uint6ToB64 (nUint6: number): number {\r\n return nUint6 < 26 ?\r\n nUint6 + 65\r\n : nUint6 < 52 ?\r\n nUint6 + 71\r\n : nUint6 < 62 ?\r\n nUint6 - 4\r\n : nUint6 === 62 ?\r\n 43\r\n : nUint6 === 63 ?\r\n 47\r\n :\r\n 65;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA
|
|
1
|
+
{"version":3,"file":"Base64Encode.js","sources":["../../src/encode/Base64Encode.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { Constants } from \"@azure/msal-common\";\r\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\r\n\r\n/**\r\n * Class which exposes APIs to encode plaintext to base64 encoded string. See here for implementation details:\r\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64\r\n */\r\nexport class Base64Encode {\r\n \r\n /**\r\n * Returns URL Safe b64 encoded string from a plaintext string.\r\n * @param input \r\n */\r\n urlEncode(input: string): string {\r\n return encodeURIComponent(this.encode(input)\r\n .replace(/=/g, Constants.EMPTY_STRING)\r\n .replace(/\\+/g, \"-\")\r\n .replace(/\\//g, \"_\"));\r\n }\r\n\r\n /**\r\n * Returns URL Safe b64 encoded string from an int8Array.\r\n * @param inputArr \r\n */\r\n urlEncodeArr(inputArr: Uint8Array): string {\r\n return this.base64EncArr(inputArr)\r\n .replace(/=/g, Constants.EMPTY_STRING)\r\n .replace(/\\+/g, \"-\")\r\n .replace(/\\//g, \"_\");\r\n }\r\n\r\n /**\r\n * Returns b64 encoded string from plaintext string.\r\n * @param input \r\n */\r\n encode(input: string): string {\r\n const inputUtf8Arr = BrowserStringUtils.stringToUtf8Arr(input);\r\n return this.base64EncArr(inputUtf8Arr);\r\n }\r\n\r\n /**\r\n * Base64 encode byte array\r\n * @param aBytes \r\n */\r\n private base64EncArr(aBytes: Uint8Array): string { \r\n const eqLen = (3 - (aBytes.length % 3)) % 3;\r\n let sB64Enc = Constants.EMPTY_STRING;\r\n \r\n for (let nMod3, nLen = aBytes.length, nUint24 = 0, nIdx = 0; nIdx < nLen; nIdx++) {\r\n nMod3 = nIdx % 3;\r\n /* Uncomment the following line in order to split the output in lines 76-character long: */\r\n /*\r\n *if (nIdx > 0 && (nIdx * 4 / 3) % 76 === 0) { sB64Enc += \"\\r\\n\"; }\r\n */\r\n nUint24 |= aBytes[nIdx] << (16 >>> nMod3 & 24);\r\n if (nMod3 === 2 || aBytes.length - nIdx === 1) {\r\n sB64Enc += String.fromCharCode(\r\n this.uint6ToB64(nUint24 >>> 18 & 63), \r\n this.uint6ToB64(nUint24 >>> 12 & 63), \r\n this.uint6ToB64(nUint24 >>> 6 & 63), \r\n this.uint6ToB64(nUint24 & 63)\r\n );\r\n nUint24 = 0;\r\n }\r\n }\r\n\r\n return eqLen === 0 ? sB64Enc : sB64Enc.substring(0, sB64Enc.length - eqLen) + (eqLen === 1 ? \"=\" : \"==\");\r\n }\r\n\r\n /**\r\n * Base64 string to array encoding helper\r\n * @param nUint6 \r\n */\r\n private uint6ToB64 (nUint6: number): number {\r\n return nUint6 < 26 ?\r\n nUint6 + 65\r\n : nUint6 < 52 ?\r\n nUint6 + 71\r\n : nUint6 < 62 ?\r\n nUint6 - 4\r\n : nUint6 === 62 ?\r\n 43\r\n : nUint6 === 63 ?\r\n 47\r\n :\r\n 65;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAKH;;;AAGG;AACH,IAAA,YAAA,kBAAA,YAAA;AAAA,IAAA,SAAA,YAAA,GAAA;KAgFC;AA9EG;;;AAGG;IACH,YAAS,CAAA,SAAA,CAAA,SAAA,GAAT,UAAU,KAAa,EAAA;AACnB,QAAA,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;AACvC,aAAA,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,YAAY,CAAC;AACrC,aAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AACnB,aAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;KAC7B,CAAA;AAED;;;AAGG;IACH,YAAY,CAAA,SAAA,CAAA,YAAA,GAAZ,UAAa,QAAoB,EAAA;AAC7B,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;AAC7B,aAAA,OAAO,CAAC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K,CAAC,GAAG,EAAE,CAAC,EACnC,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC,CAChC,CAAC;gBACF,OAAO,GAAG,CAAC,CAAC;AACf,aAAA;AACJ,SAAA;AAED,QAAA,OAAQ,KAAK,KAAK,CAAC,GAAG,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;KAC7G,CAAA;AAED;;;AAGG;IACK,YAAU,CAAA,SAAA,CAAA,UAAA,GAAlB,UAAoB,MAAc,EAAA;AAC9B,QAAA,OAAO,MAAM,GAAG,EAAE;AACd,YAAA,MAAM,GAAG,EAAE;AACX,cAAE,MAAM,GAAG,EAAE;AACT,gBAAA,MAAM,GAAG,EAAE;AACX,kBAAE,MAAM,GAAG,EAAE;AACT,oBAAA,MAAM,GAAG,CAAC;AACV,sBAAE,MAAM,KAAK,EAAE;wBACX,EAAE;AACF,0BAAE,MAAM,KAAK,EAAE;4BACX,EAAE;;AAEF,gCAAA,EAAE,CAAC;KAC1B,CAAA;IACL,OAAC,YAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserAuthError.js","sources":["../../src/error/BrowserAuthError.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError, StringUtils } from \"@azure/msal-common\";\r\n\r\n/**\r\n * BrowserAuthErrorMessage class containing string constants used by error codes and messages.\r\n */\r\nexport const BrowserAuthErrorMessage = {\r\n pkceNotGenerated: {\r\n code: \"pkce_not_created\",\r\n desc: \"The PKCE code challenge and verifier could not be generated.\"\r\n },\r\n cryptoDoesNotExist: {\r\n code: \"crypto_nonexistent\",\r\n desc: \"The crypto object or function is not available.\"\r\n },\r\n httpMethodNotImplementedError: {\r\n code: \"http_method_not_implemented\",\r\n desc: \"The HTTP method given has not been implemented in this library.\"\r\n },\r\n emptyNavigateUriError: {\r\n code: \"empty_navigate_uri\",\r\n desc: \"Navigation URI is empty. Please check stack trace for more info.\"\r\n },\r\n hashEmptyError: {\r\n code: \"hash_empty_error\",\r\n desc: \"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n hashDoesNotContainStateError: {\r\n code: \"no_state_in_hash\",\r\n desc: \"Hash does not contain state. Please verify that the request originated from msal.\"\r\n },\r\n hashDoesNotContainKnownPropertiesError: {\r\n code: \"hash_does_not_contain_known_properties\",\r\n desc: \"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n unableToParseStateError: {\r\n code: \"unable_to_parse_state\",\r\n desc: \"Unable to parse state. Please verify that the request originated from msal.\"\r\n },\r\n stateInteractionTypeMismatchError: {\r\n code: \"state_interaction_type_mismatch\",\r\n desc: \"Hash contains state but the interaction type does not match the caller.\"\r\n },\r\n interactionInProgress: {\r\n code: \"interaction_in_progress\",\r\n desc: \"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n popupWindowError: {\r\n code: \"popup_window_error\",\r\n desc: \"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.\"\r\n },\r\n emptyWindowError: {\r\n code: \"empty_window_error\",\r\n desc: \"window.open returned null or undefined window object.\"\r\n },\r\n userCancelledError: {\r\n code: \"user_cancelled\",\r\n desc: \"User cancelled the flow.\"\r\n },\r\n monitorPopupTimeoutError: {\r\n code: \"monitor_window_timeout\",\r\n desc: \"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n monitorIframeTimeoutError: {\r\n code: \"monitor_window_timeout\",\r\n desc: \"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n redirectInIframeError: {\r\n code: \"redirect_in_iframe\",\r\n desc: \"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.\"\r\n },\r\n blockTokenRequestsInHiddenIframeError: {\r\n code: \"block_iframe_reload\",\r\n desc: \"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors\"\r\n },\r\n blockAcquireTokenInPopupsError: {\r\n code: \"block_nested_popups\",\r\n desc: \"Request was blocked inside a popup because MSAL detected it was running in a popup.\"\r\n },\r\n iframeClosedPrematurelyError: {\r\n code: \"iframe_closed_prematurely\",\r\n desc: \"The iframe being monitored was closed prematurely.\"\r\n },\r\n silentLogoutUnsupportedError: {\r\n code: \"silent_logout_unsupported\",\r\n desc: \"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.\"\r\n },\r\n noAccountError: {\r\n code: \"no_account_error\",\r\n desc: \"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.\"\r\n },\r\n silentPromptValueError: {\r\n code: \"silent_prompt_value_error\",\r\n desc: \"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.\"\r\n },\r\n noTokenRequestCacheError: {\r\n code: \"no_token_request_cache_error\",\r\n desc: \"No token request found in cache.\"\r\n },\r\n unableToParseTokenRequestCacheError: {\r\n code: \"unable_to_parse_token_request_cache_error\",\r\n desc: \"The cached token request could not be parsed.\"\r\n },\r\n noCachedAuthorityError: {\r\n code: \"no_cached_authority_error\",\r\n desc: \"No cached authority found.\"\r\n },\r\n authRequestNotSet: {\r\n code: \"auth_request_not_set_error\",\r\n desc: \"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler\"\r\n },\r\n invalidCacheType: {\r\n code: \"invalid_cache_type\",\r\n desc: \"Invalid cache type\"\r\n },\r\n notInBrowserEnvironment: {\r\n code: \"non_browser_environment\",\r\n desc: \"Login and token requests are not supported in non-browser environments.\"\r\n },\r\n databaseNotOpen: {\r\n code: \"database_not_open\",\r\n desc: \"Database is not open!\"\r\n },\r\n noNetworkConnectivity: {\r\n code: \"no_network_connectivity\",\r\n desc: \"No network connectivity. Check your internet connection.\"\r\n },\r\n postRequestFailed: {\r\n code: \"post_request_failed\",\r\n desc: \"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'\"\r\n },\r\n getRequestFailed: {\r\n code: \"get_request_failed\",\r\n desc: \"Network request failed. Please check the network trace to determine root cause.\"\r\n },\r\n failedToParseNetworkResponse: {\r\n code: \"failed_to_parse_response\",\r\n desc: \"Failed to parse network response. Check network trace.\"\r\n },\r\n unableToLoadTokenError: {\r\n code: \"unable_to_load_token\",\r\n desc: \"Error loading token to cache.\"\r\n },\r\n signingKeyNotFoundInStorage: {\r\n code: \"crypto_key_not_found\",\r\n desc: \"Cryptographic Key or Keypair not found in browser storage.\"\r\n },\r\n authCodeRequired: {\r\n code: \"auth_code_required\",\r\n desc: \"An authorization code must be provided (as the `code` property on the request) to this flow.\"\r\n },\r\n authCodeOrNativeAccountRequired: {\r\n code: \"auth_code_or_nativeAccountId_required\",\r\n desc: \"An authorization code or nativeAccountId must be provided to this flow.\"\r\n },\r\n spaCodeAndNativeAccountPresent: {\r\n code: \"spa_code_and_nativeAccountId_present\",\r\n desc: \"Request cannot contain both spa code and native account id.\"\r\n },\r\n databaseUnavailable: {\r\n code: \"database_unavailable\",\r\n desc: \"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.\"\r\n },\r\n unableToAcquireTokenFromNativePlatform: {\r\n code: \"unable_to_acquire_token_from_native_platform\",\r\n desc: \"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors.\"\r\n },\r\n nativeHandshakeTimeout: {\r\n code: \"native_handshake_timeout\",\r\n desc: \"Timed out while attempting to establish connection to browser extension\"\r\n },\r\n nativeExtensionNotInstalled: {\r\n code: \"native_extension_not_installed\",\r\n desc: \"Native extension is not installed. If you think this is a mistake call the initialize function.\"\r\n },\r\n nativeConnectionNotEstablished: {\r\n code: \"native_connection_not_established\",\r\n desc: \"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors.\"\r\n },\r\n nativeBrokerCalledBeforeInitialize: {\r\n code: \"native_broker_called_before_initialize\",\r\n desc: \"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors.\"\r\n },\r\n nativePromptNotSupported: {\r\n code: \"native_prompt_not_supported\",\r\n desc: \"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.\"\r\n }\r\n};\r\n\r\n/**\r\n * Browser library error class thrown by the MSAL.js library for SPAs\r\n */\r\nexport class BrowserAuthError extends AuthError {\r\n\r\n constructor(errorCode: string, errorMessage?: string) {\r\n super(errorCode, errorMessage);\r\n\r\n Object.setPrototypeOf(this, BrowserAuthError.prototype);\r\n this.name = \"BrowserAuthError\";\r\n }\r\n\r\n /**\r\n * Creates an error thrown when PKCE is not implemented.\r\n * @param errDetail\r\n */\r\n static createPkceNotGeneratedError(errDetail: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.pkceNotGenerated.code,\r\n `${BrowserAuthErrorMessage.pkceNotGenerated.desc} Detail:${errDetail}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the crypto object is unavailable.\r\n * @param errDetail\r\n */\r\n static createCryptoNotAvailableError(errDetail: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.cryptoDoesNotExist.code,\r\n `${BrowserAuthErrorMessage.cryptoDoesNotExist.desc} Detail:${errDetail}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when an HTTP method hasn't been implemented by the browser class.\r\n * @param method\r\n */\r\n static createHttpMethodNotImplementedError(method: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.httpMethodNotImplementedError.code,\r\n `${BrowserAuthErrorMessage.httpMethodNotImplementedError.desc} Given Method: ${method}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the navigation URI is empty.\r\n */\r\n static createEmptyNavigationUriError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.emptyNavigateUriError.code, BrowserAuthErrorMessage.emptyNavigateUriError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value is unexpectedly empty.\r\n * @param hashValue\r\n */\r\n static createEmptyHashError(hashValue: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.hashEmptyError.code, `${BrowserAuthErrorMessage.hashEmptyError.desc} Given Url: ${hashValue}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value is unexpectedly empty.\r\n */\r\n static createHashDoesNotContainStateError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.hashDoesNotContainStateError.code, BrowserAuthErrorMessage.hashDoesNotContainStateError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value does not contain known properties\r\n */\r\n static createHashDoesNotContainKnownPropertiesError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.hashDoesNotContainKnownPropertiesError.code, BrowserAuthErrorMessage.hashDoesNotContainKnownPropertiesError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value is unexpectedly empty.\r\n */\r\n static createUnableToParseStateError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToParseStateError.code, BrowserAuthErrorMessage.unableToParseStateError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the state value in the hash does not match the interaction type of the API attempting to consume it.\r\n */\r\n static createStateInteractionTypeMismatchError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.stateInteractionTypeMismatchError.code, BrowserAuthErrorMessage.stateInteractionTypeMismatchError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when a browser interaction (redirect or popup) is in progress.\r\n */\r\n static createInteractionInProgressError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.interactionInProgress.code, BrowserAuthErrorMessage.interactionInProgress.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the popup window could not be opened.\r\n * @param errDetail\r\n */\r\n static createPopupWindowError(errDetail?: string): BrowserAuthError {\r\n let errorMessage = BrowserAuthErrorMessage.popupWindowError.desc;\r\n errorMessage = !StringUtils.isEmpty(errDetail) ? `${errorMessage} Details: ${errDetail}` : errorMessage;\r\n return new BrowserAuthError(BrowserAuthErrorMessage.popupWindowError.code, errorMessage);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when window.open returns an empty window object.\r\n * @param errDetail\r\n */\r\n static createEmptyWindowCreatedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.emptyWindowError.code, BrowserAuthErrorMessage.emptyWindowError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the user closes a popup.\r\n */\r\n static createUserCancelledError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.userCancelledError.code,\r\n BrowserAuthErrorMessage.userCancelledError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when monitorPopupFromHash times out for a given popup.\r\n */\r\n static createMonitorPopupTimeoutError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.monitorPopupTimeoutError.code,\r\n BrowserAuthErrorMessage.monitorPopupTimeoutError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when monitorIframeFromHash times out for a given iframe.\r\n */\r\n static createMonitorIframeTimeoutError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.monitorIframeTimeoutError.code,\r\n BrowserAuthErrorMessage.monitorIframeTimeoutError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when navigateWindow is called inside an iframe or brokered applications.\r\n * @param windowParentCheck\r\n */\r\n static createRedirectInIframeError(windowParentCheck: boolean): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.redirectInIframeError.code,\r\n `${BrowserAuthErrorMessage.redirectInIframeError.desc} (window.parent !== window) => ${windowParentCheck}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when an auth reload is done inside an iframe.\r\n */\r\n static createBlockReloadInHiddenIframeError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.blockTokenRequestsInHiddenIframeError.code,\r\n BrowserAuthErrorMessage.blockTokenRequestsInHiddenIframeError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when a popup attempts to call an acquireToken API\r\n * @returns\r\n */\r\n static createBlockAcquireTokenInPopupsError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.blockAcquireTokenInPopupsError.code,\r\n BrowserAuthErrorMessage.blockAcquireTokenInPopupsError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when an iframe is found to be closed before the timeout is reached.\r\n */\r\n static createIframeClosedPrematurelyError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.iframeClosedPrematurelyError.code, BrowserAuthErrorMessage.iframeClosedPrematurelyError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the logout API is called on any of the silent interaction clients\r\n */\r\n static createSilentLogoutUnsupportedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.silentLogoutUnsupportedError.code, BrowserAuthErrorMessage.silentLogoutUnsupportedError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the account object is not provided in the acquireTokenSilent API.\r\n */\r\n static createNoAccountError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noAccountError.code, BrowserAuthErrorMessage.noAccountError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when a given prompt value is invalid for silent requests.\r\n */\r\n static createSilentPromptValueError(givenPrompt: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.silentPromptValueError.code, `${BrowserAuthErrorMessage.silentPromptValueError.desc} Given value: ${givenPrompt}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the cached token request could not be retrieved from the cache\r\n */\r\n static createUnableToParseTokenRequestCacheError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToParseTokenRequestCacheError.code,\r\n BrowserAuthErrorMessage.unableToParseTokenRequestCacheError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the token request could not be retrieved from the cache\r\n */\r\n static createNoTokenRequestCacheError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noTokenRequestCacheError.code,\r\n BrowserAuthErrorMessage.noTokenRequestCacheError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when handleCodeResponse is called before initiateAuthRequest (InteractionHandler)\r\n */\r\n static createAuthRequestNotSetError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.authRequestNotSet.code,\r\n BrowserAuthErrorMessage.authRequestNotSet.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the authority could not be retrieved from the cache\r\n */\r\n static createNoCachedAuthorityError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noCachedAuthorityError.code,\r\n BrowserAuthErrorMessage.noCachedAuthorityError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown if cache type is invalid.\r\n */\r\n static createInvalidCacheTypeError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.invalidCacheType.code, `${BrowserAuthErrorMessage.invalidCacheType.desc}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when login and token requests are made from a non-browser environment\r\n */\r\n static createNonBrowserEnvironmentError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.notInBrowserEnvironment.code, BrowserAuthErrorMessage.notInBrowserEnvironment.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when indexDB database is not open\r\n */\r\n static createDatabaseNotOpenError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.databaseNotOpen.code, BrowserAuthErrorMessage.databaseNotOpen.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when token fetch fails due to no internet\r\n */\r\n static createNoNetworkConnectivityError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noNetworkConnectivity.code, BrowserAuthErrorMessage.noNetworkConnectivity.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when token fetch fails due to reasons other than internet connectivity\r\n */\r\n static createPostRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.postRequestFailed.code, `${BrowserAuthErrorMessage.postRequestFailed.desc} | Network client threw: ${errorDesc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when get request fails due to reasons other than internet connectivity\r\n */\r\n static createGetRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.getRequestFailed.code, `${BrowserAuthErrorMessage.getRequestFailed.desc} | Network client threw: ${errorDesc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when network client fails to parse network response\r\n */\r\n static createFailedToParseNetworkResponseError(endpoint: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.failedToParseNetworkResponse.code, `${BrowserAuthErrorMessage.failedToParseNetworkResponse.desc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when the necessary information is not available to sideload tokens\r\n */\r\n static createUnableToLoadTokenError(errorDetail: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToLoadTokenError.code, `${BrowserAuthErrorMessage.unableToLoadTokenError.desc} | ${errorDetail}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when the queried cryptographic key is not found in IndexedDB\r\n */\r\n static createSigningKeyNotFoundInStorageError(keyId: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.signingKeyNotFoundInStorage.code, `${BrowserAuthErrorMessage.signingKeyNotFoundInStorage.desc} | No match found for KeyId: ${keyId}`);\r\n }\r\n\r\n /**\r\n * Create an error when an authorization code is required but not provided\r\n */\r\n static createAuthCodeRequiredError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.authCodeRequired.code, BrowserAuthErrorMessage.authCodeRequired.desc);\r\n }\r\n\r\n /**\r\n * Create an error when an authorization code or native account ID is required but not provided\r\n */\r\n static createAuthCodeOrNativeAccountIdRequiredError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.authCodeOrNativeAccountRequired.code, BrowserAuthErrorMessage.authCodeOrNativeAccountRequired.desc);\r\n }\r\n\r\n /**\r\n * Create an error when both authorization code and native account ID are provided\r\n */\r\n static createSpaCodeAndNativeAccountIdPresentError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.spaCodeAndNativeAccountPresent.code, BrowserAuthErrorMessage.spaCodeAndNativeAccountPresent.desc);\r\n }\r\n\r\n /**\r\n * Create an error when IndexedDB is unavailable\r\n */\r\n static createDatabaseUnavailableError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.databaseUnavailable.code, BrowserAuthErrorMessage.databaseUnavailable.desc);\r\n }\r\n\r\n /**\r\n * Create an error when native token acquisition is not possible\r\n */\r\n static createUnableToAcquireTokenFromNativePlatformError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToAcquireTokenFromNativePlatform.code, BrowserAuthErrorMessage.unableToAcquireTokenFromNativePlatform.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when Handshake with browser extension times out\r\n */\r\n static createNativeHandshakeTimeoutError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeHandshakeTimeout.code, BrowserAuthErrorMessage.nativeHandshakeTimeout.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when browser extension is not installed\r\n */\r\n static createNativeExtensionNotInstalledError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeExtensionNotInstalled.code, BrowserAuthErrorMessage.nativeExtensionNotInstalled.desc);\r\n }\r\n\r\n /**\r\n * Create an error when native connection has not been established\r\n * @returns\r\n */\r\n static createNativeConnectionNotEstablishedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeConnectionNotEstablished.code, BrowserAuthErrorMessage.nativeConnectionNotEstablished.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when the initialize function hasn't been called\r\n */\r\n static createNativeBrokerCalledBeforeInitialize(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeBrokerCalledBeforeInitialize.code, BrowserAuthErrorMessage.nativeBrokerCalledBeforeInitialize.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when requesting a token directly from the native platform with an unsupported prompt parameter e.g. select_account, login or create\r\n * These requests must go through eSTS to ensure eSTS is aware of the new account\r\n */\r\n static createNativePromptParameterNotSupportedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativePromptNotSupported.code, BrowserAuthErrorMessage.nativePromptNotSupported.desc);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;;AAOA;;;IAGa,uBAAuB,GAAG;IACnC,gBAAgB,EAAE;QACd,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,8DAA8D;KACvE;IACD,kBAAkB,EAAE;QAChB,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,iDAAiD;KAC1D;IACD,6BAA6B,EAAE;QAC3B,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,iEAAiE;KAC1E;IACD,qBAAqB,EAAE;QACnB,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,kEAAkE;KAC3E;IACD,c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cesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError, StringUtils } from \"@azure/msal-common\";\r\n\r\n/**\r\n * BrowserAuthErrorMessage class containing string constants used by error codes and messages.\r\n */\r\nexport const BrowserAuthErrorMessage = {\r\n pkceNotGenerated: {\r\n code: \"pkce_not_created\",\r\n desc: \"The PKCE code challenge and verifier could not be generated.\"\r\n },\r\n cryptoDoesNotExist: {\r\n code: \"crypto_nonexistent\",\r\n desc: \"The crypto object or function is not available.\"\r\n },\r\n httpMethodNotImplementedError: {\r\n code: \"http_method_not_implemented\",\r\n desc: \"The HTTP method given has not been implemented in this library.\"\r\n },\r\n emptyNavigateUriError: {\r\n code: \"empty_navigate_uri\",\r\n desc: \"Navigation URI is empty. Please check stack trace for more info.\"\r\n },\r\n hashEmptyError: {\r\n code: \"hash_empty_error\",\r\n desc: \"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n hashDoesNotContainStateError: {\r\n code: \"no_state_in_hash\",\r\n desc: \"Hash does not contain state. Please verify that the request originated from msal.\"\r\n },\r\n hashDoesNotContainKnownPropertiesError: {\r\n code: \"hash_does_not_contain_known_properties\",\r\n desc: \"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n unableToParseStateError: {\r\n code: \"unable_to_parse_state\",\r\n desc: \"Unable to parse state. Please verify that the request originated from msal.\"\r\n },\r\n stateInteractionTypeMismatchError: {\r\n code: \"state_interaction_type_mismatch\",\r\n desc: \"Hash contains state but the interaction type does not match the caller.\"\r\n },\r\n interactionInProgress: {\r\n code: \"interaction_in_progress\",\r\n desc: \"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n popupWindowError: {\r\n code: \"popup_window_error\",\r\n desc: \"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.\"\r\n },\r\n emptyWindowError: {\r\n code: \"empty_window_error\",\r\n desc: \"window.open returned null or undefined window object.\"\r\n },\r\n userCancelledError: {\r\n code: \"user_cancelled\",\r\n desc: \"User cancelled the flow.\"\r\n },\r\n monitorPopupTimeoutError: {\r\n code: \"monitor_window_timeout\",\r\n desc: \"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n monitorIframeTimeoutError: {\r\n code: \"monitor_window_timeout\",\r\n desc: \"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.\"\r\n },\r\n redirectInIframeError: {\r\n code: \"redirect_in_iframe\",\r\n desc: \"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.\"\r\n },\r\n blockTokenRequestsInHiddenIframeError: {\r\n code: \"block_iframe_reload\",\r\n desc: \"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors\"\r\n },\r\n blockAcquireTokenInPopupsError: {\r\n code: \"block_nested_popups\",\r\n desc: \"Request was blocked inside a popup because MSAL detected it was running in a popup.\"\r\n },\r\n iframeClosedPrematurelyError: {\r\n code: \"iframe_closed_prematurely\",\r\n desc: \"The iframe being monitored was closed prematurely.\"\r\n },\r\n silentLogoutUnsupportedError: {\r\n code: \"silent_logout_unsupported\",\r\n desc: \"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.\"\r\n },\r\n noAccountError: {\r\n code: \"no_account_error\",\r\n desc: \"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.\"\r\n },\r\n silentPromptValueError: {\r\n code: \"silent_prompt_value_error\",\r\n desc: \"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.\"\r\n },\r\n noTokenRequestCacheError: {\r\n code: \"no_token_request_cache_error\",\r\n desc: \"No token request found in cache.\"\r\n },\r\n unableToParseTokenRequestCacheError: {\r\n code: \"unable_to_parse_token_request_cache_error\",\r\n desc: \"The cached token request could not be parsed.\"\r\n },\r\n noCachedAuthorityError: {\r\n code: \"no_cached_authority_error\",\r\n desc: \"No cached authority found.\"\r\n },\r\n authRequestNotSet: {\r\n code: \"auth_request_not_set_error\",\r\n desc: \"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler\"\r\n },\r\n invalidCacheType: {\r\n code: \"invalid_cache_type\",\r\n desc: \"Invalid cache type\"\r\n },\r\n notInBrowserEnvironment: {\r\n code: \"non_browser_environment\",\r\n desc: \"Login and token requests are not supported in non-browser environments.\"\r\n },\r\n databaseNotOpen: {\r\n code: \"database_not_open\",\r\n desc: \"Database is not open!\"\r\n },\r\n noNetworkConnectivity: {\r\n code: \"no_network_connectivity\",\r\n desc: \"No network connectivity. Check your internet connection.\"\r\n },\r\n postRequestFailed: {\r\n code: \"post_request_failed\",\r\n desc: \"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'\"\r\n },\r\n getRequestFailed: {\r\n code: \"get_request_failed\",\r\n desc: \"Network request failed. Please check the network trace to determine root cause.\"\r\n },\r\n failedToParseNetworkResponse: {\r\n code: \"failed_to_parse_response\",\r\n desc: \"Failed to parse network response. Check network trace.\"\r\n },\r\n unableToLoadTokenError: {\r\n code: \"unable_to_load_token\",\r\n desc: \"Error loading token to cache.\"\r\n },\r\n signingKeyNotFoundInStorage: {\r\n code: \"crypto_key_not_found\",\r\n desc: \"Cryptographic Key or Keypair not found in browser storage.\"\r\n },\r\n authCodeRequired: {\r\n code: \"auth_code_required\",\r\n desc: \"An authorization code must be provided (as the `code` property on the request) to this flow.\"\r\n },\r\n authCodeOrNativeAccountRequired: {\r\n code: \"auth_code_or_nativeAccountId_required\",\r\n desc: \"An authorization code or nativeAccountId must be provided to this flow.\"\r\n },\r\n spaCodeAndNativeAccountPresent: {\r\n code: \"spa_code_and_nativeAccountId_present\",\r\n desc: \"Request cannot contain both spa code and native account id.\"\r\n },\r\n databaseUnavailable: {\r\n code: \"database_unavailable\",\r\n desc: \"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.\"\r\n },\r\n unableToAcquireTokenFromNativePlatform: {\r\n code: \"unable_to_acquire_token_from_native_platform\",\r\n desc: \"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors.\"\r\n },\r\n nativeHandshakeTimeout: {\r\n code: \"native_handshake_timeout\",\r\n desc: \"Timed out while attempting to establish connection to browser extension\"\r\n },\r\n nativeExtensionNotInstalled: {\r\n code: \"native_extension_not_installed\",\r\n desc: \"Native extension is not installed. If you think this is a mistake call the initialize function.\"\r\n },\r\n nativeConnectionNotEstablished: {\r\n code: \"native_connection_not_established\",\r\n desc: \"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors.\"\r\n },\r\n nativeBrokerCalledBeforeInitialize: {\r\n code: \"native_broker_called_before_initialize\",\r\n desc: \"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors.\"\r\n },\r\n nativePromptNotSupported: {\r\n code: \"native_prompt_not_supported\",\r\n desc: \"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.\"\r\n }\r\n};\r\n\r\n/**\r\n * Browser library error class thrown by the MSAL.js library for SPAs\r\n */\r\nexport class BrowserAuthError extends AuthError {\r\n\r\n constructor(errorCode: string, errorMessage?: string) {\r\n super(errorCode, errorMessage);\r\n\r\n Object.setPrototypeOf(this, BrowserAuthError.prototype);\r\n this.name = \"BrowserAuthError\";\r\n }\r\n\r\n /**\r\n * Creates an error thrown when PKCE is not implemented.\r\n * @param errDetail\r\n */\r\n static createPkceNotGeneratedError(errDetail: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.pkceNotGenerated.code,\r\n `${BrowserAuthErrorMessage.pkceNotGenerated.desc} Detail:${errDetail}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the crypto object is unavailable.\r\n * @param errDetail\r\n */\r\n static createCryptoNotAvailableError(errDetail: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.cryptoDoesNotExist.code,\r\n `${BrowserAuthErrorMessage.cryptoDoesNotExist.desc} Detail:${errDetail}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when an HTTP method hasn't been implemented by the browser class.\r\n * @param method\r\n */\r\n static createHttpMethodNotImplementedError(method: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.httpMethodNotImplementedError.code,\r\n `${BrowserAuthErrorMessage.httpMethodNotImplementedError.desc} Given Method: ${method}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the navigation URI is empty.\r\n */\r\n static createEmptyNavigationUriError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.emptyNavigateUriError.code, BrowserAuthErrorMessage.emptyNavigateUriError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value is unexpectedly empty.\r\n * @param hashValue\r\n */\r\n static createEmptyHashError(hashValue: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.hashEmptyError.code, `${BrowserAuthErrorMessage.hashEmptyError.desc} Given Url: ${hashValue}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value is unexpectedly empty.\r\n */\r\n static createHashDoesNotContainStateError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.hashDoesNotContainStateError.code, BrowserAuthErrorMessage.hashDoesNotContainStateError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value does not contain known properties\r\n */\r\n static createHashDoesNotContainKnownPropertiesError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.hashDoesNotContainKnownPropertiesError.code, BrowserAuthErrorMessage.hashDoesNotContainKnownPropertiesError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the hash string value is unexpectedly empty.\r\n */\r\n static createUnableToParseStateError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToParseStateError.code, BrowserAuthErrorMessage.unableToParseStateError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the state value in the hash does not match the interaction type of the API attempting to consume it.\r\n */\r\n static createStateInteractionTypeMismatchError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.stateInteractionTypeMismatchError.code, BrowserAuthErrorMessage.stateInteractionTypeMismatchError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when a browser interaction (redirect or popup) is in progress.\r\n */\r\n static createInteractionInProgressError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.interactionInProgress.code, BrowserAuthErrorMessage.interactionInProgress.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the popup window could not be opened.\r\n * @param errDetail\r\n */\r\n static createPopupWindowError(errDetail?: string): BrowserAuthError {\r\n let errorMessage = BrowserAuthErrorMessage.popupWindowError.desc;\r\n errorMessage = !StringUtils.isEmpty(errDetail) ? `${errorMessage} Details: ${errDetail}` : errorMessage;\r\n return new BrowserAuthError(BrowserAuthErrorMessage.popupWindowError.code, errorMessage);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when window.open returns an empty window object.\r\n * @param errDetail\r\n */\r\n static createEmptyWindowCreatedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.emptyWindowError.code, BrowserAuthErrorMessage.emptyWindowError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the user closes a popup.\r\n */\r\n static createUserCancelledError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.userCancelledError.code,\r\n BrowserAuthErrorMessage.userCancelledError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when monitorPopupFromHash times out for a given popup.\r\n */\r\n static createMonitorPopupTimeoutError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.monitorPopupTimeoutError.code,\r\n BrowserAuthErrorMessage.monitorPopupTimeoutError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when monitorIframeFromHash times out for a given iframe.\r\n */\r\n static createMonitorIframeTimeoutError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.monitorIframeTimeoutError.code,\r\n BrowserAuthErrorMessage.monitorIframeTimeoutError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when navigateWindow is called inside an iframe or brokered applications.\r\n * @param windowParentCheck\r\n */\r\n static createRedirectInIframeError(windowParentCheck: boolean): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.redirectInIframeError.code,\r\n `${BrowserAuthErrorMessage.redirectInIframeError.desc} (window.parent !== window) => ${windowParentCheck}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when an auth reload is done inside an iframe.\r\n */\r\n static createBlockReloadInHiddenIframeError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.blockTokenRequestsInHiddenIframeError.code,\r\n BrowserAuthErrorMessage.blockTokenRequestsInHiddenIframeError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when a popup attempts to call an acquireToken API\r\n * @returns\r\n */\r\n static createBlockAcquireTokenInPopupsError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.blockAcquireTokenInPopupsError.code,\r\n BrowserAuthErrorMessage.blockAcquireTokenInPopupsError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when an iframe is found to be closed before the timeout is reached.\r\n */\r\n static createIframeClosedPrematurelyError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.iframeClosedPrematurelyError.code, BrowserAuthErrorMessage.iframeClosedPrematurelyError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the logout API is called on any of the silent interaction clients\r\n */\r\n static createSilentLogoutUnsupportedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.silentLogoutUnsupportedError.code, BrowserAuthErrorMessage.silentLogoutUnsupportedError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the account object is not provided in the acquireTokenSilent API.\r\n */\r\n static createNoAccountError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noAccountError.code, BrowserAuthErrorMessage.noAccountError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when a given prompt value is invalid for silent requests.\r\n */\r\n static createSilentPromptValueError(givenPrompt: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.silentPromptValueError.code, `${BrowserAuthErrorMessage.silentPromptValueError.desc} Given value: ${givenPrompt}`);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the cached token request could not be retrieved from the cache\r\n */\r\n static createUnableToParseTokenRequestCacheError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToParseTokenRequestCacheError.code,\r\n BrowserAuthErrorMessage.unableToParseTokenRequestCacheError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the token request could not be retrieved from the cache\r\n */\r\n static createNoTokenRequestCacheError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noTokenRequestCacheError.code,\r\n BrowserAuthErrorMessage.noTokenRequestCacheError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when handleCodeResponse is called before initiateAuthRequest (InteractionHandler)\r\n */\r\n static createAuthRequestNotSetError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.authRequestNotSet.code,\r\n BrowserAuthErrorMessage.authRequestNotSet.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the authority could not be retrieved from the cache\r\n */\r\n static createNoCachedAuthorityError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noCachedAuthorityError.code,\r\n BrowserAuthErrorMessage.noCachedAuthorityError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown if cache type is invalid.\r\n */\r\n static createInvalidCacheTypeError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.invalidCacheType.code, `${BrowserAuthErrorMessage.invalidCacheType.desc}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when login and token requests are made from a non-browser environment\r\n */\r\n static createNonBrowserEnvironmentError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.notInBrowserEnvironment.code, BrowserAuthErrorMessage.notInBrowserEnvironment.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when indexDB database is not open\r\n */\r\n static createDatabaseNotOpenError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.databaseNotOpen.code, BrowserAuthErrorMessage.databaseNotOpen.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when token fetch fails due to no internet\r\n */\r\n static createNoNetworkConnectivityError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.noNetworkConnectivity.code, BrowserAuthErrorMessage.noNetworkConnectivity.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when token fetch fails due to reasons other than internet connectivity\r\n */\r\n static createPostRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.postRequestFailed.code, `${BrowserAuthErrorMessage.postRequestFailed.desc} | Network client threw: ${errorDesc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when get request fails due to reasons other than internet connectivity\r\n */\r\n static createGetRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.getRequestFailed.code, `${BrowserAuthErrorMessage.getRequestFailed.desc} | Network client threw: ${errorDesc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when network client fails to parse network response\r\n */\r\n static createFailedToParseNetworkResponseError(endpoint: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.failedToParseNetworkResponse.code, `${BrowserAuthErrorMessage.failedToParseNetworkResponse.desc} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when the necessary information is not available to sideload tokens\r\n */\r\n static createUnableToLoadTokenError(errorDetail: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToLoadTokenError.code, `${BrowserAuthErrorMessage.unableToLoadTokenError.desc} | ${errorDetail}`);\r\n }\r\n\r\n /**\r\n * Create an error thrown when the queried cryptographic key is not found in IndexedDB\r\n */\r\n static createSigningKeyNotFoundInStorageError(keyId: string): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.signingKeyNotFoundInStorage.code, `${BrowserAuthErrorMessage.signingKeyNotFoundInStorage.desc} | No match found for KeyId: ${keyId}`);\r\n }\r\n\r\n /**\r\n * Create an error when an authorization code is required but not provided\r\n */\r\n static createAuthCodeRequiredError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.authCodeRequired.code, BrowserAuthErrorMessage.authCodeRequired.desc);\r\n }\r\n\r\n /**\r\n * Create an error when an authorization code or native account ID is required but not provided\r\n */\r\n static createAuthCodeOrNativeAccountIdRequiredError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.authCodeOrNativeAccountRequired.code, BrowserAuthErrorMessage.authCodeOrNativeAccountRequired.desc);\r\n }\r\n\r\n /**\r\n * Create an error when both authorization code and native account ID are provided\r\n */\r\n static createSpaCodeAndNativeAccountIdPresentError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.spaCodeAndNativeAccountPresent.code, BrowserAuthErrorMessage.spaCodeAndNativeAccountPresent.desc);\r\n }\r\n\r\n /**\r\n * Create an error when IndexedDB is unavailable\r\n */\r\n static createDatabaseUnavailableError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.databaseUnavailable.code, BrowserAuthErrorMessage.databaseUnavailable.desc);\r\n }\r\n\r\n /**\r\n * Create an error when native token acquisition is not possible\r\n */\r\n static createUnableToAcquireTokenFromNativePlatformError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.unableToAcquireTokenFromNativePlatform.code, BrowserAuthErrorMessage.unableToAcquireTokenFromNativePlatform.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when Handshake with browser extension times out\r\n */\r\n static createNativeHandshakeTimeoutError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeHandshakeTimeout.code, BrowserAuthErrorMessage.nativeHandshakeTimeout.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when browser extension is not installed\r\n */\r\n static createNativeExtensionNotInstalledError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeExtensionNotInstalled.code, BrowserAuthErrorMessage.nativeExtensionNotInstalled.desc);\r\n }\r\n\r\n /**\r\n * Create an error when native connection has not been established\r\n * @returns\r\n */\r\n static createNativeConnectionNotEstablishedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeConnectionNotEstablished.code, BrowserAuthErrorMessage.nativeConnectionNotEstablished.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when the initialize function hasn't been called\r\n */\r\n static createNativeBrokerCalledBeforeInitialize(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativeBrokerCalledBeforeInitialize.code, BrowserAuthErrorMessage.nativeBrokerCalledBeforeInitialize.desc);\r\n }\r\n\r\n /**\r\n * Create an error thrown when requesting a token directly from the native platform with an unsupported prompt parameter e.g. select_account, login or create\r\n * These requests must go through eSTS to ensure eSTS is aware of the new account\r\n */\r\n static createNativePromptParameterNotSupportedError(): BrowserAuthError {\r\n return new BrowserAuthError(BrowserAuthErrorMessage.nativePromptNotSupported.code, BrowserAuthErrorMessage.nativePromptNotSupported.desc);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;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@@
|
|
|
1
|
-
{"version":3,"file":"BrowserConfigurationAuthError.js","sources":["../../src/error/BrowserConfigurationAuthError.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError } from \"@azure/msal-common\";\r\n\r\n/**\r\n * BrowserAuthErrorMessage class containing string constants used by error codes and messages.\r\n */\r\nexport const BrowserConfigurationAuthErrorMessage = {\r\n redirectUriNotSet: {\r\n code: \"redirect_uri_empty\",\r\n desc: \"A redirect URI is required for all calls, and none has been set.\"\r\n },\r\n postLogoutUriNotSet: {\r\n code: \"post_logout_uri_empty\",\r\n desc: \"A post logout redirect has not been set.\"\r\n },\r\n storageNotSupportedError: {\r\n code: \"storage_not_supported\",\r\n desc: \"Given storage configuration option was not supported.\"\r\n },\r\n noRedirectCallbacksSet: {\r\n code: \"no_redirect_callbacks\",\r\n desc: \"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. \" +\r\n \"More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.\"\r\n },\r\n invalidCallbackObject: {\r\n code: \"invalid_callback_object\",\r\n desc: \"The object passed for the callback was invalid. \" +\r\n \"More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.\"\r\n },\r\n stubPcaInstanceCalled: {\r\n code: \"stubbed_public_client_application_called\",\r\n desc: \"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors\"\r\n },\r\n inMemRedirectUnavailable: {\r\n code: \"in_mem_redirect_unavailable\",\r\n desc: \"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true.\"\r\n },\r\n entropyNotProvided: {\r\n code: \"entropy_not_provided\",\r\n desc: \"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option.\"\r\n }\r\n};\r\n\r\n/**\r\n * Browser library error class thrown by the MSAL.js library for SPAs\r\n */\r\nexport class BrowserConfigurationAuthError extends AuthError {\r\n\r\n constructor(errorCode: string, errorMessage?: string) {\r\n super(errorCode, errorMessage);\r\n this.name = \"BrowserConfigurationAuthError\";\r\n\r\n Object.setPrototypeOf(this, BrowserConfigurationAuthError.prototype);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the redirect uri is empty (not set by caller)\r\n */\r\n static createRedirectUriEmptyError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.redirectUriNotSet.code,\r\n BrowserConfigurationAuthErrorMessage.redirectUriNotSet.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)\r\n */\r\n static createPostLogoutRedirectUriEmptyError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.code,\r\n BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.desc);\r\n }\r\n\r\n /**\r\n * Creates error thrown when given storage location is not supported.\r\n * @param givenStorageLocation \r\n */\r\n static createStorageNotSupportedError(givenStorageLocation: string): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.storageNotSupportedError.code, `${BrowserConfigurationAuthErrorMessage.storageNotSupportedError.desc} Given Location: ${givenStorageLocation}`);\r\n }\r\n\r\n /**\r\n * Creates error thrown when redirect callbacks are not set before calling loginRedirect() or acquireTokenRedirect().\r\n */\r\n static createRedirectCallbacksNotSetError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.code, \r\n BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.desc);\r\n }\r\n\r\n /**\r\n * Creates error thrown when the stub instance of PublicClientApplication is called.\r\n */\r\n static createStubPcaInstanceCalledError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.code,\r\n BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.desc);\r\n }\r\n\r\n /*\r\n * Create an error thrown when in-memory storage is used and storeAuthStateInCookie=false.\r\n */\r\n static createInMemoryRedirectUnavailableError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.code, BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.desc);\r\n }\r\n \r\n /**\r\n * Creates an error thrown when a crypto interface that requires entropy is initialized without entropy\r\n */\r\n static createEntropyNotProvided(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.entropyNotProvided.code, BrowserConfigurationAuthErrorMessage.entropyNotProvided.desc);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA
|
|
1
|
+
{"version":3,"file":"BrowserConfigurationAuthError.js","sources":["../../src/error/BrowserConfigurationAuthError.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError } from \"@azure/msal-common\";\r\n\r\n/**\r\n * BrowserAuthErrorMessage class containing string constants used by error codes and messages.\r\n */\r\nexport const BrowserConfigurationAuthErrorMessage = {\r\n redirectUriNotSet: {\r\n code: \"redirect_uri_empty\",\r\n desc: \"A redirect URI is required for all calls, and none has been set.\"\r\n },\r\n postLogoutUriNotSet: {\r\n code: \"post_logout_uri_empty\",\r\n desc: \"A post logout redirect has not been set.\"\r\n },\r\n storageNotSupportedError: {\r\n code: \"storage_not_supported\",\r\n desc: \"Given storage configuration option was not supported.\"\r\n },\r\n noRedirectCallbacksSet: {\r\n code: \"no_redirect_callbacks\",\r\n desc: \"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. \" +\r\n \"More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.\"\r\n },\r\n invalidCallbackObject: {\r\n code: \"invalid_callback_object\",\r\n desc: \"The object passed for the callback was invalid. \" +\r\n \"More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.\"\r\n },\r\n stubPcaInstanceCalled: {\r\n code: \"stubbed_public_client_application_called\",\r\n desc: \"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors\"\r\n },\r\n inMemRedirectUnavailable: {\r\n code: \"in_mem_redirect_unavailable\",\r\n desc: \"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true.\"\r\n },\r\n entropyNotProvided: {\r\n code: \"entropy_not_provided\",\r\n desc: \"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option.\"\r\n }\r\n};\r\n\r\n/**\r\n * Browser library error class thrown by the MSAL.js library for SPAs\r\n */\r\nexport class BrowserConfigurationAuthError extends AuthError {\r\n\r\n constructor(errorCode: string, errorMessage?: string) {\r\n super(errorCode, errorMessage);\r\n this.name = \"BrowserConfigurationAuthError\";\r\n\r\n Object.setPrototypeOf(this, BrowserConfigurationAuthError.prototype);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the redirect uri is empty (not set by caller)\r\n */\r\n static createRedirectUriEmptyError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.redirectUriNotSet.code,\r\n BrowserConfigurationAuthErrorMessage.redirectUriNotSet.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)\r\n */\r\n static createPostLogoutRedirectUriEmptyError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.code,\r\n BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.desc);\r\n }\r\n\r\n /**\r\n * Creates error thrown when given storage location is not supported.\r\n * @param givenStorageLocation \r\n */\r\n static createStorageNotSupportedError(givenStorageLocation: string): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.storageNotSupportedError.code, `${BrowserConfigurationAuthErrorMessage.storageNotSupportedError.desc} Given Location: ${givenStorageLocation}`);\r\n }\r\n\r\n /**\r\n * Creates error thrown when redirect callbacks are not set before calling loginRedirect() or acquireTokenRedirect().\r\n */\r\n static createRedirectCallbacksNotSetError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.code, \r\n BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.desc);\r\n }\r\n\r\n /**\r\n * Creates error thrown when the stub instance of PublicClientApplication is called.\r\n */\r\n static createStubPcaInstanceCalledError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.code,\r\n BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.desc);\r\n }\r\n\r\n /*\r\n * Create an error thrown when in-memory storage is used and storeAuthStateInCookie=false.\r\n */\r\n static createInMemoryRedirectUnavailableError(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.code, BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.desc);\r\n }\r\n \r\n /**\r\n * Creates an error thrown when a crypto interface that requires entropy is initialized without entropy\r\n */\r\n static createEntropyNotProvided(): BrowserConfigurationAuthError {\r\n return new BrowserConfigurationAuthError(BrowserConfigurationAuthErrorMessage.entropyNotProvided.code, BrowserConfigurationAuthErrorMessage.entropyNotProvided.desc);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,IAAA,oCAAoC,GAAG;AAChD,IAAA,iBAAiB,E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