Socket
Socket
Sign inDemoInstall

@azure/msal-common

Package Overview
Dependencies
Maintainers
3
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/msal-common - npm Package Compare versions

Comparing version 7.1.0 to 7.2.0

dist/config/AppTokenProvider.d.ts

2

dist/_virtual/_tslib.js

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*! *****************************************************************************

@@ -26,2 +26,6 @@ import { TokenClaims } from "./TokenClaims";

};
export declare type ActiveAccountFilters = {
homeAccountId: string;
localAccountId: string;
};
//# sourceMappingURL=AccountInfo.d.ts.map

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientAuthError } from '../error/ClientAuthError.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientAuthError } from '../error/ClientAuthError.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

@@ -238,2 +238,8 @@ import { AccountCache, AccountFilter, CredentialFilter, CredentialCache, ValidCredentialType, AppMetadataFilter, AppMetadataCache } from "./utils/CacheTypes";

/**
* Retrieve AccountEntity from cache
* @param nativeAccountId
* @returns AccountEntity or Null
*/
readAccountFromCacheWithNativeAccountId(nativeAccountId: string): AccountEntity | null;
/**
* Retrieve IdTokenEntity from cache

@@ -313,2 +319,9 @@ * @param clientId

/**
* helper to match nativeAccountId
* @param entity
* @param nativeAccountId
* @returns boolean indicating the match result
*/
private matchNativeAccountId;
/**
* Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.

@@ -315,0 +328,0 @@ * @param entity

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -132,3 +132,3 @@ import { __awaiter, __generator, __extends } from '../_virtual/_tslib.js';

CacheManager.prototype.getAccountsFilteredBy = function (accountFilter) {
return this.getAccountsFilteredByInternal(accountFilter ? accountFilter.homeAccountId : Constants.EMPTY_STRING, accountFilter ? accountFilter.environment : Constants.EMPTY_STRING, accountFilter ? accountFilter.realm : Constants.EMPTY_STRING);
return this.getAccountsFilteredByInternal(accountFilter ? accountFilter.homeAccountId : Constants.EMPTY_STRING, accountFilter ? accountFilter.environment : Constants.EMPTY_STRING, accountFilter ? accountFilter.realm : Constants.EMPTY_STRING, accountFilter ? accountFilter.nativeAccountId : Constants.EMPTY_STRING);
};

@@ -142,3 +142,3 @@ /**

*/
CacheManager.prototype.getAccountsFilteredByInternal = function (homeAccountId, environment, realm) {
CacheManager.prototype.getAccountsFilteredByInternal = function (homeAccountId, environment, realm, nativeAccountId) {
var _this = this;

@@ -161,2 +161,5 @@ var allCacheKeys = this.getKeys();

}
if (!!nativeAccountId && !_this.matchNativeAccountId(entity, nativeAccountId)) {
return;
}
matchingAccounts[cacheKey] = entity;

@@ -491,2 +494,22 @@ });

