@azure/msal-browser
Advanced tools
Comparing version 2.38.4 to 2.39.0
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /*! ***************************************************************************** |
@@ -1,9 +0,9 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; | ||
import { CryptoOps } from '../crypto/CryptoOps.js'; | ||
import { PerformanceEvents, Constants, InteractionRequiredAuthError, AuthError, ClientAuthError, PromptValue, Logger, StubPerformanceClient, DEFAULT_CRYPTO_IMPLEMENTATION } from '@azure/msal-common'; | ||
import { PerformanceEvents, InteractionRequiredAuthError, PromptValue, Constants, Logger, StubPerformanceClient, DEFAULT_CRYPTO_IMPLEMENTATION, AuthError, ClientAuthError } from '@azure/msal-common'; | ||
import { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from '../cache/BrowserCacheManager.js'; | ||
import { buildConfiguration } from '../config/Configuration.js'; | ||
import { InteractionType, ApiId, TemporaryCacheKeys, CacheLookupPolicy, BrowserCacheLocation } from '../utils/BrowserConstants.js'; | ||
import { InteractionType, ApiId, BrowserCacheLocation, TemporaryCacheKeys, CacheLookupPolicy } from '../utils/BrowserConstants.js'; | ||
import { BrowserUtils } from '../utils/BrowserUtils.js'; | ||
@@ -10,0 +10,0 @@ import { name, version } from '../packageMetadata.js'; |
@@ -44,4 +44,5 @@ import { AuthenticationResult, AccountInfo, Logger, PerformanceCallbackFunction } from "@azure/msal-common"; | ||
getConfiguration(): BrowserConfiguration; | ||
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>; | ||
} | ||
export declare const stubbedPublicClientApplication: IPublicClientApplication; | ||
//# sourceMappingURL=IPublicClientApplication.d.ts.map |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -99,3 +99,6 @@ import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js'; | ||
throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError(); | ||
} | ||
}, | ||
hydrateCache: function () { | ||
return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError()); | ||
}, | ||
}; | ||
@@ -102,0 +105,0 @@ |
@@ -8,2 +8,3 @@ import { AccountInfo, AuthenticationResult } from "@azure/msal-common"; | ||
import { SilentRequest } from "../request/SilentRequest"; | ||
import { SsoSilentRequest } from "../request/SsoSilentRequest"; | ||
/** | ||
@@ -71,3 +72,10 @@ * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications | ||
protected acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise<AuthenticationResult>; | ||
/** | ||
* Hydrates cache with the tokens and account in the AuthenticationResult object | ||
* @param result | ||
* @param request - The request object that was used to obtain the AuthenticationResult | ||
* @returns | ||
*/ | ||
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>; | ||
} | ||
//# sourceMappingURL=PublicClientApplication.d.ts.map |
@@ -1,5 +0,5 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; | ||
import { PerformanceEvents, Constants, ServerError, InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage } from '@azure/msal-common'; | ||
import { __extends, __awaiter, __assign, __generator } from '../_virtual/_tslib.js'; | ||
import { PerformanceEvents, AccountEntity, Constants, ServerError, InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage } from '@azure/msal-common'; | ||
import { DEFAULT_REQUEST, InteractionType, CacheLookupPolicy, ApiId, BrowserConstants } from '../utils/BrowserConstants.js'; | ||
@@ -271,2 +271,29 @@ import { ClientApplication } from './ClientApplication.js'; | ||
}; | ||
/** | ||
* Hydrates cache with the tokens and account in the AuthenticationResult object | ||
* @param result | ||
* @param request - The request object that was used to obtain the AuthenticationResult | ||
* @returns | ||
*/ | ||
PublicClientApplication.prototype.hydrateCache = function (result, request) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var accountEntity; | ||
return __generator(this, function (_a) { | ||
this.logger.verbose("hydrateCache called"); | ||
if (result.account) { | ||
accountEntity = AccountEntity.createFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost); | ||
this.browserStorage.setAccount(accountEntity); | ||
if (result.fromNativeBroker) { | ||
this.logger.verbose("Response was from native broker, storing in-memory"); | ||
// Tokens from native broker are stored in-memory | ||
return [2 /*return*/, this.nativeInternalStorage.hydrateCache(result, request)]; | ||
} | ||
else { | ||
return [2 /*return*/, this.browserStorage.hydrateCache(result, request)]; | ||
} | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
}); | ||
}; | ||
return PublicClientApplication; | ||
@@ -273,0 +300,0 @@ }(ClientApplication)); |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
import { CommonAuthorizationCodeRequest, ICrypto, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, CacheManager, ServerTelemetryEntity, ThrottlingEntity, Logger, AuthorityMetadataEntity, AccountInfo, ValidCredentialType, TokenKeys, CredentialType } from "@azure/msal-common"; | ||
import { CommonAuthorizationCodeRequest, ICrypto, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, CacheManager, ServerTelemetryEntity, ThrottlingEntity, Logger, AuthorityMetadataEntity, AccountInfo, ValidCredentialType, TokenKeys, CredentialType, AuthenticationResult } from "@azure/msal-common"; | ||
import { CacheOptions } from "../config/Configuration"; | ||
@@ -7,2 +7,6 @@ import { BrowserCacheLocation, InteractionType } from "../utils/BrowserConstants"; | ||
import { NativeTokenRequest } from "../broker/nativeBroker/NativeRequest"; | ||
import { SilentRequest } from "../request/SilentRequest"; | ||
import { SsoSilentRequest } from "../request/SsoSilentRequest"; | ||
import { RedirectRequest } from "../request/RedirectRequest"; | ||
import { PopupRequest } from "../request/PopupRequest"; | ||
/** | ||
@@ -383,4 +387,10 @@ * This class implements the cache storage interface for MSAL through browser local or session storage. | ||
setRedirectRequestContext(value: string): void; | ||
/** | ||
* Builds credential entities from AuthenticationResult object and saves the resulting credentials to the cache | ||
* @param result | ||
* @param request | ||
*/ | ||
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>; | ||
} | ||
export declare const DEFAULT_BROWSER_CACHE_MANAGER: (clientId: string, logger: Logger) => BrowserCacheManager; | ||
//# sourceMappingURL=BrowserCacheManager.d.ts.map |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -72,2 +72,3 @@ import { ICrypto, Logger, ExternalTokenResponse, AuthenticationResult } from "@azure/msal-common"; | ||
* @param cacheRecord | ||
* @param accountEntity | ||
* @param authority | ||
@@ -74,0 +75,0 @@ * @returns `AuthenticationResult` |
@@ -1,4 +0,4 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
import { AuthToken, CacheRecord, Authority, AccountEntity, IdTokenEntity, ScopeSet, AccessTokenEntity, RefreshTokenEntity, Constants } from '@azure/msal-common'; | ||
import { AuthToken, AccountEntity, CacheRecord, Authority, IdTokenEntity, ScopeSet, AccessTokenEntity, RefreshTokenEntity, Constants } from '@azure/msal-common'; | ||
import { BrowserAuthError } from '../error/BrowserAuthError.js'; | ||
@@ -37,4 +37,5 @@ | ||
var authority; | ||
var cacheRecordAccount; | ||
if (request.account) { | ||
var cacheRecordAccount = this.loadAccount(idToken, request.account.environment, undefined, undefined, request.account.homeAccountId); | ||
cacheRecordAccount = AccountEntity.createFromAccountInfo(request.account); | ||
cacheRecord = new CacheRecord(cacheRecordAccount, this.loadIdToken(idToken, cacheRecordAccount.homeAccountId, request.account.environment, request.account.tenantId), this.loadAccessToken(request, response, cacheRecordAccount.homeAccountId, request.account.environment, request.account.tenantId, options), this.loadRefreshToken(request, response, cacheRecordAccount.homeAccountId, request.account.environment)); | ||
@@ -55,3 +56,3 @@ } | ||
this.logger.trace("TokenCache - homeAccountId from options"); | ||
var cacheRecordAccount = this.loadAccount(idToken, authority.hostnameAndPort, options.clientInfo, authority.authorityType); | ||
cacheRecordAccount = this.loadAccount(idToken, authority, options.clientInfo); | ||
cacheRecord = new CacheRecord(cacheRecordAccount, this.loadIdToken(idToken, cacheRecordAccount.homeAccountId, authority.hostnameAndPort, authority.tenant), this.loadAccessToken(request, response, cacheRecordAccount.homeAccountId, authority.hostnameAndPort, authority.tenant, options), this.loadRefreshToken(request, response, cacheRecordAccount.homeAccountId, authority.hostnameAndPort)); | ||
@@ -61,3 +62,3 @@ } | ||
this.logger.trace("TokenCache - homeAccountId from response"); | ||
var cacheRecordAccount = this.loadAccount(idToken, authority.hostnameAndPort, response.client_info, authority.authorityType); | ||
cacheRecordAccount = this.loadAccount(idToken, authority, response.client_info); | ||
cacheRecord = new CacheRecord(cacheRecordAccount, this.loadIdToken(idToken, cacheRecordAccount.homeAccountId, authority.hostnameAndPort, authority.tenant), this.loadAccessToken(request, response, cacheRecordAccount.homeAccountId, authority.hostnameAndPort, authority.tenant, options), this.loadRefreshToken(request, response, cacheRecordAccount.homeAccountId, authority.hostnameAndPort)); | ||
@@ -72,3 +73,3 @@ } | ||
} | ||
return this.generateAuthenticationResult(request, idToken, cacheRecord, authority); | ||
return this.generateAuthenticationResult(request, idToken, cacheRecord, cacheRecordAccount, authority); | ||
}; | ||
@@ -84,3 +85,3 @@ /** | ||
*/ | ||
TokenCache.prototype.loadAccount = function (idToken, environment, clientInfo, authorityType, requestHomeAccountId) { | ||
TokenCache.prototype.loadAccount = function (idToken, authority, clientInfo, requestHomeAccountId) { | ||
var homeAccountId; | ||
@@ -90,4 +91,4 @@ if (requestHomeAccountId) { | ||
} | ||
else if (authorityType !== undefined && clientInfo) { | ||
homeAccountId = AccountEntity.generateHomeAccountId(clientInfo, authorityType, this.logger, this.cryptoObj, idToken); | ||
else if (authority.authorityType !== undefined && clientInfo) { | ||
homeAccountId = AccountEntity.generateHomeAccountId(clientInfo, authority.authorityType, this.logger, this.cryptoObj, idToken.claims); | ||
} | ||
@@ -97,5 +98,3 @@ if (!homeAccountId) { | ||
} | ||
var accountEntity = clientInfo ? | ||
AccountEntity.createAccount(clientInfo, homeAccountId, idToken, undefined, undefined, undefined, environment) : | ||
AccountEntity.createGenericAccount(homeAccountId, idToken, undefined, undefined, undefined, environment); | ||
var accountEntity = AccountEntity.createAccount({ homeAccountId: homeAccountId, idTokenClaims: idToken.claims, clientInfo: clientInfo, environment: authority.hostnameAndPort }, authority); | ||
if (this.isBrowserEnvironment) { | ||
@@ -190,7 +189,8 @@ this.logger.verbose("TokenCache - loading account"); | ||
* @param cacheRecord | ||
* @param accountEntity | ||
* @param authority | ||
* @returns `AuthenticationResult` | ||
*/ | ||
TokenCache.prototype.generateAuthenticationResult = function (request, idTokenObj, cacheRecord, authority) { | ||
var _a, _b, _c; | ||
TokenCache.prototype.generateAuthenticationResult = function (request, idTokenObj, cacheRecord, accountEntity, authority) { | ||
var _a; | ||
var accessToken = Constants.EMPTY_STRING; | ||
@@ -200,3 +200,3 @@ var responseScopes = []; | ||
var extExpiresOn; | ||
if (cacheRecord === null || cacheRecord === void 0 ? void 0 : cacheRecord.accessToken) { | ||
if (cacheRecord.accessToken) { | ||
accessToken = cacheRecord.accessToken.secret; | ||
@@ -214,3 +214,3 @@ responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target).asArray(); | ||
scopes: responseScopes, | ||
account: (cacheRecord === null || cacheRecord === void 0 ? void 0 : cacheRecord.account) ? cacheRecord.account.getAccountInfo() : null, | ||
account: accountEntity ? accountEntity.getAccountInfo() : null, | ||
idToken: idTokenObj ? idTokenObj.rawToken : Constants.EMPTY_STRING, | ||
@@ -227,4 +227,4 @@ idTokenClaims: idTokenObj ? idTokenObj.claims : {}, | ||
state: Constants.EMPTY_STRING, | ||
cloudGraphHostName: ((_b = cacheRecord === null || cacheRecord === void 0 ? void 0 : cacheRecord.account) === null || _b === void 0 ? void 0 : _b.cloudGraphHostName) || Constants.EMPTY_STRING, | ||
msGraphHost: ((_c = cacheRecord === null || cacheRecord === void 0 ? void 0 : cacheRecord.account) === null || _c === void 0 ? void 0 : _c.msGraphHost) || Constants.EMPTY_STRING, | ||
cloudGraphHostName: accountEntity.cloudGraphHostName || Constants.EMPTY_STRING, | ||
msGraphHost: accountEntity.msGraphHost || Constants.EMPTY_STRING, | ||
code: undefined, | ||
@@ -231,0 +231,0 @@ fromNativeBroker: false |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { Constants } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __spread, __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { Constants } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { Constants } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { AccountEntity, CacheManager } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { EventType } from './EventType.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import * as internals from './internals.js'; |
@@ -1,5 +0,5 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
import { __awaiter, __generator, __spread, __assign } from '../_virtual/_tslib.js'; | ||
import { AccountEntity, AuthenticationScheme, ClientConfigurationError, StringUtils, PerformanceEvents, UrlString, ServerTelemetryManager, AuthorityFactory } from '@azure/msal-common'; | ||
import { UrlString, ServerTelemetryManager, AccountEntity, AuthenticationScheme, ClientConfigurationError, StringUtils, PerformanceEvents, AuthorityFactory } from '@azure/msal-common'; | ||
import { version } from '../packageMetadata.js'; | ||
@@ -6,0 +6,0 @@ import { BrowserConstants } from '../utils/BrowserConstants.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js'; |
@@ -77,11 +77,2 @@ import { AuthenticationResult, Logger, ICrypto, AuthToken, AccountEntity, ScopeSet, IPerformanceClient } from "@azure/msal-common"; | ||
/** | ||
* Creates account entity | ||
* @param response | ||
* @param homeAccountIdentifier | ||
* @param idTokenObj | ||
* @param authority | ||
* @returns | ||
*/ | ||
protected createAccountEntity(response: NativeResponse, homeAccountIdentifier: string, idTokenObj: AuthToken, authority: string): AccountEntity; | ||
/** | ||
* Helper to generate scopes | ||
@@ -125,3 +116,3 @@ * @param response | ||
*/ | ||
cacheNativeTokens(response: NativeResponse, request: NativeTokenRequest, homeAccountIdentifier: string, accountEntity: AccountEntity, idTokenObj: AuthToken, responseAccessToken: string, tenantId: string, reqTimestamp: number): void; | ||
cacheNativeTokens(response: NativeResponse, request: NativeTokenRequest, homeAccountIdentifier: string, idTokenObj: AuthToken, responseAccessToken: string, tenantId: string, reqTimestamp: number): void; | ||
protected addTelemetryFromNativeResponse(response: NativeResponse): MATS | null; | ||
@@ -128,0 +119,0 @@ /** |
@@ -1,5 +0,5 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
import { __extends, __awaiter, __generator, __rest, __assign } from '../_virtual/_tslib.js'; | ||
import { ScopeSet, AuthToken, Constants, AccountEntity, AuthorityType, IdTokenEntity, AccessTokenEntity, CacheRecord, PerformanceEvents, TimeUtils, ClientAuthError, AuthenticationScheme, PopTokenGenerator, UrlString, OIDC_DEFAULT_SCOPES, PromptValue } from '@azure/msal-common'; | ||
import { __extends, __awaiter, __generator, __assign, __rest } from '../_virtual/_tslib.js'; | ||
import { ScopeSet, AuthToken, Constants, AccountEntity, AuthorityType, IdTokenEntity, AccessTokenEntity, CacheRecord, AuthenticationScheme, PerformanceEvents, TimeUtils, ClientAuthError, PopTokenGenerator, UrlString, OIDC_DEFAULT_SCOPES, PromptValue } from '@azure/msal-common'; | ||
import { BaseInteractionClient } from './BaseInteractionClient.js'; | ||
@@ -113,3 +113,3 @@ import { TemporaryCacheKeys, NativeExtensionMethod, NativeConstants, ApiId } from '../utils/BrowserConstants.js'; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var account, silentRequest, result, e_2; | ||
var account, silentRequest, result, fullAccount, e_2; | ||
return __generator(this, function (_a) { | ||
@@ -133,3 +133,4 @@ switch (_a.label) { | ||
result = _a.sent(); | ||
return [2 /*return*/, result]; | ||
fullAccount = __assign(__assign({}, account), { idTokenClaims: result.idTokenClaims }); | ||
return [2 /*return*/, __assign(__assign({}, result), { account: fullAccount })]; | ||
case 3: | ||
@@ -257,3 +258,3 @@ e_2 = _a.sent(); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var authority, authorityPreferredCache, idTokenObj, homeAccountIdentifier, accountEntity, result; | ||
var authority, idTokenObj, homeAccountIdentifier, accountEntity, result; | ||
return __generator(this, function (_a) { | ||
@@ -270,6 +271,10 @@ switch (_a.label) { | ||
authority = _a.sent(); | ||
authorityPreferredCache = authority.getPreferredCache(); | ||
idTokenObj = this.createIdTokenObj(response); | ||
homeAccountIdentifier = this.createHomeAccountIdentifier(response, idTokenObj); | ||
accountEntity = this.createAccountEntity(response, homeAccountIdentifier, idTokenObj, authorityPreferredCache); | ||
accountEntity = AccountEntity.createAccount({ | ||
homeAccountId: homeAccountIdentifier, | ||
idTokenClaims: idTokenObj.claims, | ||
clientInfo: response.client_info, | ||
nativeAccountId: response.account.id, | ||
}, authority); | ||
return [4 /*yield*/, this.generateAuthenticationResult(response, request, idTokenObj, accountEntity, authority.canonicalAuthority, reqTimestamp)]; | ||
@@ -280,3 +285,3 @@ case 2: | ||
this.cacheAccount(accountEntity); | ||
this.cacheNativeTokens(response, request, homeAccountIdentifier, accountEntity, idTokenObj, result.accessToken, result.tenantId, reqTimestamp); | ||
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenObj, result.accessToken, result.tenantId, reqTimestamp); | ||
return [2 /*return*/, result]; | ||
@@ -303,17 +308,6 @@ } | ||
// Save account in browser storage | ||
var homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj); | ||
var homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj.claims); | ||
return homeAccountIdentifier; | ||
}; | ||
/** | ||
* Creates account entity | ||
* @param response | ||
* @param homeAccountIdentifier | ||
* @param idTokenObj | ||
* @param authority | ||
* @returns | ||
*/ | ||
NativeInteractionClient.prototype.createAccountEntity = function (response, homeAccountIdentifier, idTokenObj, authority) { | ||
return AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, authority, response.account.id); | ||
}; | ||
/** | ||
* Helper to generate scopes | ||
@@ -438,3 +432,3 @@ * @param response | ||
*/ | ||
NativeInteractionClient.prototype.cacheNativeTokens = function (response, request, homeAccountIdentifier, accountEntity, idTokenObj, responseAccessToken, tenantId, reqTimestamp) { | ||
NativeInteractionClient.prototype.cacheNativeTokens = function (response, request, homeAccountIdentifier, idTokenObj, responseAccessToken, tenantId, reqTimestamp) { | ||
var cachedIdToken = IdTokenEntity.createIdTokenEntity(homeAccountIdentifier, request.authority, response.id_token || Constants.EMPTY_STRING, request.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING); | ||
@@ -452,3 +446,3 @@ // cache accessToken in inmemory storage | ||
: tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, this.browserCrypto); | ||
var nativeCacheRecord = new CacheRecord(accountEntity, cachedIdToken, cachedAccessToken); | ||
var nativeCacheRecord = new CacheRecord(undefined, cachedIdToken, cachedAccessToken); | ||
this.nativeStorageManager.saveCacheRecord(nativeCacheRecord); | ||
@@ -455,0 +449,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; |
@@ -1,4 +0,4 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; | ||
import { __extends, __awaiter, __assign, __generator } from '../_virtual/_tslib.js'; | ||
import { UrlString, Constants, PerformanceEvents, AuthorizationCodeClient, Authority, AuthorityFactory, ResponseMode, StringUtils, ProtocolUtils } from '@azure/msal-common'; | ||
@@ -5,0 +5,0 @@ import { BaseInteractionClient } from './BaseInteractionClient.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ export { BrowserCacheManager } from './cache/BrowserCacheManager.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
export declare const name = "@azure/msal-browser"; | ||
export declare const version = "2.38.4"; | ||
export declare const version = "2.39.0"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
@@ -1,8 +0,8 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
/* eslint-disable header/header */ | ||
var name = "@azure/msal-browser"; | ||
var version = "2.38.4"; | ||
var version = "2.39.0"; | ||
export { name, version }; | ||
//# sourceMappingURL=packageMetadata.js.map |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { OIDC_DEFAULT_SCOPES } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { StringUtils, ProtocolUtils, ClientAuthError, UrlString } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { Constants } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { Constants, UrlString } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.38.4 2024-03-26 */ | ||
/*! @azure/msal-browser v2.39.0 2024-06-06 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -13,3 +13,3 @@ { | ||
}, | ||
"version": "2.38.4", | ||
"version": "2.39.0", | ||
"description": "Microsoft Authentication Library for js", | ||
@@ -94,4 +94,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@azure/msal-common": "13.3.1" | ||
"@azure/msal-common": "13.3.3" | ||
} | ||
} |
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 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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7010271
51658
+ Added@azure/msal-common@13.3.3(transitive)
- Removed@azure/msal-common@13.3.1(transitive)
Updated@azure/msal-common@13.3.3