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 6.0.0 to 6.1.0

dist/authority/AuthorityOptions.js

37

CHANGELOG.json

@@ -5,2 +5,39 @@ {

{
"date": "Tue, 08 Feb 2022 00:41:06 GMT",
"tag": "@azure/msal-common_v6.1.0",
"version": "6.1.0",
"comments": {
"none": [
{
"author": "thomas.norling@microsoft.com",
"package": "@azure/msal-common",
"commit": "19f76b1d9cd2b0f1a4a7e4765c8ee9e7e17f3d59",
"comment": "Test changes #4383"
}
],
"patch": [
{
"author": "sameera.gajjarapu@microsoft.com",
"package": "@azure/msal-common",
"commit": "d576b7d35f8f24e53946c72bc78c0401a8d2dc86",
"comment": "Add AzureCloudInstance to JS libraries"
}
],
"minor": [
{
"author": "sameera.gajjarapu@microsoft.com",
"package": "@azure/msal-common",
"commit": "a6fda9fd4ff40a90d173ecbd1281d8dd02eb4d58",
"comment": "Support proxy in msal-node(#4447)"
},
{
"author": "hemoral@microsoft.com",
"package": "@azure/msal-common",
"commit": "4c7418a6a76f29706ff0e5f7efd890d22fa4af0b",
"comment": "Add support for logout_hint #4450"
}
]
}
},
{
"date": "Tue, 04 Jan 2022 00:20:29 GMT",

@@ -7,0 +44,0 @@ "tag": "@azure/msal-common_v6.0.0",

15

CHANGELOG.md
# Change Log - @azure/msal-common
This log was last generated on Tue, 04 Jan 2022 00:20:29 GMT and should not be manually modified.
This log was last generated on Tue, 08 Feb 2022 00:41:06 GMT and should not be manually modified.
<!-- Start content -->
## 6.1.0
Tue, 08 Feb 2022 00:41:06 GMT
### Minor changes
- Support proxy in msal-node(#4447) (sameera.gajjarapu@microsoft.com)
- Add support for logout_hint #4450 (hemoral@microsoft.com)
### Patches
- Add AzureCloudInstance to JS libraries (sameera.gajjarapu@microsoft.com)
## 6.0.0

@@ -8,0 +21,0 @@

2

dist/_virtual/_tslib.js

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*! *****************************************************************************

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientAuthError } from '../error/ClientAuthError.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientAuthError } from '../error/ClientAuthError.js';

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

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

@@ -15,0 +16,0 @@ name?: string;

@@ -10,2 +10,3 @@ import { AuthorityType } from "./AuthorityType";

import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata";
import { AzureCloudOptions } from "../config/ClientConfiguration";
/**

@@ -24,3 +25,4 @@ * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the

regionDiscoveryMetadata: RegionDiscoveryMetadata;
constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions);
private proxyUrl;
constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, proxyUrl?: string);
get authorityType(): AuthorityType;

@@ -134,2 +136,8 @@ /**

/**
* helper function to populate the authority based on azureCloudOptions
* @param authorityString
* @param azureCloudOptions
*/
static generateAuthority(authorityString: string, azureCloudOptions?: AzureCloudOptions): string;
/**
* Creates cloud discovery metadata object from a given host

@@ -136,0 +144,0 @@ * @param host

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -12,2 +12,3 @@ import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';

import { AuthorityMetadataEntity } from '../cache/entities/AuthorityMetadataEntity.js';
import { AzureCloudInstance } from './AuthorityOptions.js';
import { isCloudInstanceDiscoveryResponse } from './CloudInstanceDiscoveryResponse.js';

@@ -25,3 +26,3 @@ import { RegionDiscovery } from './RegionDiscovery.js';

var Authority = /** @class */ (function () {
function Authority(authority, networkInterface, cacheManager, authorityOptions) {
function Authority(authority, networkInterface, cacheManager, authorityOptions, proxyUrl) {
this.canonicalAuthority = authority;

@@ -34,2 +35,3 @@ this._canonicalAuthority.validateAsUri();

this.regionDiscoveryMetadata = { region_used: undefined, region_source: undefined, region_outcome: undefined };
this.proxyUrl = proxyUrl || Constants.EMPTY_STRING;
}

@@ -303,3 +305,3 @@ Object.defineProperty(Authority.prototype, "authorityType", {

if (!((_a = this.authorityOptions.azureRegionConfiguration) === null || _a === void 0 ? void 0 : _a.azureRegion)) return [3 /*break*/, 3];
return [4 /*yield*/, this.regionDiscovery.detectRegion(this.authorityOptions.azureRegionConfiguration.environmentRegion, this.regionDiscoveryMetadata)];
return [4 /*yield*/, this.regionDiscovery.detectRegion(this.authorityOptions.azureRegionConfiguration.environmentRegion, this.regionDiscoveryMetadata, this.proxyUrl)];
case 2:

@@ -367,15 +369,21 @@ autodetectedRegionName = _b.sent();

return __awaiter(this, void 0, void 0, function () {
var response;
var options, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint)];
options = {};
if (this.proxyUrl) {
options.proxyUrl = this.proxyUrl;
}
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint, options)];
case 2:
response = _a.sent();
return [2 /*return*/, isOpenIdConfigResponse(response.body) ? response.body : null];
case 2:
case 3:
_a.sent();
return [2 /*return*/, null];
case 3: return [2 /*return*/];
case 4: return [2 /*return*/];
}

@@ -450,3 +458,3 @@ });

return __awaiter(this, void 0, void 0, function () {
var instanceDiscoveryEndpoint, match, response, metadata;
var instanceDiscoveryEndpoint, options, match, response, metadata;
return __generator(this, function (_a) {

@@ -456,2 +464,6 @@ switch (_a.label) {

instanceDiscoveryEndpoint = "" + Constants.AAD_INSTANCE_DISCOVERY_ENDPT + this.canonicalAuthority + "oauth2/v2.0/authorize";
options = {};
if (this.proxyUrl) {
options.proxyUrl = this.proxyUrl;
}
match = null;

@@ -461,3 +473,3 @@ _a.label = 1;

_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint)];
return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options)];
case 2:

@@ -477,3 +489,3 @@ response = _a.sent();

if (!match) {
// Custom Domain scenario, host is trusted because Instance Discovery call succeeded
// Custom Domain scenario, host is trusted because Instance Discovery call succeeded
match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);

@@ -497,2 +509,15 @@ }

/**
* helper function to populate the authority based on azureCloudOptions
* @param authorityString
* @param azureCloudOptions
*/
Authority.generateAuthority = function (authorityString, azureCloudOptions) {
var authorityAzureCloudInstance;
if (azureCloudOptions && azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None) {
var tenant = azureCloudOptions.tenant ? azureCloudOptions.tenant : Constants.DEFAULT_COMMON_TENANT;
authorityAzureCloudInstance = azureCloudOptions.azureCloudInstance + "/" + tenant + "/";
}
return authorityAzureCloudInstance ? authorityAzureCloudInstance : authorityString;
};
/**
* Creates cloud discovery metadata object from a given host

@@ -499,0 +524,0 @@ * @param host

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

*/
static createDiscoveredInstance(authorityUri: string, networkClient: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions): Promise<Authority>;
static createDiscoveredInstance(authorityUri: string, networkClient: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, proxyUrl?: string): Promise<Authority>;
/**

@@ -28,4 +28,4 @@ * Create an authority object of the correct type based on the url

*/
static createInstance(authorityUrl: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions): Authority;
static createInstance(authorityUrl: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, proxyUrl?: string): Authority;
}
//# sourceMappingURL=AuthorityFactory.d.ts.map

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -26,3 +26,3 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

*/
AuthorityFactory.createDiscoveredInstance = function (authorityUri, networkClient, cacheManager, authorityOptions) {
AuthorityFactory.createDiscoveredInstance = function (authorityUri, networkClient, cacheManager, authorityOptions, proxyUrl) {
return __awaiter(this, void 0, void 0, function () {

@@ -33,3 +33,3 @@ var acquireTokenAuthority, e_1;

case 0:
acquireTokenAuthority = AuthorityFactory.createInstance(authorityUri, networkClient, cacheManager, authorityOptions);
acquireTokenAuthority = AuthorityFactory.createInstance(authorityUri, networkClient, cacheManager, authorityOptions, proxyUrl);
_a.label = 1;

@@ -60,3 +60,3 @@ case 1:

*/
AuthorityFactory.createInstance = function (authorityUrl, networkInterface, cacheManager, authorityOptions) {
AuthorityFactory.createInstance = function (authorityUrl, networkInterface, cacheManager, authorityOptions, proxyUrl) {
// Throw error if authority url is empty

@@ -66,3 +66,3 @@ if (StringUtils.isEmpty(authorityUrl)) {

}
return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions);
return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions, proxyUrl);
};

@@ -69,0 +69,0 @@ return AuthorityFactory;

@@ -10,2 +10,9 @@ import { ProtocolMode } from "./ProtocolMode";

};
export declare enum AzureCloudInstance {
None = 0,
AzurePublic = "https://login.microsoftonline.com",
AzureChina = "https://login.chinacloudapi.cn",
AzureGermany = "https://login.microsoftonline.de",
AzureUsGovernment = "https://login.microsoftonline.us"
}
//# sourceMappingURL=AuthorityOptions.d.ts.map

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

import { INetworkModule } from "../network/INetworkModule";
import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata";
import { ImdsOptions } from "./ImdsOptions";
export declare class RegionDiscovery {
protected networkInterface: INetworkModule;
protected static IMDS_OPTIONS: {
headers: {
Metadata: string;
};
};
protected static IMDS_OPTIONS: ImdsOptions;
constructor(networkInterface: INetworkModule);

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

*/
detectRegion(environmentRegion: string | undefined, regionDiscoveryMetadata: RegionDiscoveryMetadata): Promise<string | null>;
detectRegion(environmentRegion: string | undefined, regionDiscoveryMetadata: RegionDiscoveryMetadata, proxyUrl: string): Promise<string | null>;
/**

@@ -19,0 +16,0 @@ * Make the call to the IMDS endpoint

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -19,5 +19,5 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

*/
RegionDiscovery.prototype.detectRegion = function (environmentRegion, regionDiscoveryMetadata) {
RegionDiscovery.prototype.detectRegion = function (environmentRegion, regionDiscoveryMetadata, proxyUrl) {
return __awaiter(this, void 0, void 0, function () {
var autodetectedRegionName, localIMDSVersionResponse, currentIMDSVersion, currentIMDSVersionResponse;
var autodetectedRegionName, options, localIMDSVersionResponse, currentIMDSVersion, currentIMDSVersionResponse;
return __generator(this, function (_a) {

@@ -28,6 +28,10 @@ switch (_a.label) {

if (!!autodetectedRegionName) return [3 /*break*/, 8];
options = RegionDiscovery.IMDS_OPTIONS;
if (proxyUrl) {
options.proxyUrl = proxyUrl;
}
_a.label = 1;
case 1:
_a.trys.push([1, 6, , 7]);
return [4 /*yield*/, this.getRegionFromIMDS(Constants.IMDS_VERSION)];
return [4 /*yield*/, this.getRegionFromIMDS(Constants.IMDS_VERSION, options)];
case 2:

@@ -40,3 +44,3 @@ localIMDSVersionResponse = _a.sent();

if (!(localIMDSVersionResponse.status === ResponseCodes.httpBadRequest)) return [3 /*break*/, 5];
return [4 /*yield*/, this.getCurrentVersion()];
return [4 /*yield*/, this.getCurrentVersion(options)];
case 3:

@@ -48,3 +52,3 @@ currentIMDSVersion = _a.sent();

}
return [4 /*yield*/, this.getRegionFromIMDS(currentIMDSVersion)];
return [4 /*yield*/, this.getRegionFromIMDS(currentIMDSVersion, options)];
case 4:

@@ -82,6 +86,6 @@ currentIMDSVersionResponse = _a.sent();

*/
RegionDiscovery.prototype.getRegionFromIMDS = function (version) {
RegionDiscovery.prototype.getRegionFromIMDS = function (version, options) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.networkInterface.sendGetRequestAsync(Constants.IMDS_ENDPOINT + "?api-version=" + version + "&format=text", RegionDiscovery.IMDS_OPTIONS, Constants.IMDS_TIMEOUT)];
return [2 /*return*/, this.networkInterface.sendGetRequestAsync(Constants.IMDS_ENDPOINT + "?api-version=" + version + "&format=text", options, Constants.IMDS_TIMEOUT)];
});

@@ -95,3 +99,3 @@ });

*/
RegionDiscovery.prototype.getCurrentVersion = function () {
RegionDiscovery.prototype.getCurrentVersion = function (options) {
return __awaiter(this, void 0, void 0, function () {

@@ -103,3 +107,3 @@ var response;

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(Constants.IMDS_ENDPOINT + "?format=json", RegionDiscovery.IMDS_OPTIONS)];
return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(Constants.IMDS_ENDPOINT + "?format=json", options)];
case 1:

@@ -121,3 +125,7 @@ response = _a.sent();

// Options for the IMDS endpoint request
RegionDiscovery.IMDS_OPTIONS = { headers: { "Metadata": "true" } };
RegionDiscovery.IMDS_OPTIONS = {
headers: {
Metadata: "true",
},
};
return RegionDiscovery;

@@ -124,0 +132,0 @@ }());

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator, __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { Separators, CacheAccountType, CacheType, Constants } from '../../utils/Constants.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { Separators, APP_METADATA } from '../../utils/Constants.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { AUTHORITY_METADATA_CONSTANTS } from '../../utils/Constants.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { CredentialType, CacheType, Constants, Separators, AuthenticationScheme } from '../../utils/Constants.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { SERVER_TELEM_CONSTANTS } from '../../utils/Constants.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { ThrottlingConstants } from '../../utils/Constants.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -405,2 +405,5 @@ import { __extends, __awaiter, __generator, __assign, __spreadArrays } from '../_virtual/_tslib.js';

}
if (request.logoutHint) {
parameterBuilder.addLogoutHint(request.logoutHint);
}
if (request.extraQueryParameters) {

@@ -407,0 +410,0 @@ parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -75,3 +75,3 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

switch (_a.label) {
case 0: return [4 /*yield*/, this.networkManager.sendPostRequest(thumbprint, tokenEndpoint, { body: queryString, headers: headers })];
case 0: return [4 /*yield*/, this.networkManager.sendPostRequest(thumbprint, tokenEndpoint, { body: queryString, headers: headers, proxyUrl: this.config.systemOptions.proxyUrl })];
case 1:

@@ -78,0 +78,0 @@ response = _a.sent();

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -89,3 +89,4 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

body: queryString,
headers: headers
headers: headers,
proxyUrl: this.config.systemOptions.proxyUrl
})];

@@ -92,0 +93,0 @@ case 1:

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';

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

import { Authority } from "../authority/Authority";
import { AzureCloudInstance } from "../authority/AuthorityOptions";
import { CacheManager } from "../cache/CacheManager";

@@ -63,2 +64,3 @@ import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager";

clientCapabilities?: Array<string>;
azureCloudOptions?: AzureCloudOptions;
};

@@ -73,2 +75,3 @@ /**

preventCorsPreflight?: boolean;
proxyUrl?: string;
};

@@ -108,2 +111,12 @@ /**

};
/**
* AzureCloudInstance specific options
*
* - azureCloudInstance - string enum providing short notation for soverign and public cloud authorities
* - tenant - provision to provide the tenant info
*/
export declare type AzureCloudOptions = {
azureCloudInstance: AzureCloudInstance;
tenant?: string;
};
export declare const DEFAULT_SYSTEM_OPTIONS: Required<SystemOptions>;

@@ -110,0 +123,0 @@ /**

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -9,2 +9,3 @@ import { __assign, __awaiter, __generator } from '../_virtual/_tslib.js';

import { version } from '../packageMetadata.js';
import { AzureCloudInstance } from '../authority/AuthorityOptions.js';
import { DefaultStorageClass } from '../cache/CacheManager.js';

@@ -20,3 +21,4 @@

tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
preventCorsPreflight: false
preventCorsPreflight: false,
proxyUrl: "",
};

@@ -61,2 +63,6 @@ var DEFAULT_LOGGER_IMPLEMENTATION = {

};
var DEFAULT_AZURE_CLOUD_OPTIONS = {
azureCloudInstance: AzureCloudInstance.None,
tenant: "" + Constants.DEFAULT_COMMON_TENANT
};
/**

@@ -91,3 +97,3 @@ * Function that sets the default options when not explicitly configured from app developer

function buildAuthOptions(authOptions) {
return __assign({ clientCapabilities: [] }, authOptions);
return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS }, authOptions);
}

@@ -94,0 +100,0 @@

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

};
invalidAzureCloudInstance: {
code: string;
desc: string;
};
missingSshJwk: {

@@ -175,2 +179,9 @@ code: string;

static createUntrustedAuthorityError(): ClientConfigurationError;
/**
* Throws error when the AzureCloudInstance is set to an invalid value
*/
static createInvalidAzureCloudInstanceError(): ClientConfigurationError;
/**
* Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request
*/
static createMissingSshJwkError(): ClientConfigurationError;

@@ -177,0 +188,0 @@ /**

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -86,2 +86,6 @@ import { __extends } from '../_virtual/_tslib.js';

},
invalidAzureCloudInstance: {
code: "invalid_azure_cloud_instance",
desc: "Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"
},
missingSshJwk: {

@@ -223,3 +227,9 @@ code: "missing_ssh_jwk",

};
/*
/**
* Throws error when the AzureCloudInstance is set to an invalid value
*/
ClientConfigurationError.createInvalidAzureCloudInstanceError = function () {
return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAzureCloudInstance.code, ClientConfigurationErrorMessage.invalidAzureCloudInstance.desc);
};
/**
* Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request

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

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js';

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

export { UsernamePasswordClient } from "./client/UsernamePasswordClient";
export { AuthOptions, SystemOptions, LoggerOptions, DEFAULT_SYSTEM_OPTIONS } from "./config/ClientConfiguration";
export { AuthOptions, SystemOptions, LoggerOptions, DEFAULT_SYSTEM_OPTIONS, AzureCloudOptions } from "./config/ClientConfiguration";
export { ClientConfiguration } from "./config/ClientConfiguration";

@@ -22,3 +22,3 @@ export { AccountInfo } from "./account/AccountInfo";

export { Authority } from "./authority/Authority";
export { AuthorityOptions } from "./authority/AuthorityOptions";
export { AuthorityOptions, AzureCloudInstance } from "./authority/AuthorityOptions";
export { AuthorityFactory } from "./authority/AuthorityFactory";

@@ -25,0 +25,0 @@ export { AuthorityType } from "./authority/AuthorityType";

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -14,2 +14,3 @@ export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.js';

export { Authority } from './authority/Authority.js';
export { AzureCloudInstance } from './authority/AuthorityOptions.js';
export { AuthorityFactory } from './authority/AuthorityFactory.js';

@@ -16,0 +17,0 @@ export { AuthorityType } from './authority/AuthorityType.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { StringUtils } from '../utils/StringUtils.js';

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

body?: string;
proxyUrl?: string;
};

@@ -10,0 +11,0 @@ /**

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { AuthError } from '../error/AuthError.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { ThrottlingConstants, CacheSchemaType, Constants, HeaderNames } from '../utils/Constants.js';

export declare const name = "@azure/msal-common";
export declare const version = "6.0.0";
export declare const version = "6.1.0";
//# sourceMappingURL=packageMetadata.d.ts.map

@@ -1,8 +0,8 @@

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';
/* eslint-disable header/header */
var name = "@azure/msal-common";
var version = "6.0.0";
var version = "6.1.0";
export { name, version };
//# sourceMappingURL=packageMetadata.js.map

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientConfigurationError } from '../error/ClientConfigurationError.js';

import { AuthenticationScheme } from "../utils/Constants";
import { AzureCloudOptions } from "../config/ClientConfiguration";
/**

@@ -7,10 +8,11 @@ * BaseAuthRequest

* - scopes - Array of scopes the application is requesting access to.
* - authenticationScheme - The type of token retrieved. Defaults to "Bearer". Can also be type "pop" or "SSH".
* - authenticationScheme - The type of token retrieved. Defaults to "Bearer". Can also be type "pop" or "SSH".
* - claims - A stringified claims request which will be added to all /authorize and /token calls
* - shrClaims - A stringified claims object which will be added to a Signed HTTP Request
* - shrNonce - A server-generated timestamp that has been encrypted and base64URL encoded, which will be added to a Signed HTTP Request.
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
* - sshJwk - A stringified JSON Web Key representing a public key that can be signed by an SSH certificate.
* - sshKid - Key ID that uniquely identifies the SSH public key mentioned above.
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
* - sshJwk - A stringified JSON Web Key representing a public key that can be signed by an SSH certificate.
* - sshKid - Key ID that uniquely identifies the SSH public key mentioned above.
* - azureCloudOptions - Convenience string enums for users to provide public/sovereign cloud ids
* - requestedClaimsHash - SHA 256 hash string of the requested claims string, used as part of an access token cache key so tokens can be filtered by requested claims

@@ -30,4 +32,5 @@ */

sshKid?: string;
azureCloudOptions?: AzureCloudOptions;
requestedClaimsHash?: string;
};
//# sourceMappingURL=BaseAuthRequest.d.ts.map

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