/**
* Retrieve AccountEntity from cache
* @param nativeAccountId
* @returns AccountEntity or Null
*/
CacheManager.prototype.readAccountFromCacheWithNativeAccountId = function (nativeAccountId) {
// fetch account from memory
var accountFilter = {
nativeAccountId: nativeAccountId
};
var accountCache = this.getAccountsFilteredBy(accountFilter);
var accounts = Object.keys(accountCache).map(function (key) { return accountCache[key]; });
if (accounts.length < 1) {
return null;
}
else if (accounts.length > 1) {
throw ClientAuthError.createMultipleMatchingAccountsInCacheError();
}
return accountCache[0];
};
/**
* Retrieve IdTokenEntity from cache

@@ -666,2 +689,11 @@ * @param clientId

/**
* helper to match nativeAccountId
* @param entity
* @param nativeAccountId
* @returns boolean indicating the match result
*/
CacheManager.prototype.matchNativeAccountId = function (entity, nativeAccountId) {
return !!(entity.nativeAccountId && nativeAccountId === entity.nativeAccountId);
};
/**
* Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.

@@ -668,0 +700,0 @@ * @param entity

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { Separators, CacheAccountType, CacheType, Constants } from '../../utils/Constants.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { Separators, APP_METADATA } from '../../utils/Constants.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { AUTHORITY_METADATA_CONSTANTS } from '../../utils/Constants.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { CredentialType, CacheType, Constants, Separators, AuthenticationScheme } from '../../utils/Constants.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { SERVER_TELEM_CONSTANTS } from '../../utils/Constants.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { ThrottlingConstants } from '../../utils/Constants.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

@@ -35,2 +35,3 @@ import { AccountEntity } from "../entities/AccountEntity";

realm?: string;
nativeAccountId?: string;
};

@@ -37,0 +38,0 @@ /**

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -117,3 +117,3 @@ import { __extends, __awaiter, __generator, __assign, __spreadArrays } from '../_virtual/_tslib.js';

var queryString = this.createLogoutUrlQueryString(logoutRequest);
// Construct logout URI.
// Construct logout URI
return UrlString.appendQueryString(this.authority.endSessionEndpoint, queryString);

@@ -120,0 +120,0 @@ };

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

@@ -5,2 +5,3 @@ import { ClientConfiguration } from "../config/ClientConfiguration";

import { CommonClientCredentialRequest } from "../request/CommonClientCredentialRequest";
import { IAppTokenProvider } from "../config/AppTokenProvider";
/**

@@ -11,3 +12,4 @@ * OAuth2.0 client credential grant

private scopeSet;
constructor(configuration: ClientConfiguration);
private readonly appTokenProvider?;
constructor(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider);
/**

@@ -14,0 +16,0 @@ * Public API to acquire a token with ClientCredential Flow for Confidential clients

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -7,3 +7,3 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

import { ScopeSet } from '../request/ScopeSet.js';
import { Constants, CredentialType, GrantType, CacheOutcome } from '../utils/Constants.js';
import { Constants, CredentialType, GrantType, CacheOutcome, AuthenticationScheme } from '../utils/Constants.js';
import { ResponseHandler } from '../response/ResponseHandler.js';

@@ -23,4 +23,6 @@ import { TimeUtils } from '../utils/TimeUtils.js';

__extends(ClientCredentialClient, _super);
function ClientCredentialClient(configuration) {
return _super.call(this, configuration) || this;
function ClientCredentialClient(configuration, appTokenProvider) {
var _this = _super.call(this, configuration) || this;
_this.appTokenProvider = appTokenProvider;
return _this;
}

@@ -113,6 +115,26 @@ /**

return __awaiter(this, void 0, void 0, function () {
var requestBody, headers, thumbprint, reqTimestamp, response, responseHandler, tokenResponse;
var serverTokenResponse, reqTimestamp, appTokenPropviderParameters, appTokenProviderResult, requestBody, headers, thumbprint, response, responseHandler, tokenResponse;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!this.appTokenProvider) return [3 /*break*/, 2];
this.logger.info("Using appTokenProvider extensibility.");
appTokenPropviderParameters = {
correlationId: request.correlationId,
tenantId: this.config.authOptions.authority.tenant,
scopes: request.scopes,
claims: request.claims,
};
reqTimestamp = TimeUtils.nowSeconds();
return [4 /*yield*/, this.appTokenProvider(appTokenPropviderParameters)];
case 1:
appTokenProviderResult = _a.sent();
serverTokenResponse = {
access_token: appTokenProviderResult.accessToken,
expires_in: appTokenProviderResult.expiresInSeconds,
refresh_in: appTokenProviderResult.refreshInSeconds,
token_type: AuthenticationScheme.BEARER
};
return [3 /*break*/, 4];
case 2:
requestBody = this.createTokenRequestBody(request);

@@ -133,8 +155,11 @@ headers = this.createTokenRequestHeaders();

return [4 /*yield*/, this.executePostToTokenEndpoint(authority.tokenEndpoint, requestBody, headers, thumbprint)];
case 1:
case 3:
response = _a.sent();
serverTokenResponse = response.body;
_a.label = 4;
case 4:
responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
responseHandler.validateTokenResponse(response.body);
return [4 /*yield*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request)];
case 2:
responseHandler.validateTokenResponse(serverTokenResponse);
return [4 /*yield*/, responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request)];
case 5:
tokenResponse = _a.sent();

@@ -141,0 +166,0 @@ return [2 /*return*/, tokenResponse];

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -43,3 +43,3 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';

responseHandler.validateTokenResponse(response.body);
return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true)];
return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache)];
}

@@ -46,0 +46,0 @@ });

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

@@ -134,3 +134,3 @@ import { INetworkModule } from "../network/INetworkModule";

*/
export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache }: ClientConfiguration): CommonClientConfiguration;
export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }: ClientConfiguration): CommonClientConfiguration;
//# sourceMappingURL=ClientConfiguration.d.ts.map

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -93,3 +93,3 @@ import { __assign, __awaiter, __generator } from '../_virtual/_tslib.js';

