Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/msal-common

Package Overview
Dependencies
Maintainers
3
Versions
122
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 1.1.1 to 1.2.0

dist/src/cache/entities/ServerTelemetryEntity.d.ts

59

CHANGELOG.json

@@ -5,2 +5,61 @@ {

{
"date": "Tue, 25 Aug 2020 00:40:45 GMT",
"tag": "@azure/msal-common_v1.2.0",
"version": "1.2.0",
"comments": {
"patch": [
{
"comment": "ignore offline_access in scopes lookup",
"author": "sameera.gajjarapu@microsoft.com",
"commit": "ed55b106bba3d97378b8760d711b24217a7adbbf",
"package": "@azure/msal-common"
},
{
"comment": "Adds checks for cache entities",
"author": "sameera.gajjarapu@microsoft.com",
"commit": "282035aecb07956dca323d65275fdaa703c4a325",
"package": "@azure/msal-common"
},
{
"comment": "Add claims request to /token calls (#2138)",
"author": "thomas.norling@microsoft.com",
"commit": "a2813a0b7dc1b6ad8fa76f1fd7444b95d380e42b",
"package": "@azure/msal-common"
},
{
"comment": "Fix Telemetry cacheHit Bug (#2170)",
"author": "thomas.norling@microsoft.com",
"commit": "a9305a0ec3405f892ff4a1926ffb3dbca26e9a83",
"package": "@azure/msal-common"
},
{
"comment": "Get username from emails claim in B2C scenarios (#2114)",
"author": "thomas.norling@microsoft.com",
"commit": "40b1716fec63893f57762f37b55944f6c8c86e21",
"package": "@azure/msal-common"
},
{
"comment": "Update POST header to type Record (#2128)",
"author": "thomas.norling@microsoft.com",
"commit": "c9b65c59797cd3240aad2b4f1e0e866a90373c4a",
"package": "@azure/msal-common"
}
],
"minor": [
{
"comment": "Client Capabilities Support (#2169)",
"author": "thomas.norling@microsoft.com",
"commit": "0cdad1b8a3855b2414be9740862df29524897a22",
"package": "@azure/msal-common"
},
{
"comment": "Add support for acquiring tokens with client credentials grant",
"author": "sagonzal@microsoft.com",
"commit": "98647b7a8a40e1a5f7855f0bcee4594e080a8398",
"package": "@azure/msal-common"
}
]
}
},
{
"date": "Thu, 13 Aug 2020 02:20:48 GMT",

@@ -7,0 +66,0 @@ "tag": "@azure/msal-common_v1.1.1",

20

changelog.md
# Change Log - @azure/msal-common
This log was last generated on Thu, 13 Aug 2020 02:20:48 GMT and should not be manually modified.
This log was last generated on Tue, 25 Aug 2020 00:40:45 GMT and should not be manually modified.
<!-- Start content -->
## 1.2.0
Tue, 25 Aug 2020 00:40:45 GMT
### Minor changes
- Client Capabilities Support (#2169) (thomas.norling@microsoft.com)
- Add support for acquiring tokens with client credentials grant (sagonzal@microsoft.com)
### Patches
- ignore offline_access in scopes lookup (sameera.gajjarapu@microsoft.com)
- Adds checks for cache entities (sameera.gajjarapu@microsoft.com)
- Add claims request to /token calls (#2138) (thomas.norling@microsoft.com)
- Fix Telemetry cacheHit Bug (#2170) (thomas.norling@microsoft.com)
- Get username from emails claim in B2C scenarios (#2114) (thomas.norling@microsoft.com)
- Update POST header to type Record (#2128) (thomas.norling@microsoft.com)
## 1.1.1

@@ -8,0 +26,0 @@

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

preferred_username?: string;
emails?: string[];
name?: string;

@@ -14,0 +15,0 @@ nonce?: string;

@@ -47,2 +47,7 @@ import { CredentialEntity } from "./CredentialEntity";

static createAccessTokenEntity(homeAccountId: string, environment: string, accessToken: string, clientId: string, tenantId: string, scopes: string, expiresOn: number, extExpiresOn: number): AccessTokenEntity;
/**
* Validates an entity: checks for all expected params
* @param entity
*/
static isAccessTokenEntity(entity: object): boolean;
}

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

static createADFSAccount(authority: Authority, idToken: IdToken): AccountEntity;
/**
* Validates an entity: checks for all expected params
* @param entity
*/
static isAccountEntity(entity: object): boolean;
}
/**
* APP_META_DATA Cache
* APP_METADATA Cache
*

@@ -23,2 +23,7 @@ * Key:Value Schema:

generateAppMetaDataEntityKey(): string;
/**
* Validates an entity: checks for all expected params
* @param entity
*/
static isAppMetadataEntity(key: string, entity: object): boolean;
}

@@ -29,2 +29,7 @@ import { CredentialEntity } from "./CredentialEntity";

static createIdTokenEntity(homeAccountId: string, environment: string, idToken: string, clientId: string, tenantId: string): IdTokenEntity;
/**
* Validates an entity: checks for all expected params
* @param entity
*/
static isIdTokenEntity(entity: object): boolean;
}

@@ -31,2 +31,7 @@ import { CredentialEntity } from "./CredentialEntity";

static createRefreshTokenEntity(homeAccountId: string, environment: string, refreshToken: string, clientId: string, familyId?: string): RefreshTokenEntity;
/**
* Validates an entity: checks for all expected params
* @param entity
*/
static isRefreshTokenEntity(entity: object): boolean;
}

6

dist/src/client/BaseClient.d.ts

@@ -25,7 +25,7 @@ import { ClientConfiguration } from "../config/ClientConfiguration";

*/
protected createDefaultTokenRequestHeaders(): Map<string, string>;
protected createDefaultTokenRequestHeaders(): Record<string, string>;
/**
* addLibraryData
*/
protected createDefaultLibraryHeaders(): Map<string, string>;
protected createDefaultLibraryHeaders(): Record<string, string>;
/**

@@ -37,3 +37,3 @@ * Http post to token endpoint

*/
protected executePostToTokenEndpoint(tokenEndpoint: string, queryString: string, headers: Map<string, string>): Promise<NetworkResponse<ServerAuthorizationTokenResponse>>;
protected executePostToTokenEndpoint(tokenEndpoint: string, queryString: string, headers: Record<string, string>): Promise<NetworkResponse<ServerAuthorizationTokenResponse>>;
}

@@ -13,2 +13,3 @@ import { BaseClient } from "./BaseClient";

acquireToken(request: SilentFlowRequest): Promise<AuthenticationResult>;
private isRefreshRequired;
/**

@@ -30,7 +31,2 @@ * fetches idToken from cache if present

private readRefreshTokenFromCache;
/**
* check if a token is expired based on given UTC time in seconds.
* @param expiresOn
*/
private isTokenExpired;
}

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

* - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.
* - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
*/

@@ -45,2 +46,3 @@ export declare type AuthOptions = {

cloudDiscoveryMetadata?: string;
clientCapabilities?: Array<string>;
};

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

@@ -46,2 +46,6 @@ import { ClientAuthError } from "./ClientAuthError";

};
invalidClaimsRequest: {
code: string;
desc: string;
};
tokenRequestEmptyError: {

@@ -129,2 +133,6 @@ code: string;

/**
* Creates error thrown when claims parameter is not a stringified JSON object
*/
static createInvalidClaimsRequestError(): ClientConfigurationError;
/**
* Throws error when token request is empty and nothing cached in storage.

@@ -131,0 +139,0 @@ */

export { AuthorizationCodeClient } from "./client/AuthorizationCodeClient";
export { DeviceCodeClient } from "./client/DeviceCodeClient";
export { RefreshTokenClient } from "./client/RefreshTokenClient";
export { ClientCredentialClient } from "./client/ClientCredentialClient";
export { SilentFlowClient } from "./client/SilentFlowClient";

@@ -32,2 +33,3 @@ export { AuthOptions, SystemOptions, LoggerOptions, DEFAULT_SYSTEM_OPTIONS } from "./config/ClientConfiguration";

export { RefreshTokenRequest } from "./request/RefreshTokenRequest";
export { ClientCredentialRequest } from "./request/ClientCredentialRequest";
export { SilentFlowRequest } from "./request/SilentFlowRequest";

@@ -34,0 +36,0 @@ export { DeviceCodeRequest } from "./request/DeviceCodeRequest";

@@ -6,3 +6,3 @@ import { NetworkResponse } from "./NetworkManager";

export declare type NetworkRequestOptions = {
headers?: Map<string, string>;
headers?: Record<string, string>;
body?: string;

@@ -9,0 +9,0 @@ };

export declare type NetworkResponse<T> = {
headers: Map<string, string>;
headers: Record<string, string>;
body: T;

@@ -4,0 +4,0 @@ status: number;

@@ -6,2 +6,3 @@ import { BaseAuthRequest } from "./BaseAuthRequest";

* - scopes - Array of scopes the application is requesting access to.
* - claims - A stringified claims request which will be added to all /authorize and /token calls
* - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests.

@@ -8,0 +9,0 @@ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.

@@ -8,2 +8,3 @@ import { ResponseMode } from "../utils/Constants";

* - scopes - Array of scopes the application is requesting access to.
* - claims - A stringified claims request which will be added to all /authorize and /token calls
* - authority - Url of the authority which the application acquires tokens from.

@@ -26,3 +27,2 @@ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.

* - extraQueryParameters - String to string map of custom query parameters.
* - claims - In cases where Azure AD tenant admin has enabled conditional access policies, and the policy has not been met, exceptions will contain claims that need to be consented to.
* - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks.

@@ -42,4 +42,3 @@ */

extraQueryParameters?: StringDict;
claims?: string;
nonce?: string;
};
/**
* BaseAuthRequest
* - scopes - Array of scopes the application is requesting access to.
* - claims - A stringified claims request which will be added to all /authorize and /token calls
* - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. Defaults to https://login.microsoftonline.com/common. If using the same authority for all request, authority should set on client application object and not request, to avoid resolving authority endpoints multiple times.

@@ -9,4 +10,5 @@ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.

scopes: Array<string>;
claims?: string;
authority?: string;
correlationId?: string;
};

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

* - scopes - Array of scopes the application is requesting access to.
* - claims - A stringified claims request which will be added to all /authorize and /token calls
* - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.

@@ -7,0 +8,0 @@ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.

@@ -51,3 +51,3 @@ import { ResponseMode } from "../utils/Constants";

*/
addClaims(claims: string): void;
addClaims(claims: string, clientCapabilities: Array<string>): void;
/**

@@ -135,2 +135,3 @@ * add correlationId

addExtraQueryParameters(eQparams: StringDict): void;
addClientCapabilitiesToClaims(claims: string, clientCapabilities: Array<string>): string;
/**

@@ -137,0 +138,0 @@ * Utility to create a URL from the params map

@@ -16,2 +16,3 @@ import { StringDict } from "../utils/MsalTypes";

static validatePrompt(prompt: string): void;
static validateClaims(claims: string): void;
/**

@@ -18,0 +19,0 @@ * Utility to validate code_challenge and code_challenge_method

@@ -6,2 +6,3 @@ import { AccountInfo } from "../account/AccountInfo";

* - scopes - Array of scopes the application is requesting access to.
* - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
* - authority - Url of the authority which the application acquires tokens from.

@@ -8,0 +9,0 @@ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.

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

*/
handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, cachedNonce?: string, cachedState?: string): AuthenticationResult;
handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, cachedNonce?: string, cachedState?: string, requestScopes?: string[]): AuthenticationResult;
/**

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

@@ -105,2 +105,6 @@ export declare const Constants: {

}
export declare enum ClaimsRequestKeys {
ACCESS_TOKEN = "access_token",
XMS_CC = "xms_cc"
}
/**

@@ -197,3 +201,3 @@ * we considered making this "enum" in the request instead of string, however it looks like the allowed list of

CREDENTIAL = "Credential",
APP_META_DATA = "AppMetadata",
APP_METADATA = "AppMetadata",
TEMPORARY = "TempCache",

@@ -213,3 +217,3 @@ TELEMETRY = "Telemetry"

ID_TOKEN = 2003,
APP_META_DATA = 3001
APP_METADATA = 3001
}

@@ -219,3 +223,3 @@ /**

*/
export declare const APP_META_DATA = "appmetadata";
export declare const APP_METADATA = "appmetadata";
export declare const ClientInfo = "client_info";

@@ -222,0 +226,0 @@ export declare const SERVER_TELEM_CONSTANTS: {

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

static nowSeconds(): number;
/**
* check if a token is expired based on given UTC time in seconds.
* @param expiresOn
*/
static isTokenExpired(expiresOn: string, offset: number): boolean;
}

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

},
"version": "1.1.1",
"version": "1.2.0",
"description": "Microsoft Authentication Library for js",

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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