@azure/msal-common 5.2.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_tslib.js +1 -1
- package/dist/account/AuthToken.js +1 -1
- package/dist/account/CcsCredential.js +1 -1
- package/dist/account/ClientInfo.js +1 -1
- package/dist/account/TokenClaims.d.ts +1 -0
- package/dist/account/TokenClaims.d.ts.map +1 -1
- package/dist/authority/Authority.d.ts +9 -1
- package/dist/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.js +36 -11
- package/dist/authority/Authority.js.map +1 -1
- package/dist/authority/AuthorityFactory.d.ts +2 -2
- package/dist/authority/AuthorityFactory.d.ts.map +1 -1
- package/dist/authority/AuthorityFactory.js +5 -5
- package/dist/authority/AuthorityFactory.js.map +1 -1
- package/dist/authority/AuthorityOptions.d.ts +8 -0
- package/dist/authority/AuthorityOptions.d.ts.map +1 -1
- package/dist/authority/AuthorityOptions.js +24 -0
- package/dist/authority/AuthorityOptions.js.map +1 -0
- package/dist/authority/AuthorityType.js +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.js +1 -1
- package/dist/authority/ImdsOptions.d.ts +7 -0
- package/dist/authority/ImdsOptions.d.ts.map +1 -0
- package/dist/authority/OpenIdConfigResponse.js +1 -1
- package/dist/authority/ProtocolMode.js +1 -1
- package/dist/authority/RegionDiscovery.d.ts +3 -6
- package/dist/authority/RegionDiscovery.d.ts.map +1 -1
- package/dist/authority/RegionDiscovery.js +19 -11
- package/dist/authority/RegionDiscovery.js.map +1 -1
- package/dist/cache/CacheManager.d.ts +9 -5
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.js +39 -29
- package/dist/cache/CacheManager.js.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts +3 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.js +13 -6
- package/dist/cache/entities/AccessTokenEntity.js.map +1 -1
- package/dist/cache/entities/AccountEntity.js +10 -10
- package/dist/cache/entities/AccountEntity.js.map +1 -1
- package/dist/cache/entities/AppMetadataEntity.js +1 -1
- package/dist/cache/entities/AuthorityMetadataEntity.js +1 -1
- package/dist/cache/entities/CacheRecord.js +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts +12 -2
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/dist/cache/entities/CredentialEntity.js +27 -12
- package/dist/cache/entities/CredentialEntity.js.map +1 -1
- package/dist/cache/entities/IdTokenEntity.js +1 -1
- package/dist/cache/entities/RefreshTokenEntity.js +1 -1
- package/dist/cache/entities/ServerTelemetryEntity.js +1 -1
- package/dist/cache/entities/ThrottlingEntity.js +1 -1
- package/dist/cache/persistence/TokenCacheContext.js +1 -1
- package/dist/cache/utils/CacheTypes.d.ts +1 -0
- package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.js +7 -2
- package/dist/client/AuthorizationCodeClient.js.map +1 -1
- package/dist/client/BaseClient.js +2 -2
- package/dist/client/BaseClient.js.map +1 -1
- package/dist/client/ClientCredentialClient.d.ts.map +1 -1
- package/dist/client/ClientCredentialClient.js +5 -4
- package/dist/client/ClientCredentialClient.js.map +1 -1
- package/dist/client/DeviceCodeClient.d.ts.map +1 -1
- package/dist/client/DeviceCodeClient.js +6 -4
- package/dist/client/DeviceCodeClient.js.map +1 -1
- package/dist/client/OnBehalfOfClient.js +4 -3
- package/dist/client/OnBehalfOfClient.js.map +1 -1
- package/dist/client/RefreshTokenClient.js +3 -2
- package/dist/client/RefreshTokenClient.js.map +1 -1
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.js +4 -13
- package/dist/client/SilentFlowClient.js.map +1 -1
- package/dist/client/UsernamePasswordClient.js +3 -2
- package/dist/client/UsernamePasswordClient.js.map +1 -1
- package/dist/config/ClientConfiguration.d.ts +29 -1
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.js +21 -8
- package/dist/config/ClientConfiguration.js.map +1 -1
- package/dist/crypto/ICrypto.d.ts +9 -2
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.js +10 -1
- package/dist/crypto/ICrypto.js.map +1 -1
- package/dist/crypto/IGuidGenerator.d.ts +5 -0
- package/dist/crypto/IGuidGenerator.d.ts.map +1 -0
- package/dist/crypto/PopTokenGenerator.js +2 -2
- package/dist/crypto/PopTokenGenerator.js.map +1 -1
- package/dist/error/AuthError.js +3 -3
- package/dist/error/AuthError.js.map +1 -1
- package/dist/error/ClientAuthError.js +1 -1
- package/dist/error/ClientConfigurationError.d.ts +11 -0
- package/dist/error/ClientConfigurationError.d.ts.map +1 -1
- package/dist/error/ClientConfigurationError.js +12 -2
- package/dist/error/ClientConfigurationError.js.map +1 -1
- package/dist/error/InteractionRequiredAuthError.js +1 -1
- package/dist/error/ServerError.js +1 -1
- package/dist/index.cjs.js +666 -140
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/logger/Logger.js +13 -13
- package/dist/logger/Logger.js.map +1 -1
- package/dist/network/INetworkModule.d.ts +1 -0
- package/dist/network/INetworkModule.d.ts.map +1 -1
- package/dist/network/INetworkModule.js +1 -1
- package/dist/network/INetworkModule.js.map +1 -1
- package/dist/network/NetworkManager.js +1 -1
- package/dist/network/RequestThumbprint.d.ts +1 -1
- package/dist/network/RequestThumbprint.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.js +2 -2
- package/dist/network/ThrottlingUtils.js.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.js +2 -2
- package/dist/packageMetadata.js.map +1 -1
- package/dist/request/AuthenticationHeaderParser.js +3 -3
- package/dist/request/AuthenticationHeaderParser.js.map +1 -1
- package/dist/request/BaseAuthRequest.d.ts +10 -5
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/CommonEndSessionRequest.d.ts +2 -0
- package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts +10 -1
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.js +25 -3
- package/dist/request/RequestParameterBuilder.js.map +1 -1
- package/dist/request/RequestValidator.js +1 -1
- package/dist/request/ScopeSet.js +4 -4
- package/dist/request/ScopeSet.js.map +1 -1
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.js +8 -8
- package/dist/response/ResponseHandler.js.map +1 -1
- package/dist/telemetry/performance/IPerformanceClient.d.ts +22 -0
- package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
- package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
- package/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
- package/dist/telemetry/performance/PerformanceClient.d.ts +125 -0
- package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -0
- package/dist/telemetry/performance/PerformanceClient.js +275 -0
- package/dist/telemetry/performance/PerformanceClient.js.map +1 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts +182 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
- package/dist/telemetry/performance/PerformanceEvent.js +85 -0
- package/dist/telemetry/performance/PerformanceEvent.js.map +1 -0
- package/dist/telemetry/performance/StubPerformanceClient.d.ts +13 -0
- package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
- package/dist/telemetry/performance/StubPerformanceClient.js +37 -0
- package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -0
- package/dist/telemetry/server/ServerTelemetryManager.js +4 -4
- package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -1
- package/dist/url/UrlString.js +2 -2
- package/dist/url/UrlString.js.map +1 -1
- package/dist/utils/Constants.d.ts +5 -1
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.js +5 -1
- package/dist/utils/Constants.js.map +1 -1
- package/dist/utils/ProtocolUtils.js +3 -3
- package/dist/utils/ProtocolUtils.js.map +1 -1
- package/dist/utils/StringUtils.js +1 -1
- package/dist/utils/TimeUtils.js +1 -1
- package/package.json +2 -4
- package/CHANGELOG.json +0 -1259
- package/CHANGELOG.md +0 -479
|
@@ -2,6 +2,7 @@ import { INetworkModule } from "../network/INetworkModule";
|
|
|
2
2
|
import { ICrypto } from "../crypto/ICrypto";
|
|
3
3
|
import { ILoggerCallback, LogLevel } from "../logger/Logger";
|
|
4
4
|
import { Authority } from "../authority/Authority";
|
|
5
|
+
import { AzureCloudInstance } from "../authority/AuthorityOptions";
|
|
5
6
|
import { CacheManager } from "../cache/CacheManager";
|
|
6
7
|
import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager";
|
|
7
8
|
import { ICachePlugin } from "../cache/interface/ICachePlugin";
|
|
@@ -13,6 +14,7 @@ import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCa
|
|
|
13
14
|
* - authOptions - Authentication for application
|
|
14
15
|
* - cryptoInterface - Implementation of crypto functions
|
|
15
16
|
* - libraryInfo - Library metadata
|
|
17
|
+
* - telemetry - Telemetry options and data
|
|
16
18
|
* - loggerOptions - Logging for application
|
|
17
19
|
* - networkInterface - Network implementation
|
|
18
20
|
* - storageInterface - Storage implementation
|
|
@@ -28,6 +30,7 @@ export declare type ClientConfiguration = {
|
|
|
28
30
|
cryptoInterface?: ICrypto;
|
|
29
31
|
clientCredentials?: ClientCredentials;
|
|
30
32
|
libraryInfo?: LibraryInfo;
|
|
33
|
+
telemetry?: TelemetryOptions;
|
|
31
34
|
serverTelemetryManager?: ServerTelemetryManager | null;
|
|
32
35
|
persistencePlugin?: ICachePlugin | null;
|
|
33
36
|
serializableCache?: ISerializableTokenCache | null;
|
|
@@ -40,6 +43,7 @@ export declare type CommonClientConfiguration = {
|
|
|
40
43
|
networkInterface: INetworkModule;
|
|
41
44
|
cryptoInterface: Required<ICrypto>;
|
|
42
45
|
libraryInfo: LibraryInfo;
|
|
46
|
+
telemetry: Required<TelemetryOptions>;
|
|
43
47
|
serverTelemetryManager: ServerTelemetryManager | null;
|
|
44
48
|
clientCredentials: ClientCredentials;
|
|
45
49
|
persistencePlugin: ICachePlugin | null;
|
|
@@ -59,6 +63,7 @@ export declare type AuthOptions = {
|
|
|
59
63
|
clientId: string;
|
|
60
64
|
authority: Authority;
|
|
61
65
|
clientCapabilities?: Array<string>;
|
|
66
|
+
azureCloudOptions?: AzureCloudOptions;
|
|
62
67
|
};
|
|
63
68
|
/**
|
|
64
69
|
* Use this to configure token renewal info in the Configuration object
|
|
@@ -68,6 +73,7 @@ export declare type AuthOptions = {
|
|
|
68
73
|
export declare type SystemOptions = {
|
|
69
74
|
tokenRenewalOffsetSeconds?: number;
|
|
70
75
|
preventCorsPreflight?: boolean;
|
|
76
|
+
proxyUrl?: string;
|
|
71
77
|
};
|
|
72
78
|
/**
|
|
73
79
|
* Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object
|
|
@@ -102,6 +108,28 @@ export declare type ClientCredentials = {
|
|
|
102
108
|
assertionType: string;
|
|
103
109
|
};
|
|
104
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* AzureCloudInstance specific options
|
|
113
|
+
*
|
|
114
|
+
* - azureCloudInstance - string enum providing short notation for soverign and public cloud authorities
|
|
115
|
+
* - tenant - provision to provide the tenant info
|
|
116
|
+
*/
|
|
117
|
+
export declare type AzureCloudOptions = {
|
|
118
|
+
azureCloudInstance: AzureCloudInstance;
|
|
119
|
+
tenant?: string;
|
|
120
|
+
};
|
|
121
|
+
export declare type TelemetryOptions = {
|
|
122
|
+
application: ApplicationTelemetry;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Telemetry information sent on request
|
|
126
|
+
* - appName: Unique string name of an application
|
|
127
|
+
* - appVersion: Version of the application using MSAL
|
|
128
|
+
*/
|
|
129
|
+
export declare type ApplicationTelemetry = {
|
|
130
|
+
appName: string;
|
|
131
|
+
appVersion: string;
|
|
132
|
+
};
|
|
105
133
|
export declare const DEFAULT_SYSTEM_OPTIONS: Required<SystemOptions>;
|
|
106
134
|
/**
|
|
107
135
|
* Function that sets the default options when not explicitly configured from app developer
|
|
@@ -110,5 +138,5 @@ export declare const DEFAULT_SYSTEM_OPTIONS: Required<SystemOptions>;
|
|
|
110
138
|
*
|
|
111
139
|
* @returns Configuration
|
|
112
140
|
*/
|
|
113
|
-
export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache }: ClientConfiguration): CommonClientConfiguration;
|
|
141
|
+
export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache }: ClientConfiguration): CommonClientConfiguration;
|
|
114
142
|
//# sourceMappingURL=ClientConfiguration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAiC,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,SA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4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v6.2.0 2022-04-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __assign, __awaiter, __generator } from '../_virtual/_tslib.js';
|
|
4
4
|
import { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.js';
|
|
@@ -6,6 +6,7 @@ import { AuthError } from '../error/AuthError.js';
|
|
|
6
6
|
import { LogLevel } from '../logger/Logger.js';
|
|
7
7
|
import { Constants } from '../utils/Constants.js';
|
|
8
8
|
import { version } from '../packageMetadata.js';
|
|
9
|
+
import { AzureCloudInstance } from '../authority/AuthorityOptions.js';
|
|
9
10
|
import { DefaultStorageClass } from '../cache/CacheManager.js';
|
|
10
11
|
|
|
11
12
|
/*
|
|
@@ -16,7 +17,8 @@ import { DefaultStorageClass } from '../cache/CacheManager.js';
|
|
|
16
17
|
var DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
17
18
|
var DEFAULT_SYSTEM_OPTIONS = {
|
|
18
19
|
tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
|
|
19
|
-
preventCorsPreflight: false
|
|
20
|
+
preventCorsPreflight: false,
|
|
21
|
+
proxyUrl: Constants.EMPTY_STRING
|
|
20
22
|
};
|
|
21
23
|
var DEFAULT_LOGGER_IMPLEMENTATION = {
|
|
22
24
|
loggerCallback: function () {
|
|
@@ -24,7 +26,7 @@ var DEFAULT_LOGGER_IMPLEMENTATION = {
|
|
|
24
26
|
},
|
|
25
27
|
piiLoggingEnabled: false,
|
|
26
28
|
logLevel: LogLevel.Info,
|
|
27
|
-
correlationId:
|
|
29
|
+
correlationId: Constants.EMPTY_STRING
|
|
28
30
|
};
|
|
29
31
|
var DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
30
32
|
sendGetRequestAsync: function () {
|
|
@@ -49,13 +51,23 @@ var DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
|
49
51
|
var DEFAULT_LIBRARY_INFO = {
|
|
50
52
|
sku: Constants.SKU,
|
|
51
53
|
version: version,
|
|
52
|
-
cpu:
|
|
53
|
-
os:
|
|
54
|
+
cpu: Constants.EMPTY_STRING,
|
|
55
|
+
os: Constants.EMPTY_STRING
|
|
54
56
|
};
|
|
55
57
|
var DEFAULT_CLIENT_CREDENTIALS = {
|
|
56
|
-
clientSecret:
|
|
58
|
+
clientSecret: Constants.EMPTY_STRING,
|
|
57
59
|
clientAssertion: undefined
|
|
58
60
|
};
|
|
61
|
+
var DEFAULT_AZURE_CLOUD_OPTIONS = {
|
|
62
|
+
azureCloudInstance: AzureCloudInstance.None,
|
|
63
|
+
tenant: "" + Constants.DEFAULT_COMMON_TENANT
|
|
64
|
+
};
|
|
65
|
+
var DEFAULT_TELEMETRY_OPTIONS = {
|
|
66
|
+
application: {
|
|
67
|
+
appName: "",
|
|
68
|
+
appVersion: ""
|
|
69
|
+
}
|
|
70
|
+
};
|
|
59
71
|
/**
|
|
60
72
|
* Function that sets the default options when not explicitly configured from app developer
|
|
61
73
|
*
|
|
@@ -64,7 +76,7 @@ var DEFAULT_CLIENT_CREDENTIALS = {
|
|
|
64
76
|
* @returns Configuration
|
|
65
77
|
*/
|
|
66
78
|
function buildClientConfiguration(_a) {
|
|
67
|
-
var userAuthOptions = _a.authOptions, userSystemOptions = _a.systemOptions, userLoggerOption = _a.loggerOptions, storageImplementation = _a.storageInterface, networkImplementation = _a.networkInterface, cryptoImplementation = _a.cryptoInterface, clientCredentials = _a.clientCredentials, libraryInfo = _a.libraryInfo, serverTelemetryManager = _a.serverTelemetryManager, persistencePlugin = _a.persistencePlugin, serializableCache = _a.serializableCache;
|
|
79
|
+
var userAuthOptions = _a.authOptions, userSystemOptions = _a.systemOptions, userLoggerOption = _a.loggerOptions, storageImplementation = _a.storageInterface, networkImplementation = _a.networkInterface, cryptoImplementation = _a.cryptoInterface, clientCredentials = _a.clientCredentials, libraryInfo = _a.libraryInfo, telemetry = _a.telemetry, serverTelemetryManager = _a.serverTelemetryManager, persistencePlugin = _a.persistencePlugin, serializableCache = _a.serializableCache;
|
|
68
80
|
var loggerOptions = __assign(__assign({}, DEFAULT_LOGGER_IMPLEMENTATION), userLoggerOption);
|
|
69
81
|
return {
|
|
70
82
|
authOptions: buildAuthOptions(userAuthOptions),
|
|
@@ -75,6 +87,7 @@ function buildClientConfiguration(_a) {
|
|
|
75
87
|
cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
|
|
76
88
|
clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
|
|
77
89
|
libraryInfo: __assign(__assign({}, DEFAULT_LIBRARY_INFO), libraryInfo),
|
|
90
|
+
telemetry: __assign(__assign({}, DEFAULT_TELEMETRY_OPTIONS), telemetry),
|
|
78
91
|
serverTelemetryManager: serverTelemetryManager || null,
|
|
79
92
|
persistencePlugin: persistencePlugin || null,
|
|
80
93
|
serializableCache: serializableCache || null
|
|
@@ -85,7 +98,7 @@ function buildClientConfiguration(_a) {
|
|
|
85
98
|
* @param authOptions
|
|
86
99
|
*/
|
|
87
100
|
function buildAuthOptions(authOptions) {
|
|
88
|
-
return __assign({ clientCapabilities: [] }, authOptions);
|
|
101
|
+
return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS }, authOptions);
|
|
89
102
|
}
|
|
90
103
|
|
|
91
104
|
export { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientConfiguration.js","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule } from \"../network/INetworkModule\";\nimport { DEFAULT_CRYPTO_IMPLEMENTATION, ICrypto } from \"../crypto/ICrypto\";\nimport { AuthError } from \"../error/AuthError\";\nimport { ILoggerCallback, LogLevel } from \"../logger/Logger\";\nimport { Constants } from \"../utils/Constants\";\nimport { version } from \"../packageMetadata\";\nimport { Authority } from \"../authority/Authority\";\nimport { CacheManager, DefaultStorageClass } from \"../cache/CacheManager\";\nimport { ServerTelemetryManager } from \"../telemetry/server/ServerTelemetryManager\";\nimport { ICachePlugin } from \"../cache/interface/ICachePlugin\";\nimport { ISerializableTokenCache } from \"../cache/interface/ISerializableTokenCache\";\n\n// Token renewal offset default in seconds\nconst DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;\n\n/**\n * Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL.\n *\n * This object allows you to configure important elements of MSAL functionality:\n * - authOptions - Authentication for application\n * - cryptoInterface - Implementation of crypto functions\n * - libraryInfo - Library metadata\n * - loggerOptions - Logging for application\n * - networkInterface - Network implementation\n * - storageInterface - Storage implementation\n * - systemOptions - Additional library options\n * - clientCredentials - Credentials options for confidential clients\n */\nexport type ClientConfiguration = {\n authOptions: AuthOptions,\n systemOptions?: SystemOptions,\n loggerOptions?: LoggerOptions,\n storageInterface?: CacheManager,\n networkInterface?: INetworkModule,\n cryptoInterface?: ICrypto,\n clientCredentials?: ClientCredentials,\n libraryInfo?: LibraryInfo\n serverTelemetryManager?: ServerTelemetryManager | null,\n persistencePlugin?: ICachePlugin | null,\n serializableCache?: ISerializableTokenCache | null\n};\n\nexport type CommonClientConfiguration = {\n authOptions: Required<AuthOptions>,\n systemOptions: Required<SystemOptions>,\n loggerOptions : Required<LoggerOptions>,\n storageInterface: CacheManager,\n networkInterface : INetworkModule,\n cryptoInterface : Required<ICrypto>,\n libraryInfo : LibraryInfo,\n serverTelemetryManager: ServerTelemetryManager | null,\n clientCredentials: ClientCredentials,\n persistencePlugin: ICachePlugin | null,\n serializableCache: ISerializableTokenCache | null\n};\n\n/**\n * Use this to configure the auth options in the ClientConfiguration object\n *\n * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\n * - authority - You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\n * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.\n * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.\n * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\n * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\n */\nexport type AuthOptions = {\n clientId: string;\n authority: Authority;\n clientCapabilities?: Array<string>;\n};\n\n/**\n * Use this to configure token renewal info in the Configuration object\n *\n * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry\n */\nexport type SystemOptions = {\n tokenRenewalOffsetSeconds?: number;\n preventCorsPreflight?: boolean;\n};\n\n/**\n * Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object\n *\n * - loggerCallback - Callback for logger\n * - piiLoggingEnabled - Sets whether pii logging is enabled\n * - logLevel - Sets the level at which logging happens\n * - correlationId - Sets the correlationId printed by the logger\n */\nexport type LoggerOptions = {\n loggerCallback?: ILoggerCallback,\n piiLoggingEnabled?: boolean,\n logLevel?: LogLevel,\n correlationId?: string\n};\n\n/**\n * Library-specific options\n */\nexport type LibraryInfo = {\n sku: string,\n version: string,\n cpu: string,\n os: string\n};\n\n/**\n * Credentials for confidential clients\n */\nexport type ClientCredentials = {\n clientSecret?: string,\n clientAssertion? : {\n assertion: string,\n assertionType: string\n };\n};\n\nexport const DEFAULT_SYSTEM_OPTIONS: Required<SystemOptions> = {\n tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,\n preventCorsPreflight: false\n};\n\nconst DEFAULT_LOGGER_IMPLEMENTATION: Required<LoggerOptions> = {\n loggerCallback: () => {\n // allow users to not set loggerCallback\n },\n piiLoggingEnabled: false,\n logLevel: LogLevel.Info,\n correlationId: \"\"\n};\n\nconst DEFAULT_NETWORK_IMPLEMENTATION: INetworkModule = {\n async sendGetRequestAsync<T>(): Promise<T> {\n const notImplErr = \"Network interface - sendGetRequestAsync() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async sendPostRequestAsync<T>(): Promise<T> {\n const notImplErr = \"Network interface - sendPostRequestAsync() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n};\n\nconst DEFAULT_LIBRARY_INFO: LibraryInfo = {\n sku: Constants.SKU,\n version: version,\n cpu: \"\",\n os: \"\"\n};\n\nconst DEFAULT_CLIENT_CREDENTIALS: ClientCredentials = {\n clientSecret: \"\",\n clientAssertion: undefined\n};\n\n/**\n * Function that sets the default options when not explicitly configured from app developer\n *\n * @param Configuration\n *\n * @returns Configuration\n */\nexport function buildClientConfiguration(\n {\n authOptions: userAuthOptions,\n systemOptions: userSystemOptions,\n loggerOptions: userLoggerOption,\n storageInterface: storageImplementation,\n networkInterface: networkImplementation,\n cryptoInterface: cryptoImplementation,\n clientCredentials: clientCredentials,\n libraryInfo: libraryInfo,\n serverTelemetryManager: serverTelemetryManager,\n persistencePlugin: persistencePlugin,\n serializableCache: serializableCache\n }: ClientConfiguration): CommonClientConfiguration {\n \n const loggerOptions = { ...DEFAULT_LOGGER_IMPLEMENTATION, ...userLoggerOption };\n \n return {\n authOptions: buildAuthOptions(userAuthOptions),\n systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },\n loggerOptions: loggerOptions,\n storageInterface: storageImplementation || new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION),\n networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,\n cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,\n clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,\n libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },\n serverTelemetryManager: serverTelemetryManager || null,\n persistencePlugin: persistencePlugin || null,\n serializableCache: serializableCache || null\n };\n}\n\n/**\n * Construct authoptions from the client and platform passed values\n * @param authOptions\n */\nfunction buildAuthOptions(authOptions: AuthOptions): Required<AuthOptions> {\n return {\n clientCapabilities: [],\n ...authOptions\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;AAiBA;AACA,IAAM,gCAAgC,GAAG,GAAG,CAAC;IAyGhC,sBAAsB,GAA4B;IAC3D,yBAAyB,EAAE,gCAAgC;IAC3D,oBAAoB,EAAE,KAAK;EAC7B;AAEF,IAAM,6BAA6B,GAA4B;IAC3D,cAAc,EAAE;;KAEf;IACD,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,QAAQ,CAAC,IAAI;IACvB,aAAa,EAAE,EAAE;CACpB,CAAC;AAEF,IAAM,8BAA8B,GAAmB;IAC7C,mBAAmB,EAAzB;;;;gBACU,UAAU,GAAG,oEAAoE,CAAC;gBACxF,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;;;KACrD;IACK,oBAAoB,EAA1B;;;;gBACU,UAAU,GAAG,qEAAqE,CAAC;gBACzF,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;;;KACrD;CACJ,CAAC;AAEF,IAAM,oBAAoB,GAAgB;IACtC,GAAG,EAAE,SAAS,CAAC,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,GAAG,EAAE,EAAE;IACP,EAAE,EAAE,EAAE;CACT,CAAC;AAEF,IAAM,0BAA0B,GAAsB;IAClD,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,SAAS;CAC7B,CAAC;AAEF;;;;;;;SAOgB,wBAAwB,CACpC,EAYsB;QAXL,eAAe,iBAAA,EACb,iBAAiB,mBAAA,EACjB,gBAAgB,mBAAA,EACb,qBAAqB,sBAAA,EACrB,qBAAqB,sBAAA,EACtB,oBAAoB,qBAAA,EAClB,iBAAiB,uBAAA,EACvB,WAAW,iBAAA,EACA,sBAAsB,4BAAA,EAC3B,iBAAiB,uBAAA,EACjB,iBAAiB,uBAAA;IAGxC,IAAM,aAAa,yBAAQ,6BAA6B,GAAK,gBAAgB,CAAE,CAAC;IAEhF,OAAO;QACH,WAAW,EAAE,gBAAgB,CAAC,eAAe,CAAC;QAC9C,aAAa,wBAAO,sBAAsB,GAAK,iBAAiB,CAAE;QAClE,aAAa,EAAE,aAAa;QAC5B,gBAAgB,EAAE,qBAAqB,IAAI,IAAI,mBAAmB,CAAC,eAAe,CAAC,QAAQ,EAAE,6BAA6B,CAAC;QAC3H,gBAAgB,EAAE,qBAAqB,IAAI,8BAA8B;QACzE,eAAe,EAAE,oBAAoB,IAAI,6BAA6B;QACtE,iBAAiB,EAAE,iBAAiB,IAAI,0BAA0B;QAClE,WAAW,wBAAO,oBAAoB,GAAK,WAAW,CAAE;QACxD,sBAAsB,EAAE,sBAAsB,IAAI,IAAI;QACtD,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;QAC5C,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;KAC/C,CAAC;AACN,CAAC;AAED;;;;AAIA,SAAS,gBAAgB,CAAC,WAAwB;IAC9C,kBACI,kBAAkB,EAAE,EAAE,IACnB,WAAW,EAChB;AACN;;;;"}
|
|
1
|
+
{"version":3,"file":"ClientConfiguration.js","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule } from \"../network/INetworkModule\";\nimport { DEFAULT_CRYPTO_IMPLEMENTATION, ICrypto } from \"../crypto/ICrypto\";\nimport { AuthError } from \"../error/AuthError\";\nimport { ILoggerCallback, LogLevel } from \"../logger/Logger\";\nimport { Constants } from \"../utils/Constants\";\nimport { version } from \"../packageMetadata\";\nimport { Authority } from \"../authority/Authority\";\nimport { AzureCloudInstance } from \"../authority/AuthorityOptions\";\nimport { CacheManager, DefaultStorageClass } from \"../cache/CacheManager\";\nimport { ServerTelemetryManager } from \"../telemetry/server/ServerTelemetryManager\";\nimport { ICachePlugin } from \"../cache/interface/ICachePlugin\";\nimport { ISerializableTokenCache } from \"../cache/interface/ISerializableTokenCache\";\n\n// Token renewal offset default in seconds\nconst DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;\n\n/**\n * Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL.\n *\n * This object allows you to configure important elements of MSAL functionality:\n * - authOptions - Authentication for application\n * - cryptoInterface - Implementation of crypto functions\n * - libraryInfo - Library metadata\n * - telemetry - Telemetry options and data\n * - loggerOptions - Logging for application\n * - networkInterface - Network implementation\n * - storageInterface - Storage implementation\n * - systemOptions - Additional library options\n * - clientCredentials - Credentials options for confidential clients\n */\nexport type ClientConfiguration = {\n authOptions: AuthOptions,\n systemOptions?: SystemOptions,\n loggerOptions?: LoggerOptions,\n storageInterface?: CacheManager,\n networkInterface?: INetworkModule,\n cryptoInterface?: ICrypto,\n clientCredentials?: ClientCredentials,\n libraryInfo?: LibraryInfo\n telemetry?: TelemetryOptions,\n serverTelemetryManager?: ServerTelemetryManager | null,\n persistencePlugin?: ICachePlugin | null,\n serializableCache?: ISerializableTokenCache | null\n};\n\nexport type CommonClientConfiguration = {\n authOptions: Required<AuthOptions>,\n systemOptions: Required<SystemOptions>,\n loggerOptions : Required<LoggerOptions>,\n storageInterface: CacheManager,\n networkInterface : INetworkModule,\n cryptoInterface : Required<ICrypto>,\n libraryInfo : LibraryInfo,\n telemetry: Required<TelemetryOptions>,\n serverTelemetryManager: ServerTelemetryManager | null,\n clientCredentials: ClientCredentials,\n persistencePlugin: ICachePlugin | null,\n serializableCache: ISerializableTokenCache | null\n};\n\n/**\n * Use this to configure the auth options in the ClientConfiguration object\n *\n * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\n * - authority - You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\n * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.\n * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.\n * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\n * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\n */\nexport type AuthOptions = {\n clientId: string;\n authority: Authority;\n clientCapabilities?: Array<string>;\n azureCloudOptions?: AzureCloudOptions;\n};\n\n/**\n * Use this to configure token renewal info in the Configuration object\n *\n * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry\n */\nexport type SystemOptions = {\n tokenRenewalOffsetSeconds?: number;\n preventCorsPreflight?: boolean;\n proxyUrl?: string;\n};\n\n/**\n * Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object\n *\n * - loggerCallback - Callback for logger\n * - piiLoggingEnabled - Sets whether pii logging is enabled\n * - logLevel - Sets the level at which logging happens\n * - correlationId - Sets the correlationId printed by the logger\n */\nexport type LoggerOptions = {\n loggerCallback?: ILoggerCallback,\n piiLoggingEnabled?: boolean,\n logLevel?: LogLevel,\n correlationId?: string\n};\n\n/**\n * Library-specific options\n */\nexport type LibraryInfo = {\n sku: string,\n version: string,\n cpu: string,\n os: string\n};\n\n/**\n * Credentials for confidential clients\n */\nexport type ClientCredentials = {\n clientSecret?: string,\n clientAssertion? : {\n assertion: string,\n assertionType: string\n };\n};\n\n/**\n * AzureCloudInstance specific options\n *\n * - azureCloudInstance - string enum providing short notation for soverign and public cloud authorities\n * - tenant - provision to provide the tenant info\n */\nexport type AzureCloudOptions = {\n azureCloudInstance: AzureCloudInstance;\n tenant?: string,\n};\n\nexport type TelemetryOptions = {\n application: ApplicationTelemetry;\n};\n\n/**\n * Telemetry information sent on request\n * - appName: Unique string name of an application\n * - appVersion: Version of the application using MSAL\n */\nexport type ApplicationTelemetry = {\n appName: string;\n appVersion: string;\n};\n\nexport const DEFAULT_SYSTEM_OPTIONS: Required<SystemOptions> = {\n tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,\n preventCorsPreflight: false,\n proxyUrl: Constants.EMPTY_STRING\n};\n\nconst DEFAULT_LOGGER_IMPLEMENTATION: Required<LoggerOptions> = {\n loggerCallback: () => {\n // allow users to not set loggerCallback\n },\n piiLoggingEnabled: false,\n logLevel: LogLevel.Info,\n correlationId: Constants.EMPTY_STRING\n};\n\nconst DEFAULT_NETWORK_IMPLEMENTATION: INetworkModule = {\n async sendGetRequestAsync<T>(): Promise<T> {\n const notImplErr = \"Network interface - sendGetRequestAsync() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async sendPostRequestAsync<T>(): Promise<T> {\n const notImplErr = \"Network interface - sendPostRequestAsync() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n }\n};\n\nconst DEFAULT_LIBRARY_INFO: LibraryInfo = {\n sku: Constants.SKU,\n version: version,\n cpu: Constants.EMPTY_STRING,\n os: Constants.EMPTY_STRING\n};\n\nconst DEFAULT_CLIENT_CREDENTIALS: ClientCredentials = {\n clientSecret: Constants.EMPTY_STRING,\n clientAssertion: undefined\n};\n\nconst DEFAULT_AZURE_CLOUD_OPTIONS: AzureCloudOptions = {\n azureCloudInstance: AzureCloudInstance.None,\n tenant: `${Constants.DEFAULT_COMMON_TENANT}`\n};\n\nconst DEFAULT_TELEMETRY_OPTIONS: Required<TelemetryOptions> = {\n application: {\n appName: \"\",\n appVersion: \"\"\n }\n};\n\n/**\n * Function that sets the default options when not explicitly configured from app developer\n *\n * @param Configuration\n *\n * @returns Configuration\n */\nexport function buildClientConfiguration(\n {\n authOptions: userAuthOptions,\n systemOptions: userSystemOptions,\n loggerOptions: userLoggerOption,\n storageInterface: storageImplementation,\n networkInterface: networkImplementation,\n cryptoInterface: cryptoImplementation,\n clientCredentials: clientCredentials,\n libraryInfo: libraryInfo,\n telemetry: telemetry,\n serverTelemetryManager: serverTelemetryManager,\n persistencePlugin: persistencePlugin,\n serializableCache: serializableCache\n }: ClientConfiguration): CommonClientConfiguration {\n\n const loggerOptions = { ...DEFAULT_LOGGER_IMPLEMENTATION, ...userLoggerOption };\n\n return {\n authOptions: buildAuthOptions(userAuthOptions),\n systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },\n loggerOptions: loggerOptions,\n storageInterface: storageImplementation || new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION),\n networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,\n cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,\n clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,\n libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },\n telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },\n serverTelemetryManager: serverTelemetryManager || null,\n persistencePlugin: persistencePlugin || null,\n serializableCache: serializableCache || null\n };\n}\n\n/**\n * Construct authoptions from the client and platform passed values\n * @param authOptions\n */\nfunction buildAuthOptions(authOptions: AuthOptions): Required<AuthOptions> {\n return {\n clientCapabilities: [],\n azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,\n ...authOptions\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;AAkBA;AACA,IAAM,gCAAgC,GAAG,GAAG,CAAC;IAuIhC,sBAAsB,GAA4B;IAC3D,yBAAyB,EAAE,gCAAgC;IAC3D,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,SAAS,CAAC,YAAY;EAClC;AAEF,IAAM,6BAA6B,GAA4B;IAC3D,cAAc,EAAE;;KAEf;IACD,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,QAAQ,CAAC,IAAI;IACvB,aAAa,EAAE,SAAS,CAAC,YAAY;CACxC,CAAC;AAEF,IAAM,8BAA8B,GAAmB;IAC7C,mBAAmB,EAAzB;;;;gBACU,UAAU,GAAG,oEAAoE,CAAC;gBACxF,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;;;K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AC3H,gBAAgB,EAAE,qBAAqB,IAAI,8BAA8B;QACzE,eAAe,EAAE,oBAAoB,IAAI,6BAA6B;QACtE,iBAAiB,EAAE,iBAAiB,IAAI,0BAA0B;QAClE,WAAW,wBAAO,oBAAoB,GAAK,WAAW,CAAE;QACxD,SAAS,wBAAO,yBAAyB,GAAK,SAAS,CAAE;QACzD,sBAAsB,EAAE,sBAAsB,IAAI,IAAI;QACtD,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;QAC5C,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;KAC/C,CAAC;AACN,CAAC;AAED;;;;AAIA,SAAS,gBAAgB,CAAC,WAAwB;IAC9C,kBACI,kBAAkB,EAAE,EAAE,EACtB,iBAAiB,EAAE,2BAA2B,IAC3C,WAAW,EAChB;AACN;;;;"}
|
package/dist/crypto/ICrypto.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export declare type PkceCodes = {
|
|
|
9
9
|
verifier: string;
|
|
10
10
|
challenge: string;
|
|
11
11
|
};
|
|
12
|
-
export declare type SignedHttpRequestParameters = Pick<BaseAuthRequest, "resourceRequestMethod" | "resourceRequestUri" | "shrClaims" | "shrNonce"
|
|
12
|
+
export declare type SignedHttpRequestParameters = Pick<BaseAuthRequest, "resourceRequestMethod" | "resourceRequestUri" | "shrClaims" | "shrNonce"> & {
|
|
13
|
+
correlationId?: string;
|
|
14
|
+
};
|
|
13
15
|
/**
|
|
14
16
|
* Interface for crypto functions used by library
|
|
15
17
|
*/
|
|
@@ -50,7 +52,12 @@ export interface ICrypto {
|
|
|
50
52
|
* Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.
|
|
51
53
|
* @param accessToken
|
|
52
54
|
*/
|
|
53
|
-
signJwt(payload: SignedHttpRequest, kid: string): Promise<string>;
|
|
55
|
+
signJwt(payload: SignedHttpRequest, kid: string, correlationId?: string): Promise<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Returns the SHA-256 hash of an input string
|
|
58
|
+
* @param plainText
|
|
59
|
+
*/
|
|
60
|
+
hashString(plainText: string): Promise<string>;
|
|
54
61
|
}
|
|
55
62
|
export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto;
|
|
56
63
|
//# sourceMappingURL=ICrypto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;GAIG;AACH,oBAAY,SAAS,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAA;CACpB,CAAC;AAEF,oBAAY,2BAA2B,GAAG,IAAI,CAAC,eAAe,EAAE,uBAAuB,GAAG,oBAAoB,GAAG,WAAW,GAAG,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;GAIG;AACH,oBAAY,SAAS,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAA;CACpB,CAAC;AAEF,oBAAY,2BAA2B,GAAG,IAAI,CAAC,eAAe,EAAE,uBAAuB,GAAG,oBAAoB,GAAG,WAAW,GAAG,UAAU,CAAE,GAAG;IAC1I,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC;;;OAGG;IACH,sBAAsB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9E;;;OAGG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1F;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,6BAA6B,EAAE,OAqC3C,CAAC"}
|
package/dist/crypto/ICrypto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v6.2.0 2022-04-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __awaiter, __generator } from '../_virtual/_tslib.js';
|
|
4
4
|
import { AuthError } from '../error/AuthError.js';
|
|
@@ -64,6 +64,15 @@ var DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
64
64
|
throw AuthError.createUnexpectedError(notImplErr);
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
+
},
|
|
68
|
+
hashString: function () {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var notImplErr;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
notImplErr = "Crypto interface - hashString() has not been implemented";
|
|
73
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
67
76
|
}
|
|
68
77
|
};
|
|
69
78
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICrypto.js","sources":["../../src/crypto/ICrypto.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"../error/AuthError\";\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\nimport { SignedHttpRequest } from \"./SignedHttpRequest\";\n\n/**\n * The PkceCodes type describes the structure\n * of objects that contain PKCE code\n * challenge and verifier pairs\n */\nexport type PkceCodes = {\n verifier: string,\n challenge: string\n};\n\nexport type SignedHttpRequestParameters = Pick<BaseAuthRequest, \"resourceRequestMethod\" | \"resourceRequestUri\" | \"shrClaims\" | \"shrNonce\"
|
|
1
|
+
{"version":3,"file":"ICrypto.js","sources":["../../src/crypto/ICrypto.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"../error/AuthError\";\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\nimport { SignedHttpRequest } from \"./SignedHttpRequest\";\n\n/**\n * The PkceCodes type describes the structure\n * of objects that contain PKCE code\n * challenge and verifier pairs\n */\nexport type PkceCodes = {\n verifier: string,\n challenge: string\n};\n\nexport type SignedHttpRequestParameters = Pick<BaseAuthRequest, \"resourceRequestMethod\" | \"resourceRequestUri\" | \"shrClaims\" | \"shrNonce\" > & {\n correlationId?: string\n};\n\n/**\n * Interface for crypto functions used by library\n */\nexport interface ICrypto {\n /**\n * Creates a guid randomly.\n */\n createNewGuid(): string;\n /**\n * base64 Encode string\n * @param input \n */\n base64Encode(input: string): string;\n /**\n * base64 decode string\n * @param input \n */\n base64Decode(input: string): string;\n /**\n * Generate PKCE codes for OAuth. See RFC here: https://tools.ietf.org/html/rfc7636\n */\n generatePkceCodes(): Promise<PkceCodes>;\n /**\n * Generates an JWK RSA S256 Thumbprint\n * @param request\n */\n getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>;\n /**\n * Removes cryptographic keypair from key store matching the keyId passed in\n * @param kid \n */\n removeTokenBindingKey(kid: string): Promise<boolean>;\n /**\n * Removes all cryptographic keys from IndexedDB storage\n */\n clearKeystore(): Promise<boolean>;\n /** \n * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.\n * @param accessToken \n */\n signJwt(payload: SignedHttpRequest, kid: string, correlationId?: string): Promise<string>;\n /**\n * Returns the SHA-256 hash of an input string\n * @param plainText\n */\n hashString(plainText: string): Promise<string>;\n}\n\nexport const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto = {\n createNewGuid: (): string => {\n const notImplErr = \"Crypto interface - createNewGuid() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n base64Decode: (): string => {\n const notImplErr = \"Crypto interface - base64Decode() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n base64Encode: (): string => {\n const notImplErr = \"Crypto interface - base64Encode() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async generatePkceCodes(): Promise<PkceCodes> {\n const notImplErr = \"Crypto interface - generatePkceCodes() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async getPublicKeyThumbprint(): Promise<string> {\n const notImplErr = \"Crypto interface - getPublicKeyThumbprint() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async removeTokenBindingKey(): Promise<boolean> {\n const notImplErr = \"Crypto interface - removeTokenBindingKey() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async clearKeystore(): Promise<boolean> {\n const notImplErr = \"Crypto interface - clearKeystore() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async signJwt(): Promise<string> {\n const notImplErr = \"Crypto interface - signJwt() has not been implemented\";\n throw AuthError.createUnexpectedError(notImplErr);\n },\n async hashString(): Promise<string> {\n const notImplErr = \"Crypto interface - hashString() has not been implemented\";\n throw A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ator.d.ts","sourceRoot":"","sources":["../../src/crypto/IGuidGenerator.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC3B,YAAY,IAAI,MAAM,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v6.2.0 2022-04-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
|
|
4
4
|
import { AuthToken } from '../account/AuthToken.js';
|
|
@@ -70,7 +70,7 @@ var PopTokenGenerator = /** @class */ (function () {
|
|
|
70
70
|
resourceRequestMethod = request.resourceRequestMethod, resourceRequestUri = request.resourceRequestUri, shrClaims = request.shrClaims, shrNonce = request.shrNonce;
|
|
71
71
|
resourceUrlString = (resourceRequestUri) ? new UrlString(resourceRequestUri) : undefined;
|
|
72
72
|
resourceUrlComponents = resourceUrlString === null || resourceUrlString === void 0 ? void 0 : resourceUrlString.getUrlComponents();
|
|
73
|
-
return [4 /*yield*/, this.cryptoUtils.signJwt(__assign({ at: payload, ts: TimeUtils.nowSeconds(), m: resourceRequestMethod === null || resourceRequestMethod === void 0 ? void 0 : resourceRequestMethod.toUpperCase(), u: resourceUrlComponents === null || resourceUrlComponents === void 0 ? void 0 : resourceUrlComponents.HostNameAndPort, nonce: shrNonce || this.cryptoUtils.createNewGuid(), p: resourceUrlComponents === null || resourceUrlComponents === void 0 ? void 0 : resourceUrlComponents.AbsolutePath, q: (resourceUrlComponents === null || resourceUrlComponents === void 0 ? void 0 : resourceUrlComponents.QueryString) ? [[], resourceUrlComponents.QueryString] : undefined, client_claims: shrClaims || undefined }, claims), kid)];
|
|
73
|
+
return [4 /*yield*/, this.cryptoUtils.signJwt(__assign({ at: payload, ts: TimeUtils.nowSeconds(), m: resourceRequestMethod === null || resourceRequestMethod === void 0 ? void 0 : resourceRequestMethod.toUpperCase(), u: resourceUrlComponents === null || resourceUrlComponents === void 0 ? void 0 : resourceUrlComponents.HostNameAndPort, nonce: shrNonce || this.cryptoUtils.createNewGuid(), p: resourceUrlComponents === null || resourceUrlComponents === void 0 ? void 0 : resourceUrlComponents.AbsolutePath, q: (resourceUrlComponents === null || resourceUrlComponents === void 0 ? void 0 : resourceUrlComponents.QueryString) ? [[], resourceUrlComponents.QueryString] : undefined, client_claims: shrClaims || undefined }, claims), kid, request.correlationId)];
|
|
74
74
|
case 1: return [2 /*return*/, _a.sent()];
|
|
75
75
|
}
|
|
76
76
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopTokenGenerator.js","sources":["../../src/crypto/PopTokenGenerator.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, SignedHttpRequestParameters } from \"./ICrypto\";\nimport { AuthToken } from \"../account/AuthToken\";\nimport { TokenClaims } from \"../account/TokenClaims\";\nimport { TimeUtils } from \"../utils/TimeUtils\";\nimport { UrlString } from \"../url/UrlString\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\n\n/**\n * See eSTS docs for more info.\n * - A kid element, with the value containing an RFC 7638-compliant JWK thumbprint that is base64 encoded.\n * - xms_ksl element, representing the storage location of the key's secret component on the client device. One of two values:\n * - sw: software storage\n * - uhw: hardware storage\n */\ntype ReqCnf = {\n kid: string;\n xms_ksl: KeyLocation;\n};\n\nenum KeyLocation {\n SW = \"sw\",\n UHW = \"uhw\"\n}\n\nexport class PopTokenGenerator {\n\n private cryptoUtils: ICrypto;\n\n constructor(cryptoUtils: ICrypto) {\n this.cryptoUtils = cryptoUtils;\n }\n\n async generateCnf(request: SignedHttpRequestParameters): Promise<string> {\n const reqCnf = await this.generateKid(request);\n return this.cryptoUtils.base64Encode(JSON.stringify(reqCnf));\n }\n\n async generateKid(request: SignedHttpRequestParameters): Promise<ReqCnf> {\n const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request);\n\n return {\n kid: kidThumbprint,\n xms_ksl: KeyLocation.SW\n };\n }\n\n async signPopToken(accessToken: string, request: SignedHttpRequestParameters): Promise<string> {\n const tokenClaims: TokenClaims | null = AuthToken.extractTokenClaims(accessToken, this.cryptoUtils);\n if (!tokenClaims?.cnf?.kid) {\n throw ClientAuthError.createTokenClaimsRequiredError();\n }\n \n return this.signPayload(accessToken, tokenClaims.cnf.kid, request);\n }\n\n async signPayload(payload: string, kid: string, request: SignedHttpRequestParameters, claims?: object): Promise<string> {\n // Deconstruct request to extract SHR parameters\n const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce } = request;\n\n const resourceUrlString = (resourceRequestUri) ? new UrlString(resourceRequestUri) : undefined;\n const resourceUrlComponents = resourceUrlString?.getUrlComponents();\n\n return await this.cryptoUtils.signJwt({\n at: payload,\n ts: TimeUtils.nowSeconds(),\n m: resourceRequestMethod?.toUpperCase(),\n u: resourceUrlComponents?.HostNameAndPort,\n nonce: shrNonce || this.cryptoUtils.createNewGuid(),\n p: resourceUrlComponents?.AbsolutePath,\n q: (resourceUrlComponents?.QueryString) ? [[], resourceUrlComponents.QueryString] : undefined,\n client_claims: shrClaims || undefined,\n ...claims\n }, kid);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;AAwBA,IAAK,WAGJ;AAHD,WAAK,WAAW;IACZ,wBAAS,CAAA;IACT,0BAAW,CAAA;AACf,CAAC,EAHI,WAAW,KAAX,WAAW,QAGf;;IAMG,2BAAY,WAAoB;QAC5B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;KAClC;IAEK,uCAAW,GAAjB,UAAkB,OAAoC;;;;;4BACnC,qBAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAA;;wBAAxC,MAAM,GAAG,SAA+B;wBAC9C,sBAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAC;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rC,CAAC,EAAE,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,eAAe,EACzC,KAAK,EAAE,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,EACnD,CAAC,EAAE,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,YAAY,EACtC,CAAC,EAAE,CAAC,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,WAAW,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,WAAW,CAAC,GAAG,SAAS,EAC7F,aAAa,EAAE,SAAS,IAAI,SAAS,IAClC,MAAM,GACV,GAAG,CAAC,EAAA;
|
|
1
|
+
{"version":3,"file":"PopTokenGenerator.js","sources":["../../src/crypto/PopTokenGenerator.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, SignedHttpRequestParameters } from \"./ICrypto\";\nimport { AuthToken } from \"../account/AuthToken\";\nimport { TokenClaims } from \"../account/TokenClaims\";\nimport { TimeUtils } from \"../utils/TimeUtils\";\nimport { UrlString } from \"../url/UrlString\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\n\n/**\n * See eSTS docs for more info.\n * - A kid element, with the value containing an RFC 7638-compliant JWK thumbprint that is base64 encoded.\n * - xms_ksl element, representing the storage location of the key's secret component on the client device. One of two values:\n * - sw: software storage\n * - uhw: hardware storage\n */\ntype ReqCnf = {\n kid: string;\n xms_ksl: KeyLocation;\n};\n\nenum KeyLocation {\n SW = \"sw\",\n UHW = \"uhw\"\n}\n\nexport class PopTokenGenerator {\n\n private cryptoUtils: ICrypto;\n\n constructor(cryptoUtils: ICrypto) {\n this.cryptoUtils = cryptoUtils;\n }\n\n async generateCnf(request: SignedHttpRequestParameters): Promise<string> {\n const reqCnf = await this.generateKid(request);\n return this.cryptoUtils.base64Encode(JSON.stringify(reqCnf));\n }\n\n async generateKid(request: SignedHttpRequestParameters): Promise<ReqCnf> {\n const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request);\n\n return {\n kid: kidThumbprint,\n xms_ksl: KeyLocation.SW\n };\n }\n\n async signPopToken(accessToken: string, request: SignedHttpRequestParameters): Promise<string> {\n const tokenClaims: TokenClaims | null = AuthToken.extractTokenClaims(accessToken, this.cryptoUtils);\n if (!tokenClaims?.cnf?.kid) {\n throw ClientAuthError.createTokenClaimsRequiredError();\n }\n \n return this.signPayload(accessToken, tokenClaims.cnf.kid, request);\n }\n\n async signPayload(payload: string, kid: string, request: SignedHttpRequestParameters, claims?: object): Promise<string> {\n // Deconstruct request to extract SHR parameters\n const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce } = request;\n\n const resourceUrlString = (resourceRequestUri) ? new UrlString(resourceRequestUri) : undefined;\n const resourceUrlComponents = resourceUrlString?.getUrlComponents();\n\n return await this.cryptoUtils.signJwt({\n at: payload,\n ts: TimeUtils.nowSeconds(),\n m: resourceRequestMethod?.toUpperCase(),\n u: resourceUrlComponents?.HostNameAndPort,\n nonce: shrNonce || this.cryptoUtils.createNewGuid(),\n p: resourceUrlComponents?.AbsolutePath,\n q: (resourceUrlComponents?.QueryString) ? [[], resourceUrlComponents.QueryString] : undefined,\n client_claims: shrClaims || undefined,\n ...claims\n }, kid, request.correlationId);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;AAwBA,IAAK,WAGJ;AAHD,WAAK,WAAW;IACZ,wBAAS,CAAA;IACT,0BAAW,CAAA;AACf,CAAC,EAHI,WAAW,KAAX,WAAW,QAGf;;IAMG,2BAAY,WAAoB;QAC5B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;KAClC;IAEK,uCAAW,GAAjB,UAAkB,OAAoC;;;;;4BACnC,qBAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAA;;wBAAxC,MAAM,GAAG,SAA+B;wBAC9C,sBAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS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,uBAArB,qBAAqB,CAAE,WAAW,IACrC,CAAC,EAAE,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,eAAe,EACzC,KAAK,EAAE,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,EACnD,CAAC,EAAE,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,YAAY,EACtC,CAAC,EAAE,CAAC,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,WAAW,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,WAAW,CAAC,GAAG,SAAS,EAC7F,aAAa,EAAE,SAAS,IAAI,SAAS,IAClC,MAAM,GACV,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,EAAA;4BAV9B,sBAAO,SAUuB,EAAC;;;;KAClC;IACL,wBAAC;AAAD,CAAC;;;;"}
|
package/dist/error/AuthError.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v6.2.0 2022-04-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __extends } from '../_virtual/_tslib.js';
|
|
4
4
|
import { Constants } from '../utils/Constants.js';
|
|
@@ -27,8 +27,8 @@ var AuthError = /** @class */ (function (_super) {
|
|
|
27
27
|
_this = _super.call(this, errorString) || this;
|
|
28
28
|
Object.setPrototypeOf(_this, AuthError.prototype);
|
|
29
29
|
_this.errorCode = errorCode || Constants.EMPTY_STRING;
|
|
30
|
-
_this.errorMessage = errorMessage ||
|
|
31
|
-
_this.subError = suberror ||
|
|
30
|
+
_this.errorMessage = errorMessage || Constants.EMPTY_STRING;
|
|
31
|
+
_this.subError = suberror || Constants.EMPTY_STRING;
|
|
32
32
|
_this.name = "AuthError";
|
|
33
33
|
return _this;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthError.js","sources":["../../src/error/AuthError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Constants } from \"../utils/Constants\";\n\n/**\n * AuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const AuthErrorMessage = {\n unexpectedError: {\n code: \"unexpected_error\",\n desc: \"Unexpected error in authentication.\"\n }\n};\n\n/**\n * General error class thrown by the MSAL.js library.\n */\nexport class AuthError extends Error {\n\n /**\n * Short string denoting error\n */\n errorCode: string;\n\n /**\n * Detailed description of error\n */\n errorMessage: string;\n\n /**\n * Describes the subclass of an error\n */\n subError: string;\n\n /**\n * CorrelationId associated with the error\n */\n correlationId: string;\n\n constructor(errorCode?: string, errorMessage?: string, suberror?: string) {\n const errorString = errorMessage ? `${errorCode}: ${errorMessage}` : errorCode;\n super(errorString);\n Object.setPrototypeOf(this, AuthError.prototype);\n\n this.errorCode = errorCode || Constants.EMPTY_STRING;\n this.errorMessage = errorMessage ||
|
|
1
|
+
{"version":3,"file":"AuthError.js","sources":["../../src/error/AuthError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Constants } from \"../utils/Constants\";\n\n/**\n * AuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const AuthErrorMessage = {\n unexpectedError: {\n code: \"unexpected_error\",\n desc: \"Unexpected error in authentication.\"\n }\n};\n\n/**\n * General error class thrown by the MSAL.js library.\n */\nexport class AuthError extends Error {\n\n /**\n * Short string denoting error\n */\n errorCode: string;\n\n /**\n * Detailed description of error\n */\n errorMessage: string;\n\n /**\n * Describes the subclass of an error\n */\n subError: string;\n\n /**\n * CorrelationId associated with the error\n */\n correlationId: string;\n\n constructor(errorCode?: string, errorMessage?: string, suberror?: string) {\n const errorString = errorMessage ? `${errorCode}: ${errorMessage}` : errorCode;\n super(errorString);\n Object.setPrototypeOf(this, AuthError.prototype);\n\n this.errorCode = errorCode || Constants.EMPTY_STRING;\n this.errorMessage = errorMessage || Constants.EMPTY_STRING;\n this.subError = suberror || Constants.EMPTY_STRING;\n this.name = \"AuthError\";\n }\n\n setCorrelationId(correlationId: string): void {\n this.correlationId = correlationId;\n }\n\n /**\n * Creates an error that is thrown when something unexpected happens in the library.\n * @param errDesc\n */\n static createUnexpectedError(errDesc: string): AuthError {\n return new AuthError(AuthErrorMessage.unexpectedError.code, `${AuthErrorMessage.unexpectedError.desc}: ${errDesc}`);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAOA;;;IAGa,gBAAgB,GAAG;IAC5B,eAAe,EAAE;QACb,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,qCAAqC;KAC9C;EACH;AAEF;;;;IAG+B,6BAAK;IAsBhC,mBAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB;QAAxE,iBASC;QARG,IAAM,WAAW,GAAG,YAAY,GAAM,SAAS,UAAK,YAAc,GAAG,SAAS,CAAC;QAC/E,QAAA,kBAAM,WAAW,CAAC,SAAC;QACnB,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAEjD,KAAI,CAAC,SAAS,GAAG,SAAS,IAAI,SAAS,CAAC,YAAY,CAAC;QACrD,KAAI,CAAC,YAAY,GAAG,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC;QAC3D,KAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC;QACnD,KAAI,CAAC,IAAI,GAAG,WAAW,CAAC;;KAC3B;IAED,oCAAgB,GAAhB,UAAiB,aAAqB;QAClC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACtC;;;;;IAMM,+BAAqB,GAA5B,UAA6B,OAAe;QACxC,OAAO,IAAI,SAAS,CAAC,gBAAgB,CAAC,eAAe,CAAC,IAAI,EAAK,gBAAgB,CAAC,eAAe,CAAC,IAAI,UAAK,OAAS,CAAC,CAAC;KACvH;IACL,gBAAC;AAAD,CA5CA,CAA+B,KAAK;;;;"}
|
|
@@ -75,6 +75,10 @@ export declare const ClientConfigurationErrorMessage: {
|
|
|
75
75
|
code: string;
|
|
76
76
|
desc: string;
|
|
77
77
|
};
|
|
78
|
+
invalidAzureCloudInstance: {
|
|
79
|
+
code: string;
|
|
80
|
+
desc: string;
|
|
81
|
+
};
|
|
78
82
|
missingSshJwk: {
|
|
79
83
|
code: string;
|
|
80
84
|
desc: string;
|
|
@@ -171,6 +175,13 @@ export declare class ClientConfigurationError extends ClientAuthError {
|
|
|
171
175
|
* Throws error when provided authority is not a member of the trusted host list
|
|
172
176
|
*/
|
|
173
177
|
static createUntrustedAuthorityError(): ClientConfigurationError;
|
|
178
|
+
/**
|
|
179
|
+
* Throws error when the AzureCloudInstance is set to an invalid value
|
|
180
|
+
*/
|
|
181
|
+
static createInvalidAzureCloudInstanceError(): ClientConfigurationError;
|
|
182
|
+
/**
|
|
183
|
+
* Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request
|
|
184
|
+
*/
|
|
174
185
|
static createMissingSshJwkError(): ClientConfigurationError;
|
|
175
186
|
/**
|
|
176
187
|
* Throws an error when the authentication scheme is set to SSH but the SSH public key ID is omitted from the request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientConfigurationError.d.ts","sourceRoot":"","sources":["../../src/error/ClientConfigurationError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":3,"file":"ClientConfigurationError.d.ts","sourceRoot":"","sources":["../../src/error/ClientConfigurationError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F3C,CAAC;AAEF;;GA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ACH,MAAM,CAAC,wBAAwB,IAAI,wBAAwB;IAK3D;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,wBAAwB;IAK3D;;OAEG;IACH,MAAM,CAAC,4CAA4C,IAAI,wBAAwB;IAK/E;;OAEG;IACH,MAAM,CAAC,sCAAsC,CAAC,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,wBAAwB;CAItH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v6.2.0 2022-04-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __extends } from '../_virtual/_tslib.js';
|
|
4
4
|
import { ClientAuthError } from './ClientAuthError.js';
|
|
@@ -83,6 +83,10 @@ var ClientConfigurationErrorMessage = {
|
|
|
83
83
|
code: "untrusted_authority",
|
|
84
84
|
desc: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."
|
|
85
85
|
},
|
|
86
|
+
invalidAzureCloudInstance: {
|
|
87
|
+
code: "invalid_azure_cloud_instance",
|
|
88
|
+
desc: "Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"
|
|
89
|
+
},
|
|
86
90
|
missingSshJwk: {
|
|
87
91
|
code: "missing_ssh_jwk",
|
|
88
92
|
desc: "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."
|
|
@@ -219,7 +223,13 @@ var ClientConfigurationError = /** @class */ (function (_super) {
|
|
|
219
223
|
ClientConfigurationError.createUntrustedAuthorityError = function () {
|
|
220
224
|
return new ClientConfigurationError(ClientConfigurationErrorMessage.untrustedAuthority.code, ClientConfigurationErrorMessage.untrustedAuthority.desc);
|
|
221
225
|
};
|
|
222
|
-
|
|
226
|
+
/**
|
|
227
|
+
* Throws error when the AzureCloudInstance is set to an invalid value
|
|
228
|
+
*/
|
|
229
|
+
ClientConfigurationError.createInvalidAzureCloudInstanceError = function () {
|
|
230
|
+
return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAzureCloudInstance.code, ClientConfigurationErrorMessage.invalidAzureCloudInstance.desc);
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
223
233
|
* Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request
|
|
224
234
|
*/
|
|
225
235
|
ClientConfigurationError.createMissingSshJwkError = function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientConfigurationError.js","sources":["../../src/error/ClientConfigurationError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientAuthError } from \"./ClientAuthError\";\n\n/**\n * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.\n */\nexport const ClientConfigurationErrorMessage = {\n redirectUriNotSet: {\n code: \"redirect_uri_empty\",\n desc: \"A redirect URI is required for all calls, and none has been set.\"\n },\n postLogoutUriNotSet: {\n code: \"post_logout_uri_empty\",\n desc: \"A post logout redirect has not been set.\"\n },\n claimsRequestParsingError: {\n code: \"claims_request_parsing_error\",\n desc: \"Could not parse the given claims request object.\"\n },\n authorityUriInsecure: {\n code: \"authority_uri_insecure\",\n desc: \"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options\"\n },\n urlParseError: {\n code: \"url_parse_error\",\n desc: \"URL could not be parsed into appropriate segments.\"\n },\n urlEmptyError: {\n code: \"empty_url_error\",\n desc: \"URL was empty or null.\"\n },\n emptyScopesError: {\n code: \"empty_input_scopes_error\",\n desc: \"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.\"\n },\n nonArrayScopesError: {\n code: \"nonarray_input_scopes_error\",\n desc: \"Scopes cannot be passed as non-array.\"\n },\n clientIdSingleScopeError: {\n code: \"clientid_input_scopes_error\",\n desc: \"Client ID can only be provided as a single scope.\"\n },\n invalidPrompt: {\n code: \"invalid_prompt_value\",\n desc: \"Supported prompt values are 'login', 'select_account', 'consent', 'create' and 'none'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest\",\n },\n invalidClaimsRequest: {\n code: \"invalid_claims\",\n desc: \"Given claims parameter must be a stringified JSON object.\"\n },\n tokenRequestEmptyError: {\n code: \"token_request_empty\",\n desc: \"Token request was empty and not found in cache.\"\n },\n logoutRequestEmptyError: {\n code: \"logout_request_empty\",\n desc: \"The logout request was null or undefined.\"\n },\n invalidCodeChallengeMethod: {\n code: \"invalid_code_challenge_method\",\n desc: \"code_challenge_method passed is invalid. Valid values are \\\"plain\\\" and \\\"S256\\\".\"\n },\n invalidCodeChallengeParams: {\n code: \"pkce_params_missing\",\n desc: \"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request\"\n },\n invalidCloudDiscoveryMetadata: {\n code: \"invalid_cloud_discovery_metadata\",\n desc: \"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields\"\n },\n invalidAuthorityMetadata: {\n code: \"invalid_authority_metadata\",\n desc: \"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.\"\n },\n untrustedAuthority: {\n code: \"untrusted_authority\",\n desc: \"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.\"\n },\n missingSshJwk: {\n code: \"missing_ssh_jwk\",\n desc: \"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.\"\n },\n missingSshKid: {\n code: \"missing_ssh_kid\",\n desc: \"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.\"\n },\n missingNonceAuthenticationHeader: {\n code: \"missing_nonce_authentication_header\",\n desc: \"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.\"\n },\n invalidAuthenticationHeader: {\n code: \"invalid_authentication_header\",\n desc: \"Invalid authentication header provided\"\n }\n};\n\n/**\n * Error thrown when there is an error in configuration of the MSAL.js library.\n */\nexport class ClientConfigurationError extends ClientAuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"ClientConfigurationError\";\n Object.setPrototypeOf(this, ClientConfigurationError.prototype);\n }\n\n /**\n * Creates an error thrown when the redirect uri is empty (not set by caller)\n */\n static createRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.redirectUriNotSet.code,\n ClientConfigurationErrorMessage.redirectUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)\n */\n static createPostLogoutRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.postLogoutUriNotSet.code,\n ClientConfigurationErrorMessage.postLogoutUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the claims request could not be successfully parsed\n */\n static createClaimsRequestParsingError(claimsRequestParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.claimsRequestParsingError.code,\n `${ClientConfigurationErrorMessage.claimsRequestParsingError.desc} Given value: ${claimsRequestParseError}`);\n }\n\n /**\n * Creates an error thrown if authority uri is given an insecure protocol.\n * @param urlString\n */\n static createInsecureAuthorityUriError(urlString: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.authorityUriInsecure.code,\n `${ClientConfigurationErrorMessage.authorityUriInsecure.desc} Given URI: ${urlString}`);\n }\n\n /**\n * Creates an error thrown if URL string does not parse into separate segments.\n * @param urlString\n */\n static createUrlParseError(urlParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlParseError.code,\n `${ClientConfigurationErrorMessage.urlParseError.desc} Given Error: ${urlParseError}`);\n }\n\n /**\n * Creates an error thrown if URL string is empty or null.\n * @param urlString\n */\n static createUrlEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlEmptyError.code,\n ClientConfigurationErrorMessage.urlEmptyError.desc);\n }\n\n /**\n * Error thrown when scopes are empty.\n * @param scopesValue\n */\n static createEmptyScopesArrayError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.emptyScopesError.code,\n `${ClientConfigurationErrorMessage.emptyScopesError.desc}`);\n }\n\n /**\n * Error thrown when client id scope is not provided as single scope.\n * @param inputScopes\n */\n static createClientIdSingleScopeError(inputScopes: Array<string>): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.clientIdSingleScopeError.code,\n `${ClientConfigurationErrorMessage.clientIdSingleScopeError.desc} Given Scopes: ${inputScopes}`);\n }\n\n /**\n * Error thrown when prompt is not an allowed type.\n * @param promptValue\n */\n static createInvalidPromptError(promptValue: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidPrompt.code,\n `${ClientConfigurationErrorMessage.invalidPrompt.desc} Given value: ${promptValue}`);\n }\n\n /**\n * Creates error thrown when claims parameter is not a stringified JSON object\n */\n static createInvalidClaimsRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidClaimsRequest.code,\n ClientConfigurationErrorMessage.invalidClaimsRequest.desc);\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyLogoutRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.logoutRequestEmptyError.code,\n ClientConfigurationErrorMessage.logoutRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyTokenRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.tokenRequestEmptyError.code,\n ClientConfigurationErrorMessage.tokenRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when an invalid code_challenge_method is passed by the user\n */\n static createInvalidCodeChallengeMethodError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.desc\n );\n }\n\n /**\n * Throws error when both params: code_challenge and code_challenge_method are not passed together\n */\n static createInvalidCodeChallengeParamsError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.desc\n );\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidCloudDiscoveryMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.code,\n ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.desc);\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidAuthorityMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthorityMetadata.code,\n ClientConfigurationErrorMessage.invalidAuthorityMetadata.desc);\n }\n\n /**\n * Throws error when provided authority is not a member of the trusted host list\n */\n static createUntrustedAuthorityError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.untrustedAuthority.code,\n ClientConfigurationErrorMessage.untrustedAuthority.desc);\n }\n /*\n * Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request\n */\n static createMissingSshJwkError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshJwk.code,\n ClientConfigurationErrorMessage.missingSshJwk.desc);\n }\n\n /**\n * Throws an error when the authentication scheme is set to SSH but the SSH public key ID is omitted from the request\n */\n static createMissingSshKidError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshKid.code,\n ClientConfigurationErrorMessage.missingSshKid.desc);\n }\n\n /**\n * Throws error when provided headers don't contain a header that a server nonce can be extracted from\n */\n static createMissingNonceAuthenticationHeadersError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.code,\n ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.desc);\n }\n\n /**\n * Throws error when a provided header is invalid in any way\n */\n static createInvalidAuthenticationHeaderError(invalidHeaderName: string, details: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthenticationHeader.code,\n `${ClientConfigurationErrorMessage.invalidAuthenticationHeader.desc}. Invalid header: ${invalidHeaderName}. Details: ${details}`);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAOA;;;IAGa,+BAA+B,GAAG;IAC3C,iBAAiB,EAAE;QACf,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,kEAAkE;KAC3E;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,0CAA0C;KACnD;IACD,yBAAyB,EAAE;QACvB,IAAI,EAAE,8BAA8B;QACpC,IAAI,EAAE,kDAAkD;KAC3D;IACD,oBAAoB,EAAE;QAClB,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,2NAA2N;KACpO;IACD,aAAa,EAAE;QACX,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,oDAAoD;KAC7D;IACD,aAAa,EAAE;QACX,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,wBAAwB;KACjC;IACD,gBAAgB,EAAE;QACd,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE,gHAAgH;KACzH;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,uCAAuC;KAChD;IACD,wBAAwB,EAAE;QACtB,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,mDAAmD;KAC5D;IACD,aAAa,EAAE;QACX,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,8QAA8Q;KACvR;IACD,oBAAoB,EAAE;QAClB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,2DAA2D;KACpE;I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sDAA6B,GAApC;QACI,OAAO,IAAI,wBAAwB,CAAC,+BAA+B,CAAC,kBAAkB,CAAC,IAAI,EACvF,+BAA+B,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAChE;;;;IAIM,iDAAwB,GAA/B;QACI,OAAO,IAAI,wBAAwB,CAAC,+BAA+B,CAAC,aAAa,CAAC,IAAI,EAClF,+BAA+B,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;KAC3D;;;;IAKM,iDAAwB,GAA/B;QACI,OAAO,IAAI,wBAAwB,CAAC,+BAA+B,CAAC,aAAa,CAAC,IAAI,EAClF,+BAA+B,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;KAC3D;;;;IAKM,qEAA4C,GAAnD;QACI,OAAO,IAAI,wBAAwB,CAAC,+BAA+B,CAAC,gCAAgC,CAAC,IAAI,EACrG,+BAA+B,CAAC,gCAAgC,CAAC,IAAI,CAAC,CAAC;KAC9E;;;;IAKM,+DAAsC,GAA7C,UAA8C,iBAAyB,EAAE,OAAe;QACpF,OAAO,IAAI,wBAAwB,CAAC,+BAA+B,CAAC,2BAA2B,CAAC,IAAI,EAC7F,+BAA+B,CAAC,2BAA2B,CAAC,IAAI,0BAAqB,iBAAiB,mBAAc,OAAS,CAAC,CAAC;KACzI;IACL,+BAAC;AAAD,CA5LA,CAA8C,eAAe;;;;"}
|
|
1
|
+
{"version":3,"file":"ClientConfigurationError.js","sources":["../../src/error/ClientConfigurationError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientAuthError } from \"./ClientAuthError\";\n\n/**\n * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.\n */\nexport const ClientConfigurationErrorMessage = {\n redirectUriNotSet: {\n code: \"redirect_uri_empty\",\n desc: \"A redirect URI is required for all calls, and none has been set.\"\n },\n postLogoutUriNotSet: {\n code: \"post_logout_uri_empty\",\n desc: \"A post logout redirect has not been set.\"\n },\n claimsRequestParsingError: {\n code: \"claims_request_parsing_error\",\n desc: \"Could not parse the given claims request object.\"\n },\n authorityUriInsecure: {\n code: \"authority_uri_insecure\",\n desc: \"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options\"\n },\n urlParseError: {\n code: \"url_parse_error\",\n desc: \"URL could not be parsed into appropriate segments.\"\n },\n urlEmptyError: {\n code: \"empty_url_error\",\n desc: \"URL was empty or null.\"\n },\n emptyScopesError: {\n code: \"empty_input_scopes_error\",\n desc: \"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.\"\n },\n nonArrayScopesError: {\n code: \"nonarray_input_scopes_error\",\n desc: \"Scopes cannot be passed as non-array.\"\n },\n clientIdSingleScopeError: {\n code: \"clientid_input_scopes_error\",\n desc: \"Client ID can only be provided as a single scope.\"\n },\n invalidPrompt: {\n code: \"invalid_prompt_value\",\n desc: \"Supported prompt values are 'login', 'select_account', 'consent', 'create' and 'none'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest\",\n },\n invalidClaimsRequest: {\n code: \"invalid_claims\",\n desc: \"Given claims parameter must be a stringified JSON object.\"\n },\n tokenRequestEmptyError: {\n code: \"token_request_empty\",\n desc: \"Token request was empty and not found in cache.\"\n },\n logoutRequestEmptyError: {\n code: \"logout_request_empty\",\n desc: \"The logout request was null or undefined.\"\n },\n invalidCodeChallengeMethod: {\n code: \"invalid_code_challenge_method\",\n desc: \"code_challenge_method passed is invalid. Valid values are \\\"plain\\\" and \\\"S256\\\".\"\n },\n invalidCodeChallengeParams: {\n code: \"pkce_params_missing\",\n desc: \"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request\"\n },\n invalidCloudDiscoveryMetadata: {\n code: \"invalid_cloud_discovery_metadata\",\n desc: \"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields\"\n },\n invalidAuthorityMetadata: {\n code: \"invalid_authority_metadata\",\n desc: \"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.\"\n },\n untrustedAuthority: {\n code: \"untrusted_authority\",\n desc: \"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.\"\n },\n invalidAzureCloudInstance: {\n code: \"invalid_azure_cloud_instance\",\n desc: \"Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values\"\n },\n missingSshJwk: {\n code: \"missing_ssh_jwk\",\n desc: \"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.\"\n },\n missingSshKid: {\n code: \"missing_ssh_kid\",\n desc: \"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.\"\n },\n missingNonceAuthenticationHeader: {\n code: \"missing_nonce_authentication_header\",\n desc: \"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.\"\n },\n invalidAuthenticationHeader: {\n code: \"invalid_authentication_header\",\n desc: \"Invalid authentication header provided\"\n }\n};\n\n/**\n * Error thrown when there is an error in configuration of the MSAL.js library.\n */\nexport class ClientConfigurationError extends ClientAuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"ClientConfigurationError\";\n Object.setPrototypeOf(this, ClientConfigurationError.prototype);\n }\n\n /**\n * Creates an error thrown when the redirect uri is empty (not set by caller)\n */\n static createRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.redirectUriNotSet.code,\n ClientConfigurationErrorMessage.redirectUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)\n */\n static createPostLogoutRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.postLogoutUriNotSet.code,\n ClientConfigurationErrorMessage.postLogoutUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the claims request could not be successfully parsed\n */\n static createClaimsRequestParsingError(claimsRequestParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.claimsRequestParsingError.code,\n `${ClientConfigurationErrorMessage.claimsRequestParsingError.desc} Given value: ${claimsRequestParseError}`);\n }\n\n /**\n * Creates an error thrown if authority uri is given an insecure protocol.\n * @param urlString\n */\n static createInsecureAuthorityUriError(urlString: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.authorityUriInsecure.code,\n `${ClientConfigurationErrorMessage.authorityUriInsecure.desc} Given URI: ${urlString}`);\n }\n\n /**\n * Creates an error thrown if URL string does not parse into separate segments.\n * @param urlString\n */\n static createUrlParseError(urlParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlParseError.code,\n `${ClientConfigurationErrorMessage.urlParseError.desc} Given Error: ${urlParseError}`);\n }\n\n /**\n * Creates an error thrown if URL string is empty or null.\n * @param urlString\n */\n static createUrlEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlEmptyError.code,\n ClientConfigurationErrorMessage.urlEmptyError.desc);\n }\n\n /**\n * Error thrown when scopes are empty.\n * @param scopesValue\n */\n static createEmptyScopesArrayError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.emptyScopesError.code,\n `${ClientConfigurationErrorMessage.emptyScopesError.desc}`);\n }\n\n /**\n * Error thrown when client id scope is not provided as single scope.\n * @param inputScopes\n */\n static createClientIdSingleScopeError(inputScopes: Array<string>): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.clientIdSingleScopeError.code,\n `${ClientConfigurationErrorMessage.clientIdSingleScopeError.desc} Given Scopes: ${inputScopes}`);\n }\n\n /**\n * Error thrown when prompt is not an allowed type.\n * @param promptValue\n */\n static createInvalidPromptError(promptValue: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidPrompt.code,\n `${ClientConfigurationErrorMessage.invalidPrompt.desc} Given value: ${promptValue}`);\n }\n\n /**\n * Creates error thrown when claims parameter is not a stringified JSON object\n */\n static createInvalidClaimsRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidClaimsRequest.code,\n ClientConfigurationErrorMessage.invalidClaimsRequest.desc);\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyLogoutRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.logoutRequestEmptyError.code,\n ClientConfigurationErrorMessage.logoutRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyTokenRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.tokenRequestEmptyError.code,\n ClientConfigurationErrorMessage.tokenRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when an invalid code_challenge_method is passed by the user\n */\n static createInvalidCodeChallengeMethodError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.desc\n );\n }\n\n /**\n * Throws error when both params: code_challenge and code_challenge_method are not passed together\n */\n static createInvalidCodeChallengeParamsError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.desc\n );\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidCloudDiscoveryMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.code,\n ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.desc);\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidAuthorityMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthorityMetadata.code,\n ClientConfigurationErrorMessage.invalidAuthorityMetadata.desc);\n }\n\n /**\n * Throws error when provided authority is not a member of the trusted host list\n */\n static createUntrustedAuthorityError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.untrustedAuthority.code,\n ClientConfigurationErrorMessage.untrustedAuthority.desc);\n }\n\n /**\n * Throws error when the AzureCloudInstance is set to an invalid value\n */\n static createInvalidAzureCloudInstanceError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAzureCloudInstance.code,\n ClientConfigurationErrorMessage.invalidAzureCloudInstance.desc);\n }\n\n /**\n * Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request\n */\n static createMissingSshJwkError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshJwk.code,\n ClientConfigurationErrorMessage.missingSshJwk.desc);\n }\n\n /**\n * Throws an error when the authentication scheme is set to SSH but the SSH public key ID is omitted from the request\n */\n static createMissingSshKidError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshKid.code,\n ClientConfigurationErrorMessage.missingSshKid.desc);\n }\n\n /**\n * Throws error when provided headers don't contain a header that a server nonce can be extracted from\n */\n static createMissingNonceAuthenticationHeadersError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.code,\n ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.desc);\n }\n\n /**\n * Throws error when a provided header is invalid in any way\n */\n static createInvalidAuthenticationHeaderError(invalidHeaderName: string, details: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthenticationHeader.code,\n `${ClientConfigurationErrorMessage.invalidAuthenticationHeader.desc}. Invalid header: ${invalidHeaderName}. Details: ${details}`);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAOA;;;IA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