persistencePlugin: persistencePlugin || null,
serializableCache: serializableCache || null
serializableCache: serializableCache || null,
};

@@ -96,0 +96,0 @@ }

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { JoseHeaderError } from '../error/JoseHeaderError.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

@@ -13,4 +13,5 @@ /**

export { AuthOptions, SystemOptions, LoggerOptions, DEFAULT_SYSTEM_OPTIONS, AzureCloudOptions, ApplicationTelemetry } from "./config/ClientConfiguration";
export { IAppTokenProvider, AppTokenProviderParameters, AppTokenProviderResult } from "./config/AppTokenProvider";
export { ClientConfiguration } from "./config/ClientConfiguration";
export { AccountInfo } from "./account/AccountInfo";
export { AccountInfo, ActiveAccountFilters } from "./account/AccountInfo";
export { AuthToken } from "./account/AuthToken";

@@ -17,0 +18,0 @@ export { AuthToken as IdToken } from "./account/AuthToken";

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { StringUtils } from '../utils/StringUtils.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { AuthError } from '../error/AuthError.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { ThrottlingConstants, CacheSchemaType, Constants, HeaderNames } from '../utils/Constants.js';

export declare const name = "@azure/msal-common";
export declare const version = "7.1.0";
export declare const version = "7.2.0";
//# sourceMappingURL=packageMetadata.d.ts.map

@@ -1,8 +0,8 @@

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';
/* eslint-disable header/header */
var name = "@azure/msal-common";
var version = "7.1.0";
var version = "7.2.0";
export { name, version };
//# sourceMappingURL=packageMetadata.js.map

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientConfigurationError } from '../error/ClientConfigurationError.js';

@@ -11,4 +11,5 @@ import { BaseAuthRequest } from "./BaseAuthRequest";

* - refreshToken - A refresh token returned from a previous request to the Identity provider.
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
* - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios.
*/

@@ -19,3 +20,4 @@ export declare type CommonRefreshTokenRequest = BaseAuthRequest & {

ccsCredential?: CcsCredential;
forceCache?: boolean;
};
//# sourceMappingURL=CommonRefreshTokenRequest.d.ts.map

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __spreadArrays } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { StringUtils } from '../utils/StringUtils.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __spreadArrays } from '../_virtual/_tslib.js';

@@ -44,3 +44,3 @@ import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse";

*/
handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, reqTimestamp: number, request: BaseAuthRequest, authCodePayload?: AuthorizationCodePayload, userAssertionHash?: string, handlingRefreshTokenResponse?: boolean): Promise<AuthenticationResult>;
handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, reqTimestamp: number, request: BaseAuthRequest, authCodePayload?: AuthorizationCodePayload, userAssertionHash?: string, handlingRefreshTokenResponse?: boolean, forceCacheRefreshTokenResponse?: boolean): Promise<AuthenticationResult>;
/**

@@ -47,0 +47,0 @@ * Generates CacheRecord

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -82,3 +82,3 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

*/
ResponseHandler.prototype.handleServerTokenResponse = function (serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse) {
ResponseHandler.prototype.handleServerTokenResponse = function (serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse) {
return __awaiter(this, void 0, void 0, function () {

@@ -120,5 +120,6 @@ var idTokenObj, requestStateObj, cacheRecord, cacheContext, key, account;

* If not present, we should return null, as it's the case that another application called removeAccount in between
* the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal.
* the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal, unless explicitly flagged by
* the developer, as in the case of refresh token flow used in ADAL Node to MSAL Node migration.
*/
if (handlingRefreshTokenResponse && cacheRecord.account) {
if (handlingRefreshTokenResponse && !forceCacheRefreshTokenResponse && cacheRecord.account) {
key = cacheRecord.account.generateAccountKey();

@@ -128,3 +129,3 @@ account = this.cacheStorage.getAccount(key);

this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache");
return [2 /*return*/, ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenObj, requestStateObj)];
return [2 /*return*/, ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenObj, requestStateObj, undefined)];
}

@@ -131,0 +132,0 @@ }

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -62,3 +62,3 @@ import { __assign } from '../../_virtual/_tslib.js';

startTimeMs: Date.now(),
correlationId: eventCorrelationId
correlationId: eventCorrelationId,
};

@@ -208,2 +208,8 @@ // Store in progress events so they can be discarded if not ended properly

}
if (current.accessTokenSize) {
previous.accessTokenSize = current.accessTokenSize;
}
if (current.idTokenSize) {
previous.idTokenSize = current.idTokenSize;
}
}

@@ -210,0 +216,0 @@ return previous;

@@ -77,3 +77,16 @@ /**

*/
NativeInteractionClientAcquireToken = "nativeInteractionClientAcquireToken"
NativeInteractionClientAcquireToken = "nativeInteractionClientAcquireToken",
/**
* Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
*/
BrokerHandhshake = "brokerHandshake",
/**
* acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
*/
AcquireTokenByRefreshTokenInBroker = "acquireTokenByRefreshTokenInBroker",
/**
* acquireToken API in BrokerClientApplication.
* Used to acquire a token on behalf of the embedded application (PW-Broker).
*/
AcquireTokenByBroker = "acquireTokenByBroker"
}

@@ -198,2 +211,15 @@ /**

/**
* Size of the id token
*
* @type {number}
*/
idTokenSize?: number;
/**
*
* Size of the access token
*
* @type {number}
*/
accessTokenSize?: number;
/**
* Application name as specified by the app.

@@ -200,0 +226,0 @@ *

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -85,2 +85,15 @@ /*

PerformanceEvents["NativeInteractionClientAcquireToken"] = "nativeInteractionClientAcquireToken";
/**
* Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
*/
PerformanceEvents["BrokerHandhshake"] = "brokerHandshake";
/**
* acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
*/
PerformanceEvents["AcquireTokenByRefreshTokenInBroker"] = "acquireTokenByRefreshTokenInBroker";
/**
* acquireToken API in BrokerClientApplication.
* Used to acquire a token on behalf of the embedded application (PW-Broker).
*/
PerformanceEvents["AcquireTokenByBroker"] = "acquireTokenByBroker";
})(PerformanceEvents || (PerformanceEvents = {}));

@@ -87,0 +100,0 @@ /**

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../../_virtual/_tslib.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { SERVER_TELEM_CONSTANTS, CacheOutcome, Constants, Separators } from '../../utils/Constants.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientConfigurationError } from '../error/ClientConfigurationError.js';

@@ -36,2 +36,3 @@ export declare const Constants: {

ID_TOKEN_RESPONSE_TYPE: string;
SHR_NONCE_VALIDITY: number;
};

@@ -59,3 +60,4 @@ export declare const OIDC_DEFAULT_SCOPES: string[];

ERROR_DESC = "error.description",
ACTIVE_ACCOUNT = "active-account"
ACTIVE_ACCOUNT = "active-account",
ACTIVE_ACCOUNT_FILTERS = "active-account-filters"
}

@@ -62,0 +64,0 @@ /**

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -53,3 +53,4 @@ import { __spreadArrays } from '../_virtual/_tslib.js';

TOKEN_RESPONSE_TYPE: "token",
ID_TOKEN_RESPONSE_TYPE: "id_token"
ID_TOKEN_RESPONSE_TYPE: "id_token",
SHR_NONCE_VALIDITY: 240,
};

@@ -86,2 +87,3 @@ var OIDC_DEFAULT_SCOPES = [

PersistentCacheKeys["ACTIVE_ACCOUNT"] = "active-account";
PersistentCacheKeys["ACTIVE_ACCOUNT_FILTERS"] = "active-account-filters"; // new cache entry for active_account for a more robust version for browser
})(PersistentCacheKeys || (PersistentCacheKeys = {}));

@@ -88,0 +90,0 @@ /**

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { StringUtils } from './StringUtils.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientAuthError } from '../error/ClientAuthError.js';

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

/*! @azure/msal-common v7.1.0 2022-07-05 */
/*! @azure/msal-common v7.2.0 2022-07-18 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

},
"version": "7.1.0",
"version": "7.2.0",
"description": "Microsoft Authentication Library for js",

@@ -60,3 +60,3 @@ "keywords": [

"@types/debug": "^4.1.5",
"@types/jest": "^26.0.23",
"@types/jest": "^27.0.0",
"@types/lodash": "^4.14.182",

@@ -73,3 +73,3 @@ "@types/sinon": "^7.5.0",

"sinon": "^7.5.0",
"ts-jest": "^27.0.2",
"ts-jest": "^27.1.5",
"tslib": "^1.10.0",

@@ -76,0 +76,0 @@ "tslint": "^5.20.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 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 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

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