Socket
Socket
Sign inDemoInstall

@azure/msal-browser

Package Overview
Dependencies
Maintainers
3
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/msal-browser - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

dist/src/event/EventMessage.d.ts

73

CHANGELOG.json

@@ -5,2 +5,75 @@ {

{
"date": "Tue, 20 Oct 2020 23:47:28 GMT",
"tag": "@azure/msal-browser_v2.4.0",
"version": "2.4.0",
"comments": {
"none": [
{
"comment": "Updated cdn docs for MSAL Browser",
"author": "janutter@microsoft.com",
"commit": "034fc94ad59499932fe7530b0e5ab3152bcbf11e",
"package": "@azure/msal-browser"
},
{
"comment": "Update FAQ (#2440)",
"author": "thomas.norling@microsoft.com",
"commit": "1de35f42e0340d2b3020ba7938d0ae5d7d067a42",
"package": "@azure/msal-browser"
},
{
"comment": "Updated eslint rules (#2345)",
"author": "janutter@microsoft.com",
"commit": "64a4f9e868e63346dfd711dec717abe7fd14d949",
"package": "@azure/msal-browser"
}
],
"minor": [
{
"comment": "Add removeEventCallback API (#2462)",
"author": "thomas.norling@microsoft.com",
"commit": "f934892a769d3287a8edda8ec3f72928ff288ea8",
"package": "@azure/msal-browser"
},
{
"comment": "Add event api to msal-browser (#2394)",
"author": "joarroyo@microsoft.com",
"commit": "b1a6ccc6348b556cd4636511aeb8e58060154daa",
"package": "@azure/msal-browser"
}
],
"patch": [
{
"comment": "Use history API to clear hash for msal-browser",
"author": "janutter@microsoft.com",
"commit": "9a3618b430e9f174505529949ebacf4bccd04858",
"package": "@azure/msal-browser"
},
{
"comment": "Export InteractionType (#2438)",
"author": "thomas.norling@microsoft.com",
"commit": "9fc76a676ed0e157e43e6a9512352fcb29099aae",
"package": "@azure/msal-browser"
},
{
"comment": "Add extraQueryParameters to acquireTokenSilent in msal-browser",
"author": "janutter@microsoft.com",
"commit": "d2132c15c759f33c299761b9869dd1144907c0a8",
"package": "@azure/msal-browser"
},
{
"comment": "Fix unexpected interaction_required error in redirect flow (#2404)",
"author": "thomas.norling@microsoft.com",
"commit": "c22bb29b8880de4bf0b9437a1c2ad48776a9d88f",
"package": "@azure/msal-browser"
},
{
"comment": "Adds support for any OIDC-compliant authority (#2389).",
"author": "jamckenn@microsoft.com",
"commit": "2b6b9ec9033a8b829393e44c3feb7b19b163d2cd",
"package": "@azure/msal-browser"
}
]
}
},
{
"date": "Wed, 14 Oct 2020 23:45:07 GMT",

@@ -7,0 +80,0 @@ "tag": "@azure/msal-browser_v2.3.1",

19

changelog.md
# Change Log - @azure/msal-browser
This log was last generated on Wed, 14 Oct 2020 23:45:07 GMT and should not be manually modified.
This log was last generated on Tue, 20 Oct 2020 23:47:28 GMT and should not be manually modified.
<!-- Start content -->
## 2.4.0
Tue, 20 Oct 2020 23:47:28 GMT
### Minor changes
- Add removeEventCallback API (#2462) (thomas.norling@microsoft.com)
- Add event api to msal-browser (#2394) (joarroyo@microsoft.com)
### Patches
- Use history API to clear hash for msal-browser (janutter@microsoft.com)
- Export InteractionType (#2438) (thomas.norling@microsoft.com)
- Add extraQueryParameters to acquireTokenSilent in msal-browser (janutter@microsoft.com)
- Fix unexpected interaction_required error in redirect flow (#2404) (thomas.norling@microsoft.com)
- Adds support for any OIDC-compliant authority (#2389). (jamckenn@microsoft.com)
## 2.3.1

@@ -8,0 +25,0 @@

@@ -10,2 +10,4 @@ import { CryptoOps } from "../crypto/CryptoOps";

import { SsoSilentRequest } from "../request/SsoSilentRequest";
import { EventError, EventPayload, EventCallbackFunction } from "../event/EventMessage";
import { EventType } from "../event/EventType";
export declare abstract class ClientApplication {

@@ -20,2 +22,3 @@ protected readonly browserCrypto: CryptoOps;

protected isBrowserEnvironment: boolean;
private eventCallbacks;
/**

@@ -109,2 +112,8 @@ * @constructor

/**
* This function uses a hidden iframe to fetch an authorization code from the eSTS. To be used for silent refresh token acquisition and renewal.
* @param {@link AuthorizationUrlRequest}
* @param request
*/
private acquireTokenByIframe;
/**
* Use this function to obtain a token before every call to the API / resource provider

@@ -233,2 +242,16 @@ *

protected initializeLogoutRequest(logoutRequest?: EndSessionRequest): EndSessionRequest;
/**
* Emits events by calling callback with event message
* @param eventType
* @param interactionType
* @param payload
* @param error
*/
protected emitEvent(eventType: EventType, interactionType?: InteractionType, payload?: EventPayload, error?: EventError): void;
/**
* Adds event callbacks to array
* @param callback
*/
addEventCallback(callback: EventCallbackFunction): string | null;
removeEventCallback(callbackId: string): void;
}

4

dist/src/app/IPublicClientApplication.d.ts

@@ -10,4 +10,6 @@ import { AuthenticationResult, AccountInfo, EndSessionRequest } from "@azure/msal-common";

acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
addEventCallback(callback: Function): string | null;
removeEventCallback(callbackId: string): void;
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
getAccountByUsername(userName: string): AccountInfo | null;
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
getAllAccounts(): AccountInfo[];

@@ -14,0 +16,0 @@ handleRedirectPromise(): Promise<AuthenticationResult | null>;

@@ -53,3 +53,9 @@ import { AuthenticationResult } from "@azure/msal-common";

loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;
/**
* Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.
*
* @param {@link (SilentRequest:type)}
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object
*/
acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult>;
}

@@ -1,2 +0,2 @@

import { SystemOptions, LoggerOptions, INetworkModule } from "@azure/msal-common";
import { SystemOptions, LoggerOptions, INetworkModule, ProtocolMode } from "@azure/msal-common";
/**

@@ -13,2 +13,3 @@ * Use this to configure the auth options in the Configuration object

* - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
* - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
*/

@@ -24,2 +25,3 @@ export declare type BrowserAuthOptions = {

clientCapabilities?: Array<string>;
protocolMode?: ProtocolMode;
};

@@ -45,2 +47,3 @@ /**

* - loadFrameTimeout - Maximum time the library should wait for a frame to load
* - redirectNavigationTimeout - Time to wait for redirection to occur before resolving promise
* - asyncPopups - Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.

@@ -54,2 +57,3 @@ */

loadFrameTimeout?: number;
redirectNavigationTimeout?: number;
asyncPopups?: boolean;

@@ -56,0 +60,0 @@ };

export { PublicClientApplication } from "./app/PublicClientApplication";
export { Configuration } from "./config/Configuration";
export { InteractionType } from "./utils/BrowserConstants";
export { BrowserAuthError, BrowserAuthErrorMessage } from "./error/BrowserAuthError";

@@ -10,2 +11,4 @@ export { BrowserConfigurationAuthError, BrowserConfigurationAuthErrorMessage } from "./error/BrowserConfigurationAuthError";

export { SsoSilentRequest } from "./request/SsoSilentRequest";
export { AuthenticationScheme, AccountInfo, AuthorizationUrlRequest, EndSessionRequest, AuthenticationResult, InteractionRequiredAuthError, AuthError, AuthErrorMessage, INetworkModule, ILoggerCallback, Logger, LogLevel } from "@azure/msal-common";
export { EventMessage, EventPayload, EventError, EventCallbackFunction } from "./event/EventMessage";
export { EventType } from "./event/EventType";
export { AuthenticationScheme, AccountInfo, AuthorizationUrlRequest, EndSessionRequest, AuthenticationResult, InteractionRequiredAuthError, AuthError, AuthErrorMessage, INetworkModule, ILoggerCallback, Logger, LogLevel, ProtocolMode } from "@azure/msal-common";

@@ -1,4 +0,9 @@

import { AuthorizationCodeRequest, ICrypto, AuthenticationResult } from "@azure/msal-common";
import { InteractionHandler } from "./InteractionHandler";
export declare class RedirectHandler extends InteractionHandler {
import { AuthorizationCodeClient, AuthorizationCodeRequest, ICrypto, AuthenticationResult } from "@azure/msal-common";
import { BrowserStorage } from "../cache/BrowserStorage";
export declare class RedirectHandler {
private authModule;
private browserStorage;
private browserCrypto;
private authCodeRequest;
constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserStorage, browserCrypto: ICrypto);
/**

@@ -8,3 +13,3 @@ * Redirects window to given URL.

*/
initiateAuthRequest(requestUrl: string, authCodeRequest: AuthorizationCodeRequest, redirectStartPage?: string, browserCrypto?: ICrypto): Window;
initiateAuthRequest(requestUrl: string, authCodeRequest: AuthorizationCodeRequest, redirectTimeout: number, redirectStartPage?: string): Promise<void>;
/**

@@ -14,3 +19,3 @@ * Handle authorization code response in the window.

*/
handleCodeResponse(locationHash: string, browserCrypto?: ICrypto, clientId?: string): Promise<AuthenticationResult>;
handleCodeResponse(locationHash: string, clientId?: string): Promise<AuthenticationResult>;
}

@@ -1,2 +0,2 @@

import { SilentFlowRequest } from "@azure/msal-common";
import { SilentFlowRequest, StringDict } from "@azure/msal-common";
/**

@@ -12,2 +12,3 @@ * SilentRequest: Request object passed by user to retrieve tokens from the

* - forceRefresh - Forces silent requests to make network calls if true.
* - extraQueryParameters - String to string map of custom query parameters. Only used when renewing the refresh token.
* - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. Only used for cases where refresh token is expired.

@@ -17,2 +18,3 @@ */

redirectUri?: string;
extraQueryParameters?: StringDict;
};

@@ -53,7 +53,7 @@ import { AuthorizationUrlRequest } from "@azure/msal-common";

export declare enum InteractionType {
REDIRECT = "redirect",
POPUP = "popup",
SILENT = "silent"
Redirect = "redirect",
Popup = "popup",
Silent = "silent"
}
export declare const DEFAULT_REQUEST: AuthorizationUrlRequest;
export declare const KEY_FORMAT_JWK = "jwk";

@@ -1,2 +0,2 @@

import { INetworkModule } from "@azure/msal-common";
import { INetworkModule, Logger } from "@azure/msal-common";
/**

@@ -11,3 +11,3 @@ * Utility class for browser specific functions

*/
static navigateWindow(urlNavigate: string, noHistory?: boolean): void;
static navigateWindow(urlNavigate: string, navigationTimeout: number, logger: Logger, noHistory?: boolean): Promise<void>;
/**

@@ -14,0 +14,0 @@ * Clears hash from window url.

@@ -13,3 +13,3 @@ {

},
"version": "2.3.1",
"version": "2.4.0",
"description": "Microsoft Authentication Library for js",

@@ -99,4 +99,4 @@ "keywords": [

"dependencies": {
"@azure/msal-common": "^1.6.0"
"@azure/msal-common": "^1.6.2"
}
}

@@ -59,18 +59,10 @@ # Microsoft Authentication Library for JavaScript (MSAL.js) 2.0 for Browser-Based Single-Page Applications

```
### Via CDN (with SRI Hash):
### Via CDN:
See [here](./docs/cdn-usage.md) for more info on how to use this package from the Microsoft CDN.
### Compiled
```javascript
<script src="https://alcdn.msauth.net/browser/2.1.0/js/msal-browser.js" integrity="sha384-M9bRB06LdiYadS+F9rPQnntFCYR3UJvtb2Vr4Tmhw9WBwWUfxH8VDRAFKNn3VTc/" crossorigin="anonymous"></script>
```html
<script src="https://alcdn.msauth.net/browser/2.4.0/js/msal-browser.min.js"></script>
```
### Minified
See [here](./docs/cdn-usage.md) for more info on how to use this package from the Microsoft CDN.
```javascript
<script src="https://alcdn.msauth.net/browser/2.1.0/js/msal-browser.min.js" integrity="sha384-EmYPwkfj+VVmL1brMS1h6jUztl4QMS8Qq8xlZNgIT/luzg7MAzDVrRa2JxbNmk/e" crossorigin="anonymous"></script>
```
## Usage

@@ -77,0 +69,0 @@

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc