@azure/msal-browser
Advanced tools
Comparing version 4.2.1 to 4.3.0
@@ -51,2 +51,3 @@ import { AccountInfo, INetworkModule, Logger, CommonSilentFlowRequest, ICrypto, PerformanceCallbackFunction, IPerformanceClient, BaseAuthRequest, AccountFilter } from "@azure/msal-common/browser"; | ||
private acquireTokenByCodeAsyncMeasurement?; | ||
private pkceCode; | ||
/** | ||
@@ -405,3 +406,13 @@ * @constructor | ||
private acquireTokenSilentNoIframe; | ||
/** | ||
* Pre-generates PKCE codes and stores it in local variable | ||
* @param correlationId | ||
*/ | ||
private preGeneratePkceCodes; | ||
/** | ||
* Provides pre-generated PKCE codes, if any | ||
* @param correlationId | ||
*/ | ||
private getPreGeneratedPkceCodes; | ||
} | ||
//# sourceMappingURL=StandardController.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { CommonEndSessionRequest, IPerformanceClient, Logger, ICrypto } from "@azure/msal-common/browser"; | ||
import { CommonEndSessionRequest, IPerformanceClient, Logger, ICrypto, PkceCodes } from "@azure/msal-common/browser"; | ||
import { StandardInteractionClient } from "./StandardInteractionClient.js"; | ||
@@ -25,4 +25,5 @@ import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js"; | ||
* @param request | ||
* @param pkceCodes | ||
*/ | ||
acquireToken(request: PopupRequest): Promise<AuthenticationResult>; | ||
acquireToken(request: PopupRequest, pkceCodes?: PkceCodes): Promise<AuthenticationResult>; | ||
/** | ||
@@ -35,10 +36,9 @@ * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server | ||
* Helper which obtains an access_token for your API via opening a popup window in the user's browser | ||
* @param validRequest | ||
* @param popupName | ||
* @param popup | ||
* @param popupWindowAttributes | ||
* @param request | ||
* @param popupParams | ||
* @param pkceCodes | ||
* | ||
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised. | ||
*/ | ||
protected acquireTokenPopupAsync(request: PopupRequest, popupParams: PopupParams): Promise<AuthenticationResult>; | ||
protected acquireTokenPopupAsync(request: PopupRequest, popupParams: PopupParams, pkceCodes?: PkceCodes): Promise<AuthenticationResult>; | ||
/** | ||
@@ -45,0 +45,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { ServerTelemetryManager, CommonAuthorizationCodeRequest, AuthorizationCodeClient, ClientConfiguration, CommonEndSessionRequest, AccountInfo, AzureCloudOptions, StringDict } from "@azure/msal-common/browser"; | ||
import { ServerTelemetryManager, CommonAuthorizationCodeRequest, AuthorizationCodeClient, ClientConfiguration, CommonEndSessionRequest, AccountInfo, AzureCloudOptions, StringDict, PkceCodes } from "@azure/msal-common/browser"; | ||
import { BaseInteractionClient } from "./BaseInteractionClient.js"; | ||
@@ -16,4 +16,5 @@ import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; | ||
* @param request | ||
* @param pkceCodes | ||
*/ | ||
protected initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest): Promise<CommonAuthorizationCodeRequest>; | ||
protected initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest, pkceCodes?: PkceCodes): Promise<CommonAuthorizationCodeRequest>; | ||
/** | ||
@@ -20,0 +21,0 @@ * Initializer for the logout request. |
export declare const name = "@azure/msal-browser"; | ||
export declare const version = "4.2.1"; | ||
export declare const version = "4.3.0"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
@@ -51,2 +51,3 @@ import { AccountInfo, INetworkModule, Logger, CommonSilentFlowRequest, ICrypto, PerformanceCallbackFunction, IPerformanceClient, BaseAuthRequest, AccountFilter } from "@azure/msal-common/browser"; | ||
private acquireTokenByCodeAsyncMeasurement?; | ||
private pkceCode; | ||
/** | ||
@@ -405,3 +406,13 @@ * @constructor | ||
private acquireTokenSilentNoIframe; | ||
/** | ||
* Pre-generates PKCE codes and stores it in local variable | ||
* @param correlationId | ||
*/ | ||
private preGeneratePkceCodes; | ||
/** | ||
* Provides pre-generated PKCE codes, if any | ||
* @param correlationId | ||
*/ | ||
private getPreGeneratedPkceCodes; | ||
} | ||
//# sourceMappingURL=StandardController.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { CommonEndSessionRequest, IPerformanceClient, Logger, ICrypto } from "@azure/msal-common/browser"; | ||
import { CommonEndSessionRequest, IPerformanceClient, Logger, ICrypto, PkceCodes } from "@azure/msal-common/browser"; | ||
import { StandardInteractionClient } from "./StandardInteractionClient.js"; | ||
@@ -25,4 +25,5 @@ import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js"; | ||
* @param request | ||
* @param pkceCodes | ||
*/ | ||
acquireToken(request: PopupRequest): Promise<AuthenticationResult>; | ||
acquireToken(request: PopupRequest, pkceCodes?: PkceCodes): Promise<AuthenticationResult>; | ||
/** | ||
@@ -35,10 +36,9 @@ * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server | ||
* Helper which obtains an access_token for your API via opening a popup window in the user's browser | ||
* @param validRequest | ||
* @param popupName | ||
* @param popup | ||
* @param popupWindowAttributes | ||
* @param request | ||
* @param popupParams | ||
* @param pkceCodes | ||
* | ||
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised. | ||
*/ | ||
protected acquireTokenPopupAsync(request: PopupRequest, popupParams: PopupParams): Promise<AuthenticationResult>; | ||
protected acquireTokenPopupAsync(request: PopupRequest, popupParams: PopupParams, pkceCodes?: PkceCodes): Promise<AuthenticationResult>; | ||
/** | ||
@@ -45,0 +45,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { ServerTelemetryManager, CommonAuthorizationCodeRequest, AuthorizationCodeClient, ClientConfiguration, CommonEndSessionRequest, AccountInfo, AzureCloudOptions, StringDict } from "@azure/msal-common/browser"; | ||
import { ServerTelemetryManager, CommonAuthorizationCodeRequest, AuthorizationCodeClient, ClientConfiguration, CommonEndSessionRequest, AccountInfo, AzureCloudOptions, StringDict, PkceCodes } from "@azure/msal-common/browser"; | ||
import { BaseInteractionClient } from "./BaseInteractionClient.js"; | ||
@@ -16,4 +16,5 @@ import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; | ||
* @param request | ||
* @param pkceCodes | ||
*/ | ||
protected initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest): Promise<CommonAuthorizationCodeRequest>; | ||
protected initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest, pkceCodes?: PkceCodes): Promise<CommonAuthorizationCodeRequest>; | ||
/** | ||
@@ -20,0 +21,0 @@ * Initializer for the logout request. |
export declare const name = "@azure/msal-browser"; | ||
export declare const version = "4.2.1"; | ||
export declare const version = "4.3.0"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
@@ -13,3 +13,3 @@ { | ||
}, | ||
"version": "4.2.1", | ||
"version": "4.3.0", | ||
"description": "Microsoft Authentication Library for js", | ||
@@ -107,4 +107,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@azure/msal-common": "15.1.1" | ||
"@azure/msal-common": "15.2.0" | ||
} | ||
} |
@@ -23,2 +23,3 @@ /* | ||
invoke, | ||
PkceCodes, | ||
} from "@azure/msal-common/browser"; | ||
@@ -94,4 +95,8 @@ import { StandardInteractionClient } from "./StandardInteractionClient.js"; | ||
* @param request | ||
* @param pkceCodes | ||
*/ | ||
acquireToken(request: PopupRequest): Promise<AuthenticationResult> { | ||
acquireToken( | ||
request: PopupRequest, | ||
pkceCodes?: PkceCodes | ||
): Promise<AuthenticationResult> { | ||
try { | ||
@@ -117,3 +122,7 @@ const popupName = this.generatePopupName( | ||
// Passes on popup position and dimensions if in request | ||
return this.acquireTokenPopupAsync(request, popupParams); | ||
return this.acquireTokenPopupAsync( | ||
request, | ||
popupParams, | ||
pkceCodes | ||
); | ||
} else { | ||
@@ -128,3 +137,7 @@ // asyncPopups flag is set to false. Opens popup before acquiring token. | ||
); | ||
return this.acquireTokenPopupAsync(request, popupParams); | ||
return this.acquireTokenPopupAsync( | ||
request, | ||
popupParams, | ||
pkceCodes | ||
); | ||
} | ||
@@ -187,6 +200,5 @@ } catch (e) { | ||
* Helper which obtains an access_token for your API via opening a popup window in the user's browser | ||
* @param validRequest | ||
* @param popupName | ||
* @param popup | ||
* @param popupWindowAttributes | ||
* @param request | ||
* @param popupParams | ||
* @param pkceCodes | ||
* | ||
@@ -197,3 +209,4 @@ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised. | ||
request: PopupRequest, | ||
popupParams: PopupParams | ||
popupParams: PopupParams, | ||
pkceCodes?: PkceCodes | ||
): Promise<AuthenticationResult> { | ||
@@ -213,3 +226,9 @@ this.logger.verbose("acquireTokenPopupAsync called"); | ||
BrowserUtils.preconnect(validRequest.authority); | ||
/* | ||
* Skip pre-connect for async popups to reduce time between user interaction and popup window creation to avoid | ||
* popup from being blocked by browsers with shorter popup timers | ||
*/ | ||
if (popupParams.popup) { | ||
BrowserUtils.preconnect(validRequest.authority); | ||
} | ||
@@ -225,3 +244,3 @@ try { | ||
this.correlationId | ||
)(validRequest); | ||
)(validRequest, pkceCodes); | ||
@@ -368,3 +387,2 @@ // Initialize the client | ||
} | ||
throw e; | ||
@@ -371,0 +389,0 @@ } |
@@ -23,2 +23,3 @@ /* | ||
StringDict, | ||
PkceCodes, | ||
} from "@azure/msal-common/browser"; | ||
@@ -49,5 +50,7 @@ import { BaseInteractionClient } from "./BaseInteractionClient.js"; | ||
* @param request | ||
* @param pkceCodes | ||
*/ | ||
protected async initializeAuthorizationCodeRequest( | ||
request: AuthorizationUrlRequest | ||
request: AuthorizationUrlRequest, | ||
pkceCodes?: PkceCodes | ||
): Promise<CommonAuthorizationCodeRequest> { | ||
@@ -58,10 +61,13 @@ this.performanceClient.addQueueMeasurement( | ||
); | ||
const generatedPkceParams = await invokeAsync( | ||
generatePkceCodes, | ||
PerformanceEvents.GeneratePkceCodes, | ||
this.logger, | ||
this.performanceClient, | ||
this.correlationId | ||
)(this.performanceClient, this.logger, this.correlationId); | ||
const generatedPkceParams: PkceCodes = | ||
pkceCodes || | ||
(await invokeAsync( | ||
generatePkceCodes, | ||
PerformanceEvents.GeneratePkceCodes, | ||
this.logger, | ||
this.performanceClient, | ||
this.correlationId | ||
)(this.performanceClient, this.logger, this.correlationId)); | ||
const authCodeRequest: CommonAuthorizationCodeRequest = { | ||
@@ -68,0 +74,0 @@ ...request, |
/* eslint-disable header/header */ | ||
export const name = "@azure/msal-browser"; | ||
export const version = "4.2.1"; | ||
export const version = "4.3.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 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
Sorry, the diff of this file is too big to display
6194389
78761
5
+ Added@azure/msal-common@15.2.0(transitive)
- Removed@azure/msal-common@15.1.1(transitive)
Updated@azure/msal-common@15.2.0