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 14.12.0 to 14.12.1-alpha.0

2

dist/cache/entities/AccountEntity.d.ts

@@ -72,3 +72,3 @@ import { Authority } from "../../authority/Authority";

homeAccountId: string;
idTokenClaims: TokenClaims;
idTokenClaims?: TokenClaims;
clientInfo?: string;

@@ -75,0 +75,0 @@ cloudGraphHostName?: string;

@@ -7,10 +7,9 @@ import { IdTokenEntity } from "./IdTokenEntity";

/** @internal */
export declare class CacheRecord {
account: AccountEntity | null;
idToken: IdTokenEntity | null;
accessToken: AccessTokenEntity | null;
refreshToken: RefreshTokenEntity | null;
appMetadata: AppMetadataEntity | null;
constructor(accountEntity?: AccountEntity | null, idTokenEntity?: IdTokenEntity | null, accessTokenEntity?: AccessTokenEntity | null, refreshTokenEntity?: RefreshTokenEntity | null, appMetadataEntity?: AppMetadataEntity | null);
}
export type CacheRecord = {
account?: AccountEntity | null;
idToken?: IdTokenEntity | null;
accessToken?: AccessTokenEntity | null;
refreshToken?: RefreshTokenEntity | null;
appMetadata?: AppMetadataEntity | null;
};
//# sourceMappingURL=CacheRecord.d.ts.map
export declare const name = "@azure/msal-common";
export declare const version = "14.12.0";
export declare const version = "14.12.1-alpha.0";
//# sourceMappingURL=packageMetadata.d.ts.map

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

import { StringDict } from "../utils/MsalTypes";
/**

@@ -28,8 +27,3 @@ * Validates server consumable params from the "request" objects

static validateCodeChallengeMethod(codeChallengeMethod: string): void;
/**
* Removes unnecessary, duplicate, and empty string query parameters from extraQueryParameters
* @param request
*/
static sanitizeEQParams(eQParams: StringDict, queryParams: Map<string, string>): StringDict;
}
//# sourceMappingURL=RequestValidator.d.ts.map

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

*/
export type ExternalTokenResponse = Pick<ServerAuthorizationTokenResponse, "token_type" | "scope" | "expires_in" | "id_token" | "refresh_token"> & {
export type ExternalTokenResponse = Pick<ServerAuthorizationTokenResponse, "token_type" | "scope" | "expires_in" | "ext_expires_in" | "id_token" | "refresh_token" | "refresh_token_expires_in" | "foci"> & {
access_token?: string;

@@ -15,0 +15,0 @@ client_info?: string;

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

}
export declare function buildAccountToCache(cacheStorage: CacheManager, authority: Authority, homeAccountId: string, idTokenClaims: TokenClaims, base64Decode: (input: string) => string, clientInfo?: string, environment?: string, claimsTenantId?: string | null, authCodePayload?: AuthorizationCodePayload, nativeAccountId?: string, logger?: Logger): AccountEntity;
export declare function buildAccountToCache(cacheStorage: CacheManager, authority: Authority, homeAccountId: string, base64Decode: (input: string) => string, idTokenClaims?: TokenClaims, clientInfo?: string, environment?: string, claimsTenantId?: string | null, authCodePayload?: AuthorizationCodePayload, nativeAccountId?: string, logger?: Logger): AccountEntity;
//# sourceMappingURL=ResponseHandler.d.ts.map

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

NOT_APPLICABLE: string;
NOT_AVAILABLE: string;
FORWARD_SLASH: string;

@@ -33,0 +34,0 @@ IMDS_ENDPOINT: string;

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

},
"version": "14.12.0",
"version": "14.12.1-alpha.0",
"description": "Microsoft Authentication Library for js",