* - state - A value included in the request to the logout endpoint which will be returned in the query string upon post logout redirection
* - logoutHint - A string that specifies the account that is being logged out in order to skip the server account picker on logout
*/

@@ -18,4 +19,5 @@ export declare type CommonEndSessionRequest = {

state?: string;
logoutHint?: string;
extraQueryParameters?: StringDict;
};
//# sourceMappingURL=CommonEndSessionRequest.d.ts.map

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

/**
* Adds logout_hint parameter for "silent" logout which prevent server account picker
*/
addLogoutHint(logoutHint: string): void;
/**
* Utility to create a URL from the params map

@@ -198,0 +202,0 @@ */

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -336,2 +336,8 @@ import { __spreadArrays } from '../_virtual/_tslib.js';

/**
* Adds logout_hint parameter for "silent" logout which prevent server account picker
*/
RequestParameterBuilder.prototype.addLogoutHint = function (logoutHint) {
this.parameters.set(AADServerParamKeys.LOGOUT_HINT, encodeURIComponent(logoutHint));
};
/**
* Utility to create a URL from the params map

@@ -338,0 +344,0 @@ */

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { StringUtils } from '../utils/StringUtils.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __spreadArrays } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { SERVER_TELEM_CONSTANTS, CacheOutcome, Constants, Separators } from '../../utils/Constants.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientConfigurationError } from '../error/ClientConfigurationError.js';

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

DEFAULT_AUTHORITY_HOST: string;
DEFAULT_COMMON_TENANT: string;
ADFS: string;

@@ -113,3 +114,4 @@ AAD_INSTANCE_DISCOVERY_ENDPT: string;

CCS_HEADER = "X-AnchorMailbox",
RETURN_SPA_CODE = "return_spa_code"
RETURN_SPA_CODE = "return_spa_code",
LOGOUT_HINT = "logout_hint"
}

@@ -116,0 +118,0 @@ /**

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -17,2 +17,3 @@ import { __spreadArrays } from '../_virtual/_tslib.js';

DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com",
DEFAULT_COMMON_TENANT: "common",
// ADFS String

@@ -142,2 +143,3 @@ ADFS: "adfs",

AADServerParamKeys["RETURN_SPA_CODE"] = "return_spa_code";
AADServerParamKeys["LOGOUT_HINT"] = "logout_hint";
})(AADServerParamKeys || (AADServerParamKeys = {}));

@@ -144,0 +146,0 @@ /**

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { StringUtils } from './StringUtils.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ import { ClientAuthError } from '../error/ClientAuthError.js';

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

/*! @azure/msal-common v6.0.0 2022-01-04 */
/*! @azure/msal-common v6.1.0 2022-02-08 */
'use strict';

@@ -3,0 +3,0 @@ /*

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

},
"version": "6.0.0",
"version": "6.1.0",
"description": "Microsoft Authentication Library for js",

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

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 too big to display

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