@azure/msal-browser
Advanced tools
Comparing version 3.28.0 to 3.28.1
@@ -5,3 +5,3 @@ import { IPerformanceClient } from "@azure/msal-common/browser"; | ||
*/ | ||
export declare function validateCryptoAvailable(): void; | ||
export declare function validateCryptoAvailable(skipValidateSubtleCrypto: boolean): void; | ||
/** | ||
@@ -8,0 +8,0 @@ * Returns a sha-256 hash of the given dataString as an ArrayBuffer. |
@@ -22,3 +22,3 @@ import { ICrypto, IPerformanceClient, Logger, ShrOptions, SignedHttpRequest, SignedHttpRequestParameters } from "@azure/msal-common/browser"; | ||
private cache; | ||
constructor(logger: Logger, performanceClient?: IPerformanceClient); | ||
constructor(logger: Logger, performanceClient?: IPerformanceClient, skipValidateSubtleCrypto?: boolean); | ||
/** | ||
@@ -25,0 +25,0 @@ * Creates a new random GUID - used to populate state and nonce. |
export declare const name = "@azure/msal-browser"; | ||
export declare const version = "3.28.0"; | ||
export declare const version = "3.28.1"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
@@ -5,3 +5,3 @@ import { IPerformanceClient } from "@azure/msal-common/browser"; | ||
*/ | ||
export declare function validateCryptoAvailable(): void; | ||
export declare function validateCryptoAvailable(skipValidateSubtleCrypto: boolean): void; | ||
/** | ||
@@ -8,0 +8,0 @@ * Returns a sha-256 hash of the given dataString as an ArrayBuffer. |
@@ -22,3 +22,3 @@ import { ICrypto, IPerformanceClient, Logger, ShrOptions, SignedHttpRequest, SignedHttpRequestParameters } from "@azure/msal-common/browser"; | ||
private cache; | ||
constructor(logger: Logger, performanceClient?: IPerformanceClient); | ||
constructor(logger: Logger, performanceClient?: IPerformanceClient, skipValidateSubtleCrypto?: boolean); | ||
/** | ||
@@ -25,0 +25,0 @@ * Creates a new random GUID - used to populate state and nonce. |
export declare const name = "@azure/msal-browser"; | ||
export declare const version = "3.28.0"; | ||
export declare const version = "3.28.1"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
@@ -13,3 +13,3 @@ { | ||
}, | ||
"version": "3.28.0", | ||
"version": "3.28.1", | ||
"description": "Microsoft Authentication Library for js", | ||
@@ -16,0 +16,0 @@ "keywords": [ |
@@ -105,3 +105,3 @@ /* | ||
this.browserCrypto = operatingContext.isBrowserEnvironment() | ||
? new CryptoOps(this.logger, this.performanceClient) | ||
? new CryptoOps(this.logger, this.performanceClient, true) | ||
: DEFAULT_CRYPTO_IMPLEMENTATION; | ||
@@ -108,0 +108,0 @@ |
@@ -50,3 +50,5 @@ /* | ||
*/ | ||
export function validateCryptoAvailable(): void { | ||
export function validateCryptoAvailable( | ||
skipValidateSubtleCrypto: boolean | ||
): void { | ||
if (!window) { | ||
@@ -60,3 +62,3 @@ throw createBrowserAuthError( | ||
} | ||
if (!window.crypto.subtle) { | ||
if (!skipValidateSubtleCrypto && !window.crypto.subtle) { | ||
throw createBrowserAuthError( | ||
@@ -63,0 +65,0 @@ BrowserAuthErrorCodes.cryptoNonExistent, |
@@ -53,6 +53,12 @@ /* | ||
constructor(logger: Logger, performanceClient?: IPerformanceClient) { | ||
constructor( | ||
logger: Logger, | ||
performanceClient?: IPerformanceClient, | ||
skipValidateSubtleCrypto?: boolean | ||
) { | ||
this.logger = logger; | ||
// Browser crypto needs to be validated first before any other classes can be set. | ||
BrowserCrypto.validateCryptoAvailable(); | ||
BrowserCrypto.validateCryptoAvailable( | ||
skipValidateSubtleCrypto ?? false | ||
); | ||
this.cache = new AsyncMemoryStorage<CachedKeyPair>(this.logger); | ||
@@ -59,0 +65,0 @@ this.performanceClient = performanceClient; |
/* eslint-disable header/header */ | ||
export const name = "@azure/msal-browser"; | ||
export const version = "3.28.0"; | ||
export const version = "3.28.1"; |
@@ -70,3 +70,5 @@ /* | ||
export function getCurrentUri(): string { | ||
return window.location.href.split("?")[0].split("#")[0]; | ||
return typeof window !== "undefined" && window.location | ||
? window.location.href.split("?")[0].split("#")[0] | ||
: ""; | ||
} | ||
@@ -73,0 +75,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
6155224
77853