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.6.2 to 1.6.3

27

CHANGELOG.json

@@ -5,2 +5,29 @@ {

{
"date": "Mon, 26 Oct 2020 21:00:29 GMT",
"tag": "@azure/msal-common_v1.6.3",
"version": "1.6.3",
"comments": {
"patch": [
{
"comment": "Fix ServerTelemetry maxErrorToSend bug (#2491)",
"author": "thomas.norling@microsoft.com",
"commit": "81575de28b78e7c09c5d475854e14a8bc1b7b567",
"package": "@azure/msal-common"
},
{
"comment": "Add missing default headers to device code",
"author": "sameera.gajjarapu@microsoft.com",
"commit": "e007d2b425c8ceaed409ed9b11a1a72bc64fa955",
"package": "@azure/msal-common"
},
{
"comment": "msal-browser and msal-node cache Interfaces to msal-common updated (#2415)",
"author": "sameera.gajjarapu@microsoft.com",
"commit": "9d4c4a18de10eb3d918810dc10766fbd5547165d",
"package": "@azure/msal-common"
}
]
}
},
{
"date": "Tue, 20 Oct 2020 23:47:28 GMT",

@@ -7,0 +34,0 @@ "tag": "@azure/msal-common_v1.6.2",

12

changelog.md
# Change Log - @azure/msal-common
This log was last generated on Tue, 20 Oct 2020 23:47:28 GMT and should not be manually modified.
This log was last generated on Mon, 26 Oct 2020 21:00:29 GMT and should not be manually modified.
<!-- Start content -->
## 1.6.3
Mon, 26 Oct 2020 21:00:29 GMT
### Patches
- Fix ServerTelemetry maxErrorToSend bug (#2491) (thomas.norling@microsoft.com)
- Add missing default headers to device code (sameera.gajjarapu@microsoft.com)
- msal-browser and msal-node cache Interfaces to msal-common updated (#2415) (sameera.gajjarapu@microsoft.com)
## 1.6.2

@@ -8,0 +18,0 @@

124

dist/src/cache/CacheManager.d.ts

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

import { AppMetadataEntity } from "./entities/AppMetadataEntity";
import { ServerTelemetryEntity } from "./entities/ServerTelemetryEntity";
import { ThrottlingEntity } from "./entities/ThrottlingEntity";
/**

@@ -18,13 +20,74 @@ * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.

/**
* Function to set item in cache.
* @param key
* @param value
* fetch the account entity from the platform cache
* @param accountKey
*/
abstract setItem(key: string, value: string | object, type?: string): void;
abstract getAccount(accountKey: string): AccountEntity | null;
/**
* Function which retrieves item from cache.
* @param key
* set account entity in the platform cache
* @param account
*/
abstract getItem(key: string, type?: string): string | object;
abstract setAccount(account: AccountEntity): void;
/**
* fetch the idToken entity from the platform cache
* @param idTokenKey
*/
abstract getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
/**
* set idToken entity to the platform cache
* @param idToken
*/
abstract setIdTokenCredential(idToken: IdTokenEntity): void;
/**
* fetch the idToken entity from the platform cache
* @param accessTokenKey
*/
abstract getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
/**
* set idToken entity to the platform cache
* @param accessToken
*/
abstract setAccessTokenCredential(accessToken: AccessTokenEntity): void;
/**
* fetch the idToken entity from the platform cache
* @param refreshTokenKey
*/
abstract getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
/**
* set idToken entity to the platform cache
* @param refreshToken
*/
abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
/**
* fetch appMetadata entity from the platform cache
* @param appMetadataKey
*/
abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
/**
* set appMetadata entity to the platform cache
* @param appMetadata
*/
abstract setAppMetadata(appMetadata: AppMetadataEntity): void;
/**
* fetch server telemetry entity from the platform cache
* @param serverTelemetryKey
*/
abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
/**
* set server telemetry entity to the platform cache
* @param serverTelemetryKey
* @param serverTelemetry
*/
abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
/**
* fetch throttling entity from the platform cache
* @param throttlingCacheKey
*/
abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
/**
* set throttling entity to the platform cache
* @param throttlingCacheKey
* @param throttlingCache
*/
abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
/**
* Function to remove an item from cache given its key.

@@ -57,12 +120,2 @@ * @param key

/**
* saves account into cache
* @param account
*/
private saveAccount;
/**
* saves credential - accessToken, idToken or refreshToken into cache
* @param credential
*/
private saveCredential;
/**
* saves access token credential

@@ -73,17 +126,2 @@ * @param credential

/**
* retrieve an account entity given the cache key
* @param key
*/
getAccount(key: string): AccountEntity | null;
/**
* retrieve a credential - accessToken, idToken or refreshToken; given the cache key
* @param key
*/
getCredential(key: string): CredentialEntity | null;
/**
* retrieve an appmetadata entity 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

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

/**
* Returns the specific credential (IdToken/AccessToken/RefreshToken) from the cache
* @param key
* @param credType
*/
private getSpecificCredential;
/**
* Helper to convert serialized data to object

@@ -254,4 +298,16 @@ * @param obj

export declare class DefaultStorageClass extends CacheManager {
setItem(): void;
getItem(): string | object;
setAccount(): void;
getAccount(): AccountEntity;
setIdTokenCredential(): void;
getIdTokenCredential(): IdTokenEntity;
setAccessTokenCredential(): void;
getAccessTokenCredential(): AccessTokenEntity;
setRefreshTokenCredential(): void;
getRefreshTokenCredential(): RefreshTokenEntity;
setAppMetadata(): void;
getAppMetadata(): AppMetadataEntity;
setServerTelemetry(): void;
getServerTelemetry(): ServerTelemetryEntity;
setThrottlingCache(): void;
getThrottlingCache(): ThrottlingEntity;
removeItem(): boolean;

@@ -258,0 +314,0 @@ containsKey(): boolean;

@@ -7,28 +7,90 @@ import { CredentialEntity } from "../entities/CredentialEntity";

import { AppMetadataEntity } from "../entities/AppMetadataEntity";
import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity";
import { ThrottlingEntity } from "../entities/ThrottlingEntity";
import { IdTokenEntity } from "../entities/IdTokenEntity";
import { AccessTokenEntity } from "../entities/AccessTokenEntity";
import { RefreshTokenEntity } from "../entities/RefreshTokenEntity";
export interface ICacheManager {
/**
* Returns all accounts in cache
* fetch the account entity from the platform cache
* @param accountKey
*/
getAllAccounts(): AccountInfo[];
getAccount(accountKey: string): AccountEntity | null;
/**
* saves a cache record
* @param cacheRecord
* set account entity in the platform cache
* @param account
*/
saveCacheRecord(cacheRecord: CacheRecord): void;
setAccount(account: AccountEntity): void;
/**
* Given account key retrieve an account
* @param key
* fetch the idToken entity from the platform cache
* @param idTokenKey
*/
getAccount(key: string): AccountEntity | null;
getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
/**
* retrieve a credential - accessToken, idToken or refreshToken; given the cache key
* @param key
* set idToken entity to the platform cache
* @param idToken
*/
getCredential(key: string): CredentialEntity | null;
setIdTokenCredential(idToken: IdTokenEntity): void;
/**
* retrieve appMetadata, given the cache key
* @param key
* fetch the idToken entity from the platform cache
* @param accessTokenKey
*/
getAppMetadata(key: string): AppMetadataEntity | null;
getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
/**
* set idToken entity to the platform cache
* @param accessToken
*/
setAccessTokenCredential(accessToken: AccessTokenEntity): void;
/**
* fetch the idToken entity from the platform cache
* @param refreshTokenKey
*/
getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
/**
* set idToken entity to the platform cache
* @param refreshToken
*/
setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
/**
* fetch appMetadata entity from the platform cache
* @param appMetadataKey
*/
getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
/**
* set appMetadata entity to the platform cache
* @param appMetadata
*/
setAppMetadata(appMetadata: AppMetadataEntity): void;
/**
* fetch server telemetry entity from the platform cache
* @param serverTelemetryKey
*/
getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
/**
* set server telemetry entity to the platform cache
* @param serverTelemetryKey
* @param serverTelemetry
*/
setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
/**
* fetch throttling entity from the platform cache
* @param throttlingCacheKey
*/
getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
/**
* set throttling entity to the platform cache
* @param throttlingCacheKey
* @param throttlingCache
*/
setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
/**
* Returns all accounts in cache
*/
getAllAccounts(): AccountInfo[];
/**
* saves a cache record
* @param cacheRecord
*/
saveCacheRecord(cacheRecord: CacheRecord): void;
/**
* retrieve accounts matching all provided filters; if no filter is set, get all accounts

@@ -35,0 +97,0 @@ * @param homeAccountId

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

export declare type ValidCacheType = AccountEntity | IdTokenEntity | AccessTokenEntity | RefreshTokenEntity | AppMetadataEntity | ServerTelemetryEntity | ThrottlingEntity | string;
export declare type ValidCredentialType = IdTokenEntity | AccessTokenEntity | RefreshTokenEntity;
/**

@@ -21,0 +22,0 @@ * Account: <home_account_id>-<environment>-<realm*>

@@ -15,4 +15,5 @@ import { ClientConfiguration } from "../config/ClientConfiguration";

private readIdTokenFromCache;
private readAccountFromCache;
private executeTokenRequest;
private createTokenRequestBody;
}

@@ -21,3 +21,3 @@ export { AuthorizationCodeClient } from "./client/AuthorizationCodeClient";

export { CacheManager } from "./cache/CacheManager";
export { AccountCache, AccessTokenCache, IdTokenCache, RefreshTokenCache, AppMetadataCache, ValidCacheType } from "./cache/utils/CacheTypes";
export { AccountCache, AccessTokenCache, IdTokenCache, RefreshTokenCache, AppMetadataCache, ValidCacheType, ValidCredentialType } from "./cache/utils/CacheTypes";
export { CredentialEntity } from "./cache/entities/CredentialEntity";

@@ -59,3 +59,3 @@ export { AppMetadataEntity } from "./cache/entities/AppMetadataEntity";

export { ClientConfigurationError, ClientConfigurationErrorMessage } from "./error/ClientConfigurationError";
export { Constants, PromptValue, PersistentCacheKeys, ResponseMode, CacheSchemaType, CredentialType, CacheType, AuthenticationScheme } from "./utils/Constants";
export { Constants, PromptValue, PersistentCacheKeys, ResponseMode, CacheSchemaType, CredentialType, CacheType, CacheAccountType, AuthenticationScheme } from "./utils/Constants";
export { StringUtils } from "./utils/StringUtils";

@@ -62,0 +62,0 @@ export { StringDict } from "./utils/MsalTypes";

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

NOT_DEFINED: string;
EMPTY_STRING: string;
};

@@ -234,2 +235,3 @@ /**

OVERFLOW_FALSE: string;
UNKNOWN_ERROR: string;
};

@@ -236,0 +238,0 @@ /**

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

},
"version": "1.6.2",
"version": "1.6.3",
"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