@@ -16,0 +16,0 @@ "keywords": [

@@ -138,3 +138,3 @@ /*

homeAccountId: string;
idTokenClaims: TokenClaims;
idTokenClaims?: TokenClaims;
clientInfo?: string;

@@ -193,4 +193,4 @@ cloudGraphHostName?: string;

clientInfo?.uid ||
accountDetails.idTokenClaims.oid ||
accountDetails.idTokenClaims.sub ||
accountDetails.idTokenClaims?.oid ||
accountDetails.idTokenClaims?.sub ||
"";

@@ -204,5 +204,5 @@

const preferredUsername =
accountDetails.idTokenClaims.preferred_username ||
accountDetails.idTokenClaims.upn;
const email = accountDetails.idTokenClaims.emails
accountDetails.idTokenClaims?.preferred_username ||
accountDetails.idTokenClaims?.upn;
const email = accountDetails.idTokenClaims?.emails
? accountDetails.idTokenClaims.emails[0]

@@ -212,3 +212,3 @@ : null;

account.username = preferredUsername || email || "";
account.name = accountDetails.idTokenClaims.name;
account.name = accountDetails.idTokenClaims?.name || "";

@@ -215,0 +215,0 @@ account.cloudGraphHostName = accountDetails.cloudGraphHostName;

@@ -13,22 +13,8 @@ /*

/** @internal */
export class CacheRecord {
account: AccountEntity | null;
idToken: IdTokenEntity | null;
accessToken: AccessTokenEntity | null;
refreshToken: RefreshTokenEntity | null;
appMetadata: AppMetadataEntity | null;
constructor(
accountEntity?: AccountEntity | null,
idTokenEntity?: IdTokenEntity | null,
accessTokenEntity?: AccessTokenEntity | null,
refreshTokenEntity?: RefreshTokenEntity | null,
appMetadataEntity?: AppMetadataEntity | null
) {
this.account = accountEntity || null;
this.idToken = idTokenEntity || null;
this.accessToken = accessTokenEntity || null;
this.refreshToken = refreshTokenEntity || null;
this.appMetadata = appMetadataEntity || null;
}
}
export type CacheRecord = {
account?: AccountEntity | null;
idToken?: IdTokenEntity | null;
accessToken?: AccessTokenEntity | null;
refreshToken?: RefreshTokenEntity | null;
appMetadata?: AppMetadataEntity | null;
};
/* eslint-disable header/header */
export const name = "@azure/msal-common";
export const version = "14.12.0";
export const version = "14.12.1-alpha.0";

@@ -468,8 +468,6 @@ /*

addExtraQueryParameters(eQParams: StringDict): void {
const sanitizedEQParams = RequestValidator.sanitizeEQParams(
eQParams,
this.parameters
);
Object.keys(sanitizedEQParams).forEach((key) => {
this.parameters.set(key, eQParams[key]);
Object.entries(eQParams).forEach(([key, value]) => {
if (!this.parameters.has(key) && value) {
this.parameters.set(key, value);
}
});

@@ -476,0 +474,0 @@ }

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

import { PromptValue, CodeChallengeMethodValues } from "../utils/Constants";
import { StringDict } from "../utils/MsalTypes";

@@ -92,27 +91,2 @@ /**

}
/**
* Removes unnecessary, duplicate, and empty string query parameters from extraQueryParameters
* @param request
*/
static sanitizeEQParams(
eQParams: StringDict,
queryParams: Map<string, string>
): StringDict {
if (!eQParams) {
return {};
}
// Remove any query parameters already included in SSO params
queryParams.forEach((_value, key) => {
if (eQParams[key]) {
delete eQParams[key];
}
});
// remove empty string parameters
return Object.fromEntries(
Object.entries(eQParams).filter((kv) => kv[1] !== "")
);
}
}

@@ -20,3 +20,10 @@ /*

ServerAuthorizationTokenResponse,
"token_type" | "scope" | "expires_in" | "id_token" | "refresh_token"
| "token_type"
| "scope"
| "expires_in"
| "ext_expires_in"
| "id_token"
| "refresh_token"
| "refresh_token_expires_in"
| "foci"
> & {

@@ -23,0 +30,0 @@ access_token?: string;

@@ -200,3 +200,13 @@ /*

) {
const errString = `${serverResponse.error_codes} - [${serverResponse.timestamp}]: ${serverResponse.error_description} - Correlation ID: ${serverResponse.correlation_id} - Trace ID: ${serverResponse.trace_id}`;
const errString = `Error(s): ${
serverResponse.error_codes || Constants.NOT_AVAILABLE
} - Timestamp: ${
serverResponse.timestamp || Constants.NOT_AVAILABLE
} - Description: ${
serverResponse.error_description || Constants.NOT_AVAILABLE
} - Correlation ID: ${
serverResponse.correlation_id || Constants.NOT_AVAILABLE
} - Trace ID: ${
serverResponse.trace_id || Constants.NOT_AVAILABLE
}`;
const serverErrorNo = serverResponse.error_codes?.length

@@ -458,4 +468,4 @@ ? serverResponse.error_codes[0]

this.homeAccountIdentifier,
this.cryptoObj.base64Decode,
idTokenClaims,
this.cryptoObj.base64Decode,
serverTokenResponse.client_info,

@@ -558,9 +568,9 @@ env,

return new CacheRecord(
cachedAccount,
cachedIdToken,
cachedAccessToken,
cachedRefreshToken,
cachedAppMetadata
);
return {
account: cachedAccount,
idToken: cachedIdToken,
accessToken: cachedAccessToken,
refreshToken: cachedRefreshToken,
appMetadata: cachedAppMetadata,
};
}

@@ -700,4 +710,4 @@

homeAccountId: string,
idTokenClaims: TokenClaims,
base64Decode: (input: string) => string,
idTokenClaims?: TokenClaims,
clientInfo?: string,

@@ -743,2 +753,3 @@ environment?: string,

claimsTenantId &&
idTokenClaims &&
!tenantProfiles.find((tenantProfile) => {

@@ -745,0 +756,0 @@ return tenantProfile.tenantId === claimsTenantId;

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

NOT_APPLICABLE: "N/A",
NOT_AVAILABLE: "Not Available",
FORWARD_SLASH: "/",

@@ -50,0 +51,0 @@ IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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