Socket
Socket
Sign inDemoInstall

@azure/msal-common

Package Overview
Dependencies
Maintainers
3
Versions
120
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.3.0 to 1.4.0

29

CHANGELOG.json

@@ -5,2 +5,31 @@ {

{
"date": "Wed, 23 Sep 2020 21:13:48 GMT",
"tag": "@azure/msal-common_v1.4.0",
"version": "1.4.0",
"comments": {
"patch": [
{
"comment": "Remove null in function return types to be compatible with ICacheManager.ts (#2335)",
"author": "sameera.gajjarapu@microsoft.com",
"commit": "aecc41e9f23b350a25bba9dd23e739627e61f8ab",
"package": "@azure/msal-common"
},
{
"comment": "Scopes stored case sensitive, compared case insensitive (#2302)",
"author": "sameera.gajjarapu@microsoft.com",
"commit": "60fe1e6b2e4c3fdd1f7ce0dd0fbee0febed6d0d2",
"package": "@azure/msal-common"
}
],
"minor": [
{
"comment": "FOCI - Family of Client IDs feature (#2201)",
"author": "sameera.gajjarapu@microsoft.com",
"commit": "209789cdffdfd38087819cbb23688bcd5ce47b60",
"package": "@azure/msal-common"
}
]
}
},
{
"date": "Thu, 17 Sep 2020 23:16:22 GMT",

@@ -7,0 +36,0 @@ "tag": "@azure/msal-common_v1.3.0",

17

changelog.md
# Change Log - @azure/msal-common
This log was last generated on Thu, 17 Sep 2020 23:16:22 GMT and should not be manually modified.
This log was last generated on Wed, 23 Sep 2020 21:13:48 GMT and should not be manually modified.
<!-- Start content -->
## 1.4.0
Wed, 23 Sep 2020 21:13:48 GMT
### Minor changes
- FOCI - Family of Client IDs feature (#2201) (sameera.gajjarapu@microsoft.com)
### Patches
- Remove null in function return types to be compatible with ICacheManager.ts (#2335) (sameera.gajjarapu@microsoft.com)
- Scopes stored case sensitive, compared case insensitive (#2302) (sameera.gajjarapu@microsoft.com)
## 1.3.0

@@ -13,3 +26,3 @@

- Add support for On-behalf-of flow (sagonzal@microsoft.com)
- Add support for On-behalf-of flow (#2157) (sagonzal@microsoft.com)
- ValidCacheType adds ServerTelemetryEntity (sameera.gajjarapu@microsoft.com)

@@ -16,0 +29,0 @@ - Added client-side throttling to enhance server stability (#1907) (jamckenn@microsoft.com)

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

resolveEndpointsAsync(): Promise<void>;
/**
* helper function to generate environment from authority object
* @param authority
*/
static generateEnvironmentFromAuthority(authority: Authority): string;
}

103

dist/src/cache/CacheManager.d.ts

@@ -11,2 +11,3 @@ import { AccountCache, AccountFilter, CredentialFilter, CredentialCache } from "./utils/CacheTypes";

import { AccountInfo } from "../account/AccountInfo";
import { AppMetadataEntity } from "./entities/AppMetadataEntity";
/**

@@ -54,3 +55,2 @@ * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.

saveCacheRecord(cacheRecord: CacheRecord): void;
getCacheRecord(account: AccountInfo, clientId: string, scopes: ScopeSet): CacheRecord;
/**

@@ -72,6 +72,6 @@ * saves account into cache

/**
* Given account key retrieve an account
* retrieve an account entity given the cache key
* @param key
*/
getAccount(key: string): AccountEntity;
getAccount(key: string): AccountEntity | null;
/**

@@ -83,23 +83,7 @@ * retrieve a credential - accessToken, idToken or refreshToken; given the cache key

/**
* Helper function to retrieve IdTokenEntity from cache
* @param clientId
* @param account
* @param inputRealm
* retrieve an appmetadata entity given the cache key
* @param key
*/
getIdTokenEntity(clientId: string, account: AccountInfo): IdTokenEntity | null;
getAppMetadata(key: string): AppMetadataEntity | null;
/**
* Helper function to retrieve AccessTokenEntity from cache
* @param clientId
* @param account
* @param scopes
* @param inputRealm
*/
getAccessTokenEntity(clientId: string, account: AccountInfo, scopes: ScopeSet): AccessTokenEntity | null;
/**
* Helper function to retrieve RefreshTokenEntity from cache
* @param clientId
* @param account
*/
getRefreshTokenEntity(clientId: string, account: AccountInfo): RefreshTokenEntity | null;
/**
* retrieve accounts matching all provided filters; if no filter is set, get all accounts

@@ -141,6 +125,2 @@ * not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared

/**
* Removes all app metadata objects from cache.
*/
removeAppMetadata(): boolean;
/**
* Removes all accounts and related tokens from cache.

@@ -165,3 +145,52 @@ */

/**
*
* Removes all app metadata objects from cache.
*/
removeAppMetadata(): boolean;
/**
* Retrieve the cached credentials into a cacherecord
* @param account
* @param clientId
* @param scopes
* @param environment
*/
readCacheRecord(account: AccountInfo, clientId: string, scopes: ScopeSet, environment: string): CacheRecord;
/**
* Retrieve AccountEntity from cache
* @param account
*/
readAccountFromCache(account: AccountInfo): AccountEntity | null;
/**
* Retrieve IdTokenEntity from cache
* @param clientId
* @param account
* @param inputRealm
*/
readIdTokenFromCache(clientId: string, account: AccountInfo): IdTokenEntity | null;
/**
* Retrieve AccessTokenEntity from cache
* @param clientId
* @param account
* @param scopes
* @param inputRealm
*/
readAccessTokenFromCache(clientId: string, account: AccountInfo, scopes: ScopeSet): AccessTokenEntity | null;
/**
* Helper to retrieve the appropriate refresh token from cache
* @param clientId
* @param account
* @param familyRT
*/
readRefreshTokenFromCache(clientId: string, account: AccountInfo, familyRT: boolean): RefreshTokenEntity | null;
/**
* Retrieve AppMetadataEntity from cache
*/
readAppMetadataFromCache(environment: string, clientId: string): AppMetadataEntity;
/**
* Return the family_id value associated with FOCI
* @param environment
* @param clientId
*/
isAppMetadataFOCI(environment: string, clientId: string): boolean;
/**
* helper to match account ids
* @param value

@@ -172,2 +201,3 @@ * @param homeAccountId

/**
* helper to match assertion
* @param value

@@ -178,3 +208,3 @@ * @param oboAssertion

/**
*
* helper to match environment
* @param value

@@ -185,3 +215,3 @@ * @param environment

/**
*
* helper to match credential type
* @param entity

@@ -192,3 +222,3 @@ * @param credentialType

/**
*
* helper to match client ids
* @param entity

@@ -199,4 +229,10 @@ * @param clientId

/**
*
* helper to match family ids
* @param entity
* @param familyId
*/
private matchFamilyId;
/**
* helper to match realm
* @param entity
* @param realm

@@ -212,7 +248,2 @@ */

/**
* Returns a valid AccountEntity if key and object contain correct values, null otherwise.
* @param key
*/
private getAccountEntity;
/**
* returns if a given cache entity is of the type appmetadata

@@ -219,0 +250,0 @@ * @param key

@@ -20,6 +20,17 @@ /**

/**
* Generate Account Cache Key as per the schema: <home_account_id>-<environment>-<realm*>
* Generate AppMetadata Cache Key as per the schema: appmetadata-<environment>-<client_id>
*/
generateAppMetaDataEntityKey(): string;
generateAppMetadataKey(): string;
/**
* Generate AppMetadata Cache Key
*/
static generateAppMetadataCacheKey(environment: string, clientId: string): string;
/**
* Creates AppMetadataEntity
* @param clientId
* @param environment
* @param familyId
*/
static createAppMetadataEntity(clientId: string, environment: string, familyId?: string): AppMetadataEntity;
/**
* Validates an entity: checks for all expected params

@@ -26,0 +37,0 @@ * @param entity

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

import { AccountEntity } from "./AccountEntity";
import { AppMetadataEntity } from "./AppMetadataEntity";
export declare class CacheRecord {

@@ -11,3 +12,4 @@ account: AccountEntity;

refreshToken: RefreshTokenEntity;
constructor(accountEntity?: AccountEntity, idTokenEntity?: IdTokenEntity, accessTokenEntity?: AccessTokenEntity, refreshTokenEntity?: RefreshTokenEntity);
appMetadata: AppMetadataEntity;
constructor(accountEntity?: AccountEntity, idTokenEntity?: IdTokenEntity, accessTokenEntity?: AccessTokenEntity, refreshTokenEntity?: RefreshTokenEntity, appMetadataEntity?: AppMetadataEntity);
}

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

import { AccountInfo } from "../../account/AccountInfo";
import { AppMetadataEntity } from "../entities/AppMetadataEntity";
export interface ICacheManager {

@@ -21,3 +22,3 @@ /**

*/
getAccount(key: string): AccountEntity;
getAccount(key: string): AccountEntity | null;
/**

@@ -27,4 +28,9 @@ * retrieve a credential - accessToken, idToken or refreshToken; given the cache key

*/
getCredential(key: string): CredentialEntity;
getCredential(key: string): CredentialEntity | null;
/**
* retrieve appMetadata, given the cache key
* @param key
*/
getAppMetadata(key: string): AppMetadataEntity | null;
/**
* retrieve accounts matching all provided filters; if no filter is set, get all accounts

@@ -31,0 +37,0 @@ * @param homeAccountId

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

/**
* Credential: <home_account_id*>-<environment>-<credential_type>-<client_id>-<realm*>-<target*>
* Credential: <home_account_id*>-<environment>-<credential_type>-<client_id>-<realm*>-<target*>
*/

@@ -36,2 +36,3 @@ export declare type CredentialFilter = {

clientId?: string;
familyId?: string;
realm?: string;

@@ -41,1 +42,8 @@ target?: string;

};
/**
* AppMetadata: appmetadata-<environment>-<client_id>
*/
export declare type AppMetadataFilter = {
environment?: string;
clientId?: string;
};

@@ -17,4 +17,18 @@ import { ClientConfiguration } from "../config/ClientConfiguration";

acquireTokenByRefreshToken(request: SilentFlowRequest): Promise<AuthenticationResult>;
/**
* makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
* @param request
*/
private acquireTokenWithCachedRefreshToken;
/**
* Constructs the network message and makes a NW call to the underlying secure token service
* @param request
* @param authority
*/
private executeTokenRequest;
/**
* Helper function to create the token request body
* @param request
*/
private createTokenRequestBody;
}

@@ -92,3 +92,4 @@ export declare const Constants: {

REQUESTED_TOKEN_USE = "requested_token_use",
ON_BEHALF_OF = "on_behalf_of"
ON_BEHALF_OF = "on_behalf_of",
FOCI = "foci"
}

@@ -236,2 +237,3 @@ /**

export declare const ClientInfo = "client_info";
export declare const THE_FAMILY_ID = "1";
export declare const SERVER_TELEM_CONSTANTS: {

@@ -252,1 +254,5 @@ SCHEMA_VERSION: number;

};
export declare const Errors: {
INVALID_GRANT_ERROR: string;
CLIENT_MISMATCH_ERROR: string;
};

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

},
"version": "1.3.0",
"version": "1.4.0",
"description": "Microsoft Authentication Library for js",

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

@@ -0,0 +0,0 @@ # Microsoft Authentication Library for JavaScript (MSAL.js) Common Protocols Package

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