Socket
Socket
Sign inDemoInstall

@azure/msal-node

Package Overview
Dependencies
Maintainers
3
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/msal-node - npm Package Compare versions

Comparing version 2.5.1 to 2.6.0

11

dist/cache/NodeStorage.d.ts

@@ -68,2 +68,8 @@ import { TokenKeys, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, ThrottlingEntity, CacheManager, Logger, ValidCacheType, ICrypto, AuthorityMetadataEntity, ValidCredentialType, StaticAuthorityOptions } from "@azure/msal-common";

/**
* Reads account from cache, builds it into an account entity and returns it.
* @param accountKey
* @returns
*/
getCachedAccountEntity(accountKey: string): AccountEntity | null;
/**
* set account entity

@@ -157,2 +163,7 @@ * @param account - cache value to be set of type AccountEntity

/**
* Remove account entity from the platform cache if it's outdated
* @param accountKey
*/
removeOutdatedAccount(accountKey: string): void;
/**
* Checks whether key is in cache.

@@ -159,0 +170,0 @@ * @param key - look up key for a cache entity

1

dist/cache/serializer/SerializerTypes.d.ts

@@ -44,2 +44,3 @@ import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache, ValidCacheType } from "@azure/msal-common";

last_modification_app?: string;
tenantProfiles?: string[];
};

@@ -46,0 +47,0 @@ /**

2

dist/packageMetadata.d.ts
export declare const name = "@azure/msal-node";
export declare const version = "2.5.1";
export declare const version = "2.6.0";
//# sourceMappingURL=packageMetadata.d.ts.map
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@azure/msal-node",
"version": "2.5.1",
"version": "2.6.0",
"author": {

@@ -80,3 +80,3 @@ "name": "Microsoft",

"dependencies": {
"@azure/msal-common": "14.4.0",
"@azure/msal-common": "14.5.0",
"jsonwebtoken": "^9.0.0",

@@ -83,0 +83,0 @@ "uuid": "^8.3.0"

@@ -221,5 +221,5 @@ /*

getAccount(accountKey: string): AccountEntity | null {
const account = this.getItem(accountKey) as AccountEntity;
if (AccountEntity.isAccountEntity(account)) {
return account;
const accountEntity = this.getCachedAccountEntity(accountKey);
if (accountEntity && AccountEntity.isAccountEntity(accountEntity)) {
return this.updateOutdatedCachedAccount(accountKey, accountEntity);
}

@@ -230,2 +230,14 @@ return null;

/**
* Reads account from cache, builds it into an account entity and returns it.
* @param accountKey
* @returns
*/
getCachedAccountEntity(accountKey: string): AccountEntity | null {
const cachedAccount = this.getItem(accountKey);
return cachedAccount
? Object.assign(new AccountEntity(), this.getItem(accountKey))
: null;
}
/**
* set account entity

@@ -462,2 +474,10 @@ * @param account - cache value to be set of type AccountEntity

/**
* Remove account entity from the platform cache if it's outdated
* @param accountKey
*/
removeOutdatedAccount(accountKey: string): void {
this.removeItem(accountKey);
}
/**
* Checks whether key is in cache.

@@ -464,0 +484,0 @@ * @param key - look up key for a cache entity

@@ -66,2 +66,7 @@ /*

lastModificationApp: serializedAcc.last_modification_app,
tenantProfiles: serializedAcc.tenantProfiles?.map(
(serializedTenantProfile) => {
return JSON.parse(serializedTenantProfile);
}
),
};

@@ -68,0 +73,0 @@ const account: AccountEntity = new AccountEntity();

@@ -53,2 +53,7 @@ /*

last_modification_app: accountEntity.lastModificationApp,
tenantProfiles: accountEntity.tenantProfiles?.map(
(tenantProfile) => {
return JSON.stringify(tenantProfile);
}
),
};

@@ -55,0 +60,0 @@ });

@@ -60,2 +60,3 @@ /*

last_modification_app?: string;
tenantProfiles?: string[];
};

@@ -62,0 +63,0 @@

@@ -127,3 +127,3 @@ /*

if (this.persistence) {
cacheContext = new TokenCacheContext(this, false);
cacheContext = new TokenCacheContext(this, true);
await this.persistence.beforeCacheAccess(cacheContext);

@@ -130,0 +130,0 @@ }

@@ -188,3 +188,3 @@ /*

);
return authorizationCodeClient.acquireToken(
return await authorizationCodeClient.acquireToken(
validRequest,

@@ -242,3 +242,3 @@ authCodePayLoad

);
return refreshTokenClient.acquireToken(validRequest);
return await refreshTokenClient.acquireToken(validRequest);
} catch (e) {

@@ -291,3 +291,3 @@ if (e instanceof AuthError) {

);
return silentFlowClient.acquireToken(validRequest);
return await silentFlowClient.acquireToken(validRequest);
} catch (e) {

@@ -343,3 +343,3 @@ if (e instanceof AuthError) {

);
return usernamePasswordClient.acquireToken(validRequest);
return await usernamePasswordClient.acquireToken(validRequest);
} catch (e) {

@@ -419,6 +419,2 @@ if (e instanceof AuthError) {

// using null assertion operator as we ensure that all config values have default values in buildConfiguration()
this.logger.verbose(
`building oauth client configuration with the authority: ${authority}`,
requestCorrelationId
);
const discoveredAuthority = await this.createAuthority(

@@ -431,2 +427,7 @@ authority,

this.logger.info(
`Building oauth client configuration with the following authority: ${discoveredAuthority.tokenEndpoint}.`,
requestCorrelationId
);
serverTelemetryManager?.updateRegionDiscoveryMetadata(

@@ -589,3 +590,3 @@ discoveredAuthority.regionDiscoveryMetadata

return await AuthorityFactory.createDiscoveredInstance(
return AuthorityFactory.createDiscoveredInstance(
authorityUrl,

@@ -592,0 +593,0 @@ this.config.system.networkClient,

@@ -58,3 +58,3 @@ /*

if (request.skipCache) {
return await this.executeTokenRequest(request, this.authority);
return this.executeTokenRequest(request, this.authority);
}

@@ -84,3 +84,3 @@

} else {
return await this.executeTokenRequest(request, this.authority);
return this.executeTokenRequest(request, this.authority);
}

@@ -234,2 +234,3 @@ }

);
const requestBody = this.createTokenRequestBody(request);

@@ -250,2 +251,6 @@ const headers: Record<string, string> =

this.logger.info(
"Sending token request to endpoint: " + authority.tokenEndpoint
);
reqTimestamp = TimeUtils.nowSeconds();

@@ -252,0 +257,0 @@ const response = await this.executePostToTokenEndpoint(

@@ -161,3 +161,3 @@ /*

);
return clientCredentialClient.acquireToken(validRequest);
return await clientCredentialClient.acquireToken(validRequest);
} catch (e) {

@@ -207,3 +207,3 @@ if (e instanceof AuthError) {

);
return oboClient.acquireToken(validRequest);
return await oboClient.acquireToken(validRequest);
} catch (e) {

@@ -210,0 +210,0 @@ if (e instanceof AuthError) {

@@ -63,3 +63,3 @@ /*

responseHandler.validateTokenResponse(response);
return await responseHandler.handleServerTokenResponse(
return responseHandler.handleServerTokenResponse(
response,

@@ -66,0 +66,0 @@ this.authority,

@@ -62,3 +62,3 @@ /*

if (request.skipCache) {
return await this.executeTokenRequest(
return this.executeTokenRequest(
request,

@@ -155,3 +155,3 @@ this.authority,

return await ResponseHandler.generateAuthenticationResult(
return ResponseHandler.generateAuthenticationResult(
this.cryptoUtils,

@@ -189,10 +189,10 @@ this.authority,

const idTokens: IdTokenEntity[] =
const idTokenMap: Map<string, IdTokenEntity> =
this.cacheManager.getIdTokensByFilter(idTokenFilter);
// When acquiring a token on behalf of an application, there might not be an id token in the cache
if (idTokens.length < 1) {
if (Object.values(idTokenMap).length < 1) {
return null;
}
return idTokens[0] as IdTokenEntity;
return Object.values(idTokenMap)[0] as IdTokenEntity;
}

@@ -199,0 +199,0 @@

@@ -120,3 +120,3 @@ /*

);
return deviceCodeClient.acquireToken(validRequest);
return await deviceCodeClient.acquireToken(validRequest);
} catch (e) {

@@ -123,0 +123,0 @@ if (e instanceof AuthError) {

/* eslint-disable header/header */
export const name = "@azure/msal-node";
export const version = "2.5.1";
export const version = "2.6.0";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file 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