@azure/msal-common 5.0.0 → 5.1.1
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/README.md +7 -6
- 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/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.js +8 -2
- package/dist/authority/Authority.js.map +1 -1
- package/dist/authority/AuthorityFactory.js +1 -1
- package/dist/authority/AuthorityType.js +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.js +1 -1
- package/dist/authority/OpenIdConfigResponse.d.ts +1 -1
- package/dist/authority/OpenIdConfigResponse.d.ts.map +1 -1
- package/dist/authority/OpenIdConfigResponse.js +1 -2
- package/dist/authority/OpenIdConfigResponse.js.map +1 -1
- package/dist/authority/ProtocolMode.js +1 -1
- package/dist/authority/RegionDiscovery.js +1 -1
- package/dist/cache/CacheManager.d.ts +14 -3
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.js +47 -17
- package/dist/cache/CacheManager.js.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.js +15 -9
- package/dist/cache/entities/AccessTokenEntity.js.map +1 -1
- package/dist/cache/entities/AccountEntity.js +1 -1
- package/dist/cache/entities/AppMetadataEntity.js +1 -1
- package/dist/cache/entities/AuthorityMetadataEntity.d.ts +1 -1
- package/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -1
- package/dist/cache/entities/AuthorityMetadataEntity.js +1 -2
- package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -1
- package/dist/cache/entities/CacheRecord.js +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts +1 -0
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/dist/cache/entities/CredentialEntity.js +3 -3
- 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/interface/ICacheManager.d.ts +5 -1
- package/dist/cache/interface/ICacheManager.d.ts.map +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 +1 -0
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.js +43 -15
- package/dist/client/AuthorizationCodeClient.js.map +1 -1
- package/dist/client/BaseClient.js +1 -1
- package/dist/client/ClientCredentialClient.d.ts.map +1 -1
- package/dist/client/ClientCredentialClient.js +4 -2
- package/dist/client/ClientCredentialClient.js.map +1 -1
- package/dist/client/DeviceCodeClient.d.ts.map +1 -1
- package/dist/client/DeviceCodeClient.js +7 -3
- package/dist/client/DeviceCodeClient.js.map +1 -1
- package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
- package/dist/client/OnBehalfOfClient.js +4 -2
- package/dist/client/OnBehalfOfClient.js.map +1 -1
- package/dist/client/RefreshTokenClient.d.ts.map +1 -1
- package/dist/client/RefreshTokenClient.js +24 -11
- package/dist/client/RefreshTokenClient.js.map +1 -1
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.js +17 -12
- package/dist/client/SilentFlowClient.js.map +1 -1
- package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
- package/dist/client/UsernamePasswordClient.js +4 -2
- package/dist/client/UsernamePasswordClient.js.map +1 -1
- package/dist/config/ClientConfiguration.js +1 -1
- package/dist/crypto/ICrypto.d.ts +1 -1
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.js +1 -1
- package/dist/crypto/ICrypto.js.map +1 -1
- package/dist/crypto/PopTokenGenerator.js +4 -4
- package/dist/crypto/PopTokenGenerator.js.map +1 -1
- package/dist/error/AuthError.js +1 -1
- package/dist/error/ClientAuthError.d.ts +8 -4
- package/dist/error/ClientAuthError.d.ts.map +1 -1
- package/dist/error/ClientAuthError.js +11 -7
- package/dist/error/ClientAuthError.js.map +1 -1
- package/dist/error/ClientConfigurationError.d.ts +29 -0
- package/dist/error/ClientConfigurationError.d.ts.map +1 -1
- package/dist/error/ClientConfigurationError.js +43 -3
- package/dist/error/ClientConfigurationError.js.map +1 -1
- package/dist/error/InteractionRequiredAuthError.d.ts +24 -5
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.js +30 -9
- package/dist/error/InteractionRequiredAuthError.js.map +1 -1
- package/dist/error/ServerError.js +1 -1
- package/dist/index.cjs.js +325 -89
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/logger/Logger.js +1 -1
- package/dist/network/INetworkModule.js +1 -1
- package/dist/network/NetworkManager.js +1 -1
- package/dist/network/RequestThumbprint.d.ts +2 -0
- package/dist/network/RequestThumbprint.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.js +4 -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.d.ts +20 -0
- package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -0
- package/dist/request/AuthenticationHeaderParser.js +64 -0
- package/dist/request/AuthenticationHeaderParser.js.map +1 -0
- package/dist/request/BaseAuthRequest.d.ts +7 -1
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts +4 -0
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.js +10 -1
- package/dist/request/RequestParameterBuilder.js.map +1 -1
- package/dist/request/RequestValidator.js +1 -1
- package/dist/request/ScopeSet.js +1 -1
- package/dist/response/AuthenticationResult.d.ts +1 -1
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.js +4 -2
- package/dist/response/ResponseHandler.js.map +1 -1
- package/dist/response/ServerAuthorizationTokenResponse.d.ts +2 -0
- package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.js +1 -1
- package/dist/url/UrlString.js +1 -1
- package/dist/utils/Constants.d.ts +5 -2
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.js +5 -2
- package/dist/utils/Constants.js.map +1 -1
- package/dist/utils/ProtocolUtils.js +1 -1
- package/dist/utils/StringUtils.js +1 -1
- package/dist/utils/TimeUtils.js +1 -1
- package/package.json +76 -76
- package/CHANGELOG.json +0 -1152
- package/changelog.md +0 -442
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common v5.
|
|
1
|
+
/*! @azure/msal-common v5.1.1 2022-08-03 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -153,6 +153,8 @@ var HeaderNames;
|
|
|
153
153
|
HeaderNames["CONTENT_TYPE"] = "Content-Type";
|
|
154
154
|
HeaderNames["RETRY_AFTER"] = "Retry-After";
|
|
155
155
|
HeaderNames["CCS_HEADER"] = "X-AnchorMailbox";
|
|
156
|
+
HeaderNames["WWWAuthenticate"] = "WWW-Authenticate";
|
|
157
|
+
HeaderNames["AuthenticationInfo"] = "Authentication-Info";
|
|
156
158
|
})(HeaderNames || (HeaderNames = {}));
|
|
157
159
|
/**
|
|
158
160
|
* Persistent cache keys MSAL which stay while user is logged in.
|
|
@@ -387,8 +389,9 @@ var SERVER_TELEM_CONSTANTS = {
|
|
|
387
389
|
*/
|
|
388
390
|
exports.AuthenticationScheme = void 0;
|
|
389
391
|
(function (AuthenticationScheme) {
|
|
390
|
-
AuthenticationScheme["POP"] = "pop";
|
|
391
392
|
AuthenticationScheme["BEARER"] = "Bearer";
|
|
393
|
+
AuthenticationScheme["POP"] = "pop";
|
|
394
|
+
AuthenticationScheme["SSH"] = "ssh-cert";
|
|
392
395
|
})(exports.AuthenticationScheme || (exports.AuthenticationScheme = {}));
|
|
393
396
|
/**
|
|
394
397
|
* Constants related to throttling
|
|
@@ -743,6 +746,10 @@ var ClientAuthErrorMessage = {
|
|
|
743
746
|
bindingKeyNotRemovedError: {
|
|
744
747
|
code: "binding_key_not_removed",
|
|
745
748
|
desc: "Could not remove the credential's binding key from storage."
|
|
749
|
+
},
|
|
750
|
+
logoutNotSupported: {
|
|
751
|
+
code: "end_session_endpoint_not_supported",
|
|
752
|
+
desc: "Provided authority does not support logout."
|
|
746
753
|
}
|
|
747
754
|
};
|
|
748
755
|
/**
|
|
@@ -842,12 +849,6 @@ var ClientAuthError = /** @class */ (function (_super) {
|
|
|
842
849
|
ClientAuthError.createNonceNotFoundError = function (missingNonce) {
|
|
843
850
|
return new ClientAuthError(ClientAuthErrorMessage.nonceNotFoundError.code, ClientAuthErrorMessage.nonceNotFoundError.desc + ": " + missingNonce);
|
|
844
851
|
};
|
|
845
|
-
/**
|
|
846
|
-
* Creates an error thrown when the authorization code required for a token request is null or empty.
|
|
847
|
-
*/
|
|
848
|
-
ClientAuthError.createNoTokensFoundError = function () {
|
|
849
|
-
return new ClientAuthError(ClientAuthErrorMessage.noTokensFoundError.code, ClientAuthErrorMessage.noTokensFoundError.desc);
|
|
850
|
-
};
|
|
851
852
|
/**
|
|
852
853
|
* Throws error when multiple tokens are in cache.
|
|
853
854
|
*/
|
|
@@ -1012,6 +1013,12 @@ var ClientAuthError = /** @class */ (function (_super) {
|
|
|
1012
1013
|
ClientAuthError.createBindingKeyNotRemovedError = function () {
|
|
1013
1014
|
return new ClientAuthError(ClientAuthErrorMessage.bindingKeyNotRemovedError.code, ClientAuthErrorMessage.bindingKeyNotRemovedError.desc);
|
|
1014
1015
|
};
|
|
1016
|
+
/**
|
|
1017
|
+
* Thrown when logout is attempted for an authority that doesnt have an end_session_endpoint
|
|
1018
|
+
*/
|
|
1019
|
+
ClientAuthError.createLogoutNotSupportedError = function () {
|
|
1020
|
+
return new ClientAuthError(ClientAuthErrorMessage.logoutNotSupported.code, ClientAuthErrorMessage.logoutNotSupported.desc);
|
|
1021
|
+
};
|
|
1015
1022
|
return ClientAuthError;
|
|
1016
1023
|
}(AuthError));
|
|
1017
1024
|
|
|
@@ -1318,7 +1325,7 @@ var Logger = /** @class */ (function () {
|
|
|
1318
1325
|
|
|
1319
1326
|
/* eslint-disable header/header */
|
|
1320
1327
|
var name = "@azure/msal-common";
|
|
1321
|
-
var version = "5.
|
|
1328
|
+
var version = "5.1.0";
|
|
1322
1329
|
|
|
1323
1330
|
/*
|
|
1324
1331
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1420,8 +1427,8 @@ var CredentialEntity = /** @class */ (function () {
|
|
|
1420
1427
|
this.generateCredentialIdForCacheKey(credentialType, clientId, realm, familyId),
|
|
1421
1428
|
this.generateTargetForCacheKey(target)
|
|
1422
1429
|
];
|
|
1423
|
-
// PoP Tokens include scheme in cache key
|
|
1424
|
-
if (tokenType
|
|
1430
|
+
// PoP Tokens and SSH certs include scheme in cache key
|
|
1431
|
+
if (tokenType && tokenType !== exports.AuthenticationScheme.BEARER) {
|
|
1425
1432
|
credentialKey.push(tokenType.toLowerCase());
|
|
1426
1433
|
}
|
|
1427
1434
|
return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();
|
|
@@ -1532,15 +1539,31 @@ var ClientConfigurationErrorMessage = {
|
|
|
1532
1539
|
},
|
|
1533
1540
|
invalidCloudDiscoveryMetadata: {
|
|
1534
1541
|
code: "invalid_cloud_discovery_metadata",
|
|
1535
|
-
desc: "Invalid cloudDiscoveryMetadata provided. Must be a JSON object containing tenant_discovery_endpoint and metadata fields"
|
|
1542
|
+
desc: "Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields"
|
|
1536
1543
|
},
|
|
1537
1544
|
invalidAuthorityMetadata: {
|
|
1538
1545
|
code: "invalid_authority_metadata",
|
|
1539
|
-
desc: "Invalid authorityMetadata provided. Must by a JSON object containing authorization_endpoint, token_endpoint,
|
|
1546
|
+
desc: "Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields."
|
|
1540
1547
|
},
|
|
1541
1548
|
untrustedAuthority: {
|
|
1542
1549
|
code: "untrusted_authority",
|
|
1543
1550
|
desc: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."
|
|
1551
|
+
},
|
|
1552
|
+
missingSshJwk: {
|
|
1553
|
+
code: "missing_ssh_jwk",
|
|
1554
|
+
desc: "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."
|
|
1555
|
+
},
|
|
1556
|
+
missingSshKid: {
|
|
1557
|
+
code: "missing_ssh_kid",
|
|
1558
|
+
desc: "Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme."
|
|
1559
|
+
},
|
|
1560
|
+
missingNonceAuthenticationHeader: {
|
|
1561
|
+
code: "missing_nonce_authentication_header",
|
|
1562
|
+
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."
|
|
1563
|
+
},
|
|
1564
|
+
invalidAuthenticationHeader: {
|
|
1565
|
+
code: "invalid_authentication_header",
|
|
1566
|
+
desc: "Invalid authentication header provided"
|
|
1544
1567
|
}
|
|
1545
1568
|
};
|
|
1546
1569
|
/**
|
|
@@ -1662,6 +1685,30 @@ var ClientConfigurationError = /** @class */ (function (_super) {
|
|
|
1662
1685
|
ClientConfigurationError.createUntrustedAuthorityError = function () {
|
|
1663
1686
|
return new ClientConfigurationError(ClientConfigurationErrorMessage.untrustedAuthority.code, ClientConfigurationErrorMessage.untrustedAuthority.desc);
|
|
1664
1687
|
};
|
|
1688
|
+
/*
|
|
1689
|
+
* Throws an error when the authentication scheme is set to SSH but the SSH public key is omitted from the request
|
|
1690
|
+
*/
|
|
1691
|
+
ClientConfigurationError.createMissingSshJwkError = function () {
|
|
1692
|
+
return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshJwk.code, ClientConfigurationErrorMessage.missingSshJwk.desc);
|
|
1693
|
+
};
|
|
1694
|
+
/**
|
|
1695
|
+
* Throws an error when the authentication scheme is set to SSH but the SSH public key ID is omitted from the request
|
|
1696
|
+
*/
|
|
1697
|
+
ClientConfigurationError.createMissingSshKidError = function () {
|
|
1698
|
+
return new ClientConfigurationError(ClientConfigurationErrorMessage.missingSshKid.code, ClientConfigurationErrorMessage.missingSshKid.desc);
|
|
1699
|
+
};
|
|
1700
|
+
/**
|
|
1701
|
+
* Throws error when provided headers don't contain a header that a server nonce can be extracted from
|
|
1702
|
+
*/
|
|
1703
|
+
ClientConfigurationError.createMissingNonceAuthenticationHeadersError = function () {
|
|
1704
|
+
return new ClientConfigurationError(ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.code, ClientConfigurationErrorMessage.missingNonceAuthenticationHeader.desc);
|
|
1705
|
+
};
|
|
1706
|
+
/**
|
|
1707
|
+
* Throws error when a provided header is invalid in any way
|
|
1708
|
+
*/
|
|
1709
|
+
ClientConfigurationError.createInvalidAuthenticationHeaderError = function (invalidHeaderName, details) {
|
|
1710
|
+
return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthenticationHeader.code, ClientConfigurationErrorMessage.invalidAuthenticationHeader.desc + ". Invalid header: " + invalidHeaderName + ". Details: " + details);
|
|
1711
|
+
};
|
|
1665
1712
|
return ClientConfigurationError;
|
|
1666
1713
|
}(ClientAuthError));
|
|
1667
1714
|
|
|
@@ -2324,7 +2371,7 @@ var CacheManager = /** @class */ (function () {
|
|
|
2324
2371
|
* @param target
|
|
2325
2372
|
*/
|
|
2326
2373
|
CacheManager.prototype.getCredentialsFilteredBy = function (filter) {
|
|
2327
|
-
return this.getCredentialsFilteredByInternal(filter.homeAccountId, filter.environment, filter.credentialType, filter.clientId, filter.familyId, filter.realm, filter.target, filter.oboAssertion, filter.tokenType);
|
|
2374
|
+
return this.getCredentialsFilteredByInternal(filter.homeAccountId, filter.environment, filter.credentialType, filter.clientId, filter.familyId, filter.realm, filter.target, filter.oboAssertion, filter.tokenType, filter.keyId);
|
|
2328
2375
|
};
|
|
2329
2376
|
/**
|
|
2330
2377
|
* Support function to help match credentials
|
|
@@ -2337,7 +2384,7 @@ var CacheManager = /** @class */ (function () {
|
|
|
2337
2384
|
* @param oboAssertion
|
|
2338
2385
|
* @param tokenType
|
|
2339
2386
|
*/
|
|
2340
|
-
CacheManager.prototype.getCredentialsFilteredByInternal = function (homeAccountId, environment, credentialType, clientId, familyId, realm, target, oboAssertion, tokenType) {
|
|
2387
|
+
CacheManager.prototype.getCredentialsFilteredByInternal = function (homeAccountId, environment, credentialType, clientId, familyId, realm, target, oboAssertion, tokenType, keyId) {
|
|
2341
2388
|
var _this = this;
|
|
2342
2389
|
var allCacheKeys = this.getKeys();
|
|
2343
2390
|
var matchingCredentials = {
|
|
@@ -2384,27 +2431,43 @@ var CacheManager = /** @class */ (function () {
|
|
|
2384
2431
|
if (!!target && !_this.matchTarget(entity, target)) {
|
|
2385
2432
|
return;
|
|
2386
2433
|
}
|
|
2434
|
+
// Access Token with Auth Scheme specific matching
|
|
2387
2435
|
if (credentialType === exports.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) {
|
|
2388
2436
|
if (!!tokenType && !_this.matchTokenType(entity, tokenType)) {
|
|
2389
2437
|
return;
|
|
2390
2438
|
}
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2439
|
+
switch (tokenType) {
|
|
2440
|
+
case exports.AuthenticationScheme.POP:
|
|
2441
|
+
// This check avoids matching outdated POP tokens that don't have the <-scheme> in the cache key
|
|
2442
|
+
if (cacheKey.indexOf(exports.AuthenticationScheme.POP) === -1) {
|
|
2443
|
+
// AccessToken_With_AuthScheme that doesn't have "-pop" in the key is outdated and needs to be removed
|
|
2444
|
+
_this.removeItem(cacheKey, exports.CacheSchemaType.CREDENTIAL);
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
break;
|
|
2448
|
+
case exports.AuthenticationScheme.SSH:
|
|
2449
|
+
// KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key
|
|
2450
|
+
if (keyId && !_this.matchKeyId(entity, keyId)) {
|
|
2451
|
+
return;
|
|
2452
|
+
}
|
|
2453
|
+
break;
|
|
2396
2454
|
}
|
|
2397
2455
|
}
|
|
2456
|
+
/*
|
|
2457
|
+
* At this point, the entity matches the request, update cache key if key schema has changed
|
|
2458
|
+
* Migration code for forwards compatibility with new versions of the library in case of rollback.
|
|
2459
|
+
*/
|
|
2460
|
+
var updatedCacheKey = _this.updateCredentialCacheKey(cacheKey, entity);
|
|
2398
2461
|
switch (credType) {
|
|
2399
2462
|
case exports.CredentialType.ID_TOKEN:
|
|
2400
|
-
matchingCredentials.idTokens[
|
|
2463
|
+
matchingCredentials.idTokens[updatedCacheKey] = entity;
|
|
2401
2464
|
break;
|
|
2402
2465
|
case exports.CredentialType.ACCESS_TOKEN:
|
|
2403
2466
|
case exports.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME:
|
|
2404
|
-
matchingCredentials.accessTokens[
|
|
2467
|
+
matchingCredentials.accessTokens[updatedCacheKey] = entity;
|
|
2405
2468
|
break;
|
|
2406
2469
|
case exports.CredentialType.REFRESH_TOKEN:
|
|
2407
|
-
matchingCredentials.refreshTokens[
|
|
2470
|
+
matchingCredentials.refreshTokens[updatedCacheKey] = entity;
|
|
2408
2471
|
break;
|
|
2409
2472
|
}
|
|
2410
2473
|
});
|
|
@@ -2563,6 +2626,7 @@ var CacheManager = /** @class */ (function () {
|
|
|
2563
2626
|
case 0:
|
|
2564
2627
|
key = credential.generateCredentialKey();
|
|
2565
2628
|
if (!(credential.credentialType.toLowerCase() === exports.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())) return [3 /*break*/, 4];
|
|
2629
|
+
if (!(credential.tokenType === exports.AuthenticationScheme.POP)) return [3 /*break*/, 4];
|
|
2566
2630
|
accessTokenWithAuthSchemeEntity = credential;
|
|
2567
2631
|
kid = accessTokenWithAuthSchemeEntity.keyId;
|
|
2568
2632
|
if (!kid) return [3 /*break*/, 4];
|
|
@@ -2602,10 +2666,10 @@ var CacheManager = /** @class */ (function () {
|
|
|
2602
2666
|
* @param environment
|
|
2603
2667
|
* @param authScheme
|
|
2604
2668
|
*/
|
|
2605
|
-
CacheManager.prototype.readCacheRecord = function (account, clientId, scopes, environment, authScheme) {
|
|
2669
|
+
CacheManager.prototype.readCacheRecord = function (account, clientId, scopes, environment, authScheme, keyId) {
|
|
2606
2670
|
var cachedAccount = this.readAccountFromCache(account);
|
|
2607
2671
|
var cachedIdToken = this.readIdTokenFromCache(clientId, account);
|
|
2608
|
-
var cachedAccessToken = this.readAccessTokenFromCache(clientId, account, scopes, authScheme);
|
|
2672
|
+
var cachedAccessToken = this.readAccessTokenFromCache(clientId, account, scopes, authScheme, keyId);
|
|
2609
2673
|
var cachedRefreshToken = this.readRefreshTokenFromCache(clientId, account, false);
|
|
2610
2674
|
var cachedAppMetadata = this.readAppMetadataFromCache(environment, clientId);
|
|
2611
2675
|
if (cachedAccount && cachedIdToken) {
|
|
@@ -2659,9 +2723,9 @@ var CacheManager = /** @class */ (function () {
|
|
|
2659
2723
|
* @param scopes
|
|
2660
2724
|
* @param authScheme
|
|
2661
2725
|
*/
|
|
2662
|
-
CacheManager.prototype.readAccessTokenFromCache = function (clientId, account, scopes, authScheme) {
|
|
2663
|
-
// Distinguish between Bearer and PoP token cache types
|
|
2664
|
-
var credentialType = (authScheme
|
|
2726
|
+
CacheManager.prototype.readAccessTokenFromCache = function (clientId, account, scopes, authScheme, keyId) {
|
|
2727
|
+
// Distinguish between Bearer and PoP/SSH token cache types
|
|
2728
|
+
var credentialType = (authScheme && authScheme !== exports.AuthenticationScheme.BEARER) ? exports.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME : exports.CredentialType.ACCESS_TOKEN;
|
|
2665
2729
|
var accessTokenFilter = {
|
|
2666
2730
|
homeAccountId: account.homeAccountId,
|
|
2667
2731
|
environment: account.environment,
|
|
@@ -2669,7 +2733,8 @@ var CacheManager = /** @class */ (function () {
|
|
|
2669
2733
|
clientId: clientId,
|
|
2670
2734
|
realm: account.tenantId,
|
|
2671
2735
|
target: scopes.printScopesLowerCase(),
|
|
2672
|
-
tokenType: authScheme
|
|
2736
|
+
tokenType: authScheme,
|
|
2737
|
+
keyId: keyId
|
|
2673
2738
|
};
|
|
2674
2739
|
var credentialCache = this.getCredentialsFilteredBy(accessTokenFilter);
|
|
2675
2740
|
var accessTokens = Object.keys(credentialCache.accessTokens).map(function (key) { return credentialCache.accessTokens[key]; });
|
|
@@ -2822,6 +2887,14 @@ var CacheManager = /** @class */ (function () {
|
|
|
2822
2887
|
CacheManager.prototype.matchTokenType = function (entity, tokenType) {
|
|
2823
2888
|
return !!(entity.tokenType && entity.tokenType === tokenType);
|
|
2824
2889
|
};
|
|
2890
|
+
/**
|
|
2891
|
+
* Returns true if the credential's keyId matches the one in the request, false otherwise
|
|
2892
|
+
* @param entity
|
|
2893
|
+
* @param tokenType
|
|
2894
|
+
*/
|
|
2895
|
+
CacheManager.prototype.matchKeyId = function (entity, keyId) {
|
|
2896
|
+
return !!(entity.keyId && entity.keyId === keyId);
|
|
2897
|
+
};
|
|
2825
2898
|
/**
|
|
2826
2899
|
* returns if a given cache entity is of the type appmetadata
|
|
2827
2900
|
* @param key
|
|
@@ -2970,6 +3043,10 @@ var DefaultStorageClass = /** @class */ (function (_super) {
|
|
|
2970
3043
|
});
|
|
2971
3044
|
});
|
|
2972
3045
|
};
|
|
3046
|
+
DefaultStorageClass.prototype.updateCredentialCacheKey = function () {
|
|
3047
|
+
var notImplErr = "Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";
|
|
3048
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
3049
|
+
};
|
|
2973
3050
|
return DefaultStorageClass;
|
|
2974
3051
|
}(CacheManager));
|
|
2975
3052
|
|
|
@@ -3155,7 +3232,9 @@ var ThrottlingUtils = /** @class */ (function () {
|
|
|
3155
3232
|
authenticationScheme: request.authenticationScheme,
|
|
3156
3233
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
3157
3234
|
resourceRequestUri: request.resourceRequestUri,
|
|
3158
|
-
shrClaims: request.shrClaims
|
|
3235
|
+
shrClaims: request.shrClaims,
|
|
3236
|
+
sshJwk: request.sshJwk,
|
|
3237
|
+
sshKid: request.sshKid
|
|
3159
3238
|
};
|
|
3160
3239
|
var key = this.generateThrottlingStorageKey(thumbprint);
|
|
3161
3240
|
return cacheManager.removeItem(key, exports.CacheSchemaType.THROTTLING);
|
|
@@ -3693,6 +3772,15 @@ var RequestParameterBuilder = /** @class */ (function () {
|
|
|
3693
3772
|
this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(cnfString));
|
|
3694
3773
|
}
|
|
3695
3774
|
};
|
|
3775
|
+
/**
|
|
3776
|
+
* add SSH JWK and key ID to query params
|
|
3777
|
+
*/
|
|
3778
|
+
RequestParameterBuilder.prototype.addSshJwk = function (sshJwkString) {
|
|
3779
|
+
if (!StringUtils.isEmpty(sshJwkString)) {
|
|
3780
|
+
this.parameters.set(AADServerParamKeys.TOKEN_TYPE, exports.AuthenticationScheme.SSH);
|
|
3781
|
+
this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(sshJwkString));
|
|
3782
|
+
}
|
|
3783
|
+
};
|
|
3696
3784
|
/**
|
|
3697
3785
|
* add server telemetry fields
|
|
3698
3786
|
* @param serverTelemetryManager
|
|
@@ -3876,7 +3964,7 @@ var AccessTokenEntity = /** @class */ (function (_super) {
|
|
|
3876
3964
|
* @param expiresOn
|
|
3877
3965
|
* @param extExpiresOn
|
|
3878
3966
|
*/
|
|
3879
|
-
AccessTokenEntity.createAccessTokenEntity = function (homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, cryptoUtils, refreshOn, tokenType, oboAssertion) {
|
|
3967
|
+
AccessTokenEntity.createAccessTokenEntity = function (homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, cryptoUtils, refreshOn, tokenType, oboAssertion, keyId) {
|
|
3880
3968
|
var _a;
|
|
3881
3969
|
var atEntity = new AccessTokenEntity();
|
|
3882
3970
|
atEntity.homeAccountId = homeAccountId;
|
|
@@ -3899,15 +3987,21 @@ var AccessTokenEntity = /** @class */ (function (_super) {
|
|
|
3899
3987
|
atEntity.target = scopes;
|
|
3900
3988
|
atEntity.oboAssertion = oboAssertion;
|
|
3901
3989
|
atEntity.tokenType = StringUtils.isEmpty(tokenType) ? exports.AuthenticationScheme.BEARER : tokenType;
|
|
3902
|
-
// Create Access Token With
|
|
3903
|
-
if (atEntity.tokenType
|
|
3990
|
+
// Create Access Token With Auth Scheme instead of regular access token
|
|
3991
|
+
if (atEntity.tokenType !== exports.AuthenticationScheme.BEARER) {
|
|
3904
3992
|
atEntity.credentialType = exports.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3993
|
+
switch (atEntity.tokenType) {
|
|
3994
|
+
case exports.AuthenticationScheme.POP:
|
|
3995
|
+
// Make sure keyId is present and add it to credential
|
|
3996
|
+
var tokenClaims = AuthToken.extractTokenClaims(accessToken, cryptoUtils);
|
|
3997
|
+
if (!((_a = tokenClaims === null || tokenClaims === void 0 ? void 0 : tokenClaims.cnf) === null || _a === void 0 ? void 0 : _a.kid)) {
|
|
3998
|
+
throw ClientAuthError.createTokenClaimsRequiredError();
|
|
3999
|
+
}
|
|
4000
|
+
atEntity.keyId = tokenClaims.cnf.kid;
|
|
4001
|
+
break;
|
|
4002
|
+
case exports.AuthenticationScheme.SSH:
|
|
4003
|
+
atEntity.keyId = keyId;
|
|
3909
4004
|
}
|
|
3910
|
-
atEntity.keyId = tokenClaims.cnf.kid;
|
|
3911
4005
|
}
|
|
3912
4006
|
return atEntity;
|
|
3913
4007
|
};
|
|
@@ -4001,9 +4095,9 @@ var RefreshTokenEntity = /** @class */ (function (_super) {
|
|
|
4001
4095
|
* Licensed under the MIT License.
|
|
4002
4096
|
*/
|
|
4003
4097
|
/**
|
|
4004
|
-
*
|
|
4098
|
+
* InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required
|
|
4005
4099
|
*/
|
|
4006
|
-
var
|
|
4100
|
+
var InteractionRequiredServerErrorMessage = [
|
|
4007
4101
|
"interaction_required",
|
|
4008
4102
|
"consent_required",
|
|
4009
4103
|
"login_required"
|
|
@@ -4016,7 +4110,16 @@ var InteractionRequiredAuthSubErrorMessage = [
|
|
|
4016
4110
|
"consent_required"
|
|
4017
4111
|
];
|
|
4018
4112
|
/**
|
|
4019
|
-
*
|
|
4113
|
+
* Interaction required errors defined by the SDK
|
|
4114
|
+
*/
|
|
4115
|
+
var InteractionRequiredAuthErrorMessage = {
|
|
4116
|
+
noTokensFoundError: {
|
|
4117
|
+
code: "no_tokens_found",
|
|
4118
|
+
desc: "No refresh token found in the cache. Please sign-in."
|
|
4119
|
+
}
|
|
4120
|
+
};
|
|
4121
|
+
/**
|
|
4122
|
+
* Error thrown when user interaction is required.
|
|
4020
4123
|
*/
|
|
4021
4124
|
var InteractionRequiredAuthError = /** @class */ (function (_super) {
|
|
4022
4125
|
__extends(InteractionRequiredAuthError, _super);
|
|
@@ -4026,16 +4129,28 @@ var InteractionRequiredAuthError = /** @class */ (function (_super) {
|
|
|
4026
4129
|
Object.setPrototypeOf(_this, InteractionRequiredAuthError.prototype);
|
|
4027
4130
|
return _this;
|
|
4028
4131
|
}
|
|
4132
|
+
/**
|
|
4133
|
+
* Helper function used to determine if an error thrown by the server requires interaction to resolve
|
|
4134
|
+
* @param errorCode
|
|
4135
|
+
* @param errorString
|
|
4136
|
+
* @param subError
|
|
4137
|
+
*/
|
|
4029
4138
|
InteractionRequiredAuthError.isInteractionRequiredError = function (errorCode, errorString, subError) {
|
|
4030
|
-
var isInteractionRequiredErrorCode = !!errorCode &&
|
|
4139
|
+
var isInteractionRequiredErrorCode = !!errorCode && InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;
|
|
4031
4140
|
var isInteractionRequiredSubError = !!subError && InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;
|
|
4032
|
-
var isInteractionRequiredErrorDesc = !!errorString &&
|
|
4141
|
+
var isInteractionRequiredErrorDesc = !!errorString && InteractionRequiredServerErrorMessage.some(function (irErrorCode) {
|
|
4033
4142
|
return errorString.indexOf(irErrorCode) > -1;
|
|
4034
4143
|
});
|
|
4035
4144
|
return isInteractionRequiredErrorCode || isInteractionRequiredErrorDesc || isInteractionRequiredSubError;
|
|
4036
4145
|
};
|
|
4146
|
+
/**
|
|
4147
|
+
* Creates an error thrown when the authorization code required for a token request is null or empty.
|
|
4148
|
+
*/
|
|
4149
|
+
InteractionRequiredAuthError.createNoTokensFoundError = function () {
|
|
4150
|
+
return new InteractionRequiredAuthError(InteractionRequiredAuthErrorMessage.noTokensFoundError.code, InteractionRequiredAuthErrorMessage.noTokensFoundError.desc);
|
|
4151
|
+
};
|
|
4037
4152
|
return InteractionRequiredAuthError;
|
|
4038
|
-
}(
|
|
4153
|
+
}(AuthError));
|
|
4039
4154
|
|
|
4040
4155
|
/*
|
|
4041
4156
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4377,14 +4492,14 @@ var PopTokenGenerator = /** @class */ (function () {
|
|
|
4377
4492
|
};
|
|
4378
4493
|
PopTokenGenerator.prototype.signPayload = function (payload, kid, request, claims) {
|
|
4379
4494
|
return __awaiter(this, void 0, void 0, function () {
|
|
4380
|
-
var resourceRequestMethod, resourceRequestUri, shrClaims, resourceUrlString, resourceUrlComponents;
|
|
4495
|
+
var resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, resourceUrlString, resourceUrlComponents;
|
|
4381
4496
|
return __generator(this, function (_a) {
|
|
4382
4497
|
switch (_a.label) {
|
|
4383
4498
|
case 0:
|
|
4384
|
-
resourceRequestMethod = request.resourceRequestMethod, resourceRequestUri = request.resourceRequestUri, shrClaims = request.shrClaims;
|
|
4499
|
+
resourceRequestMethod = request.resourceRequestMethod, resourceRequestUri = request.resourceRequestUri, shrClaims = request.shrClaims, shrNonce = request.shrNonce;
|
|
4385
4500
|
resourceUrlString = (resourceRequestUri) ? new UrlString(resourceRequestUri) : undefined;
|
|
4386
4501
|
resourceUrlComponents = resourceUrlString === null || resourceUrlString === void 0 ? void 0 : resourceUrlString.getUrlComponents();
|
|
4387
|
-
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: 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)];
|
|
4502
|
+
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)];
|
|
4388
4503
|
case 1: return [2 /*return*/, _a.sent()];
|
|
4389
4504
|
}
|
|
4390
4505
|
});
|
|
@@ -4575,6 +4690,8 @@ var ResponseHandler = /** @class */ (function () {
|
|
|
4575
4690
|
if (!!authCodePayload && !!authCodePayload.state) {
|
|
4576
4691
|
requestStateObj = ProtocolUtils.parseRequestState(this.cryptoObj, authCodePayload.state);
|
|
4577
4692
|
}
|
|
4693
|
+
// Add keyId from request to serverTokenResponse if defined
|
|
4694
|
+
serverTokenResponse.key_id = serverTokenResponse.key_id || request.sshKid || undefined;
|
|
4578
4695
|
cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, idTokenObj, request.scopes, oboAssertion, authCodePayload);
|
|
4579
4696
|
_a.label = 1;
|
|
4580
4697
|
case 1:
|
|
@@ -4651,7 +4768,7 @@ var ResponseHandler = /** @class */ (function () {
|
|
|
4651
4768
|
var extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn;
|
|
4652
4769
|
var refreshOnSeconds = refreshIn && refreshIn > 0 ? reqTimestamp + refreshIn : undefined;
|
|
4653
4770
|
// non AAD scenarios can have empty realm
|
|
4654
|
-
cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token || Constants.EMPTY_STRING, this.clientId, idTokenObj ? idTokenObj.claims.tid || Constants.EMPTY_STRING : authority.tenant, responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj, refreshOnSeconds, serverTokenResponse.token_type, oboAssertion);
|
|
4771
|
+
cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token || Constants.EMPTY_STRING, this.clientId, idTokenObj ? idTokenObj.claims.tid || Constants.EMPTY_STRING : authority.tenant, responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj, refreshOnSeconds, serverTokenResponse.token_type, oboAssertion, serverTokenResponse.key_id);
|
|
4655
4772
|
}
|
|
4656
4773
|
// refreshToken
|
|
4657
4774
|
var cachedRefreshToken = null;
|
|
@@ -4869,7 +4986,9 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
|
4869
4986
|
authenticationScheme: request.authenticationScheme,
|
|
4870
4987
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
4871
4988
|
resourceRequestUri: request.resourceRequestUri,
|
|
4872
|
-
shrClaims: request.shrClaims
|
|
4989
|
+
shrClaims: request.shrClaims,
|
|
4990
|
+
sshJwk: request.sshJwk,
|
|
4991
|
+
sshKid: request.sshKid
|
|
4873
4992
|
};
|
|
4874
4993
|
return [4 /*yield*/, this.createTokenRequestBody(request)];
|
|
4875
4994
|
case 1:
|
|
@@ -4950,8 +5069,18 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
|
4950
5069
|
case 1:
|
|
4951
5070
|
cnfString = _a.sent();
|
|
4952
5071
|
parameterBuilder.addPopToken(cnfString);
|
|
4953
|
-
|
|
5072
|
+
return [3 /*break*/, 3];
|
|
4954
5073
|
case 2:
|
|
5074
|
+
if (request.authenticationScheme === exports.AuthenticationScheme.SSH) {
|
|
5075
|
+
if (request.sshJwk) {
|
|
5076
|
+
parameterBuilder.addSshJwk(request.sshJwk);
|
|
5077
|
+
}
|
|
5078
|
+
else {
|
|
5079
|
+
throw ClientConfigurationError.createMissingSshJwkError();
|
|
5080
|
+
}
|
|
5081
|
+
}
|
|
5082
|
+
_a.label = 3;
|
|
5083
|
+
case 3:
|
|
4955
5084
|
correlationId = request.correlationId || this.config.cryptoInterface.createNewGuid();
|
|
4956
5085
|
parameterBuilder.addCorrelationId(correlationId);
|
|
4957
5086
|
if (!StringUtils.isEmptyObj(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {
|
|
@@ -5026,7 +5155,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
|
5026
5155
|
if (request.domainHint) {
|
|
5027
5156
|
parameterBuilder.addDomainHint(request.domainHint);
|
|
5028
5157
|
}
|
|
5029
|
-
// Add sid or loginHint with preference for sid -> loginHint -> username of AccountInfo object
|
|
5158
|
+
// Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object
|
|
5030
5159
|
if (request.prompt !== PromptValue.SELECT_ACCOUNT) {
|
|
5031
5160
|
// AAD will throw if prompt=select_account is passed with an account hint
|
|
5032
5161
|
if (request.sid && request.prompt === PromptValue.NONE) {
|
|
@@ -5036,9 +5165,24 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
|
5036
5165
|
}
|
|
5037
5166
|
else if (request.account) {
|
|
5038
5167
|
var accountSid = this.extractAccountSid(request.account);
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5168
|
+
var accountLoginHintClaim = this.extractLoginHint(request.account);
|
|
5169
|
+
// If login_hint claim is present, use it over sid/username
|
|
5170
|
+
if (accountLoginHintClaim) {
|
|
5171
|
+
this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account");
|
|
5172
|
+
parameterBuilder.addLoginHint(accountLoginHintClaim);
|
|
5173
|
+
try {
|
|
5174
|
+
var clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);
|
|
5175
|
+
parameterBuilder.addCcsOid(clientInfo);
|
|
5176
|
+
}
|
|
5177
|
+
catch (e) {
|
|
5178
|
+
this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5181
|
+
else if (accountSid && request.prompt === PromptValue.NONE) {
|
|
5182
|
+
/*
|
|
5183
|
+
* If account and loginHint are provided, we will check account first for sid before adding loginHint
|
|
5184
|
+
* SessionId is only used in silent calls
|
|
5185
|
+
*/
|
|
5042
5186
|
this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account");
|
|
5043
5187
|
parameterBuilder.addSid(accountSid);
|
|
5044
5188
|
try {
|
|
@@ -5046,7 +5190,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
|
5046
5190
|
parameterBuilder.addCcsOid(clientInfo);
|
|
5047
5191
|
}
|
|
5048
5192
|
catch (e) {
|
|
5049
|
-
this.logger.verbose("Could not parse home account ID for CCS Header
|
|
5193
|
+
this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
|
|
5050
5194
|
}
|
|
5051
5195
|
}
|
|
5052
5196
|
else if (request.loginHint) {
|
|
@@ -5063,7 +5207,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
|
5063
5207
|
parameterBuilder.addCcsOid(clientInfo);
|
|
5064
5208
|
}
|
|
5065
5209
|
catch (e) {
|
|
5066
|
-
this.logger.verbose("Could not parse home account ID for CCS Header
|
|
5210
|
+
this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
|
|
5067
5211
|
}
|
|
5068
5212
|
}
|
|
5069
5213
|
}
|
|
@@ -5118,11 +5262,12 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
|
5118
5262
|
* @param account
|
|
5119
5263
|
*/
|
|
5120
5264
|
AuthorizationCodeClient.prototype.extractAccountSid = function (account) {
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5265
|
+
var _a;
|
|
5266
|
+
return ((_a = account.idTokenClaims) === null || _a === void 0 ? void 0 : _a["sid"]) || null;
|
|
5267
|
+
};
|
|
5268
|
+
AuthorizationCodeClient.prototype.extractLoginHint = function (account) {
|
|
5269
|
+
var _a;
|
|
5270
|
+
return ((_a = account.idTokenClaims) === null || _a === void 0 ? void 0 : _a["login_hint"]) || null;
|
|
5126
5271
|
};
|
|
5127
5272
|
return AuthorizationCodeClient;
|
|
5128
5273
|
}(BaseClient));
|
|
@@ -5183,7 +5328,9 @@ var DeviceCodeClient = /** @class */ (function (_super) {
|
|
|
5183
5328
|
authenticationScheme: request.authenticationScheme,
|
|
5184
5329
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
5185
5330
|
resourceRequestUri: request.resourceRequestUri,
|
|
5186
|
-
shrClaims: request.shrClaims
|
|
5331
|
+
shrClaims: request.shrClaims,
|
|
5332
|
+
sshJwk: request.sshJwk,
|
|
5333
|
+
sshKid: request.sshKid
|
|
5187
5334
|
};
|
|
5188
5335
|
return [2 /*return*/, this.executePostRequestToDeviceCodeEndpoint(this.authority.deviceCodeEndpoint, queryString, headers, thumbprint)];
|
|
5189
5336
|
});
|
|
@@ -5280,7 +5427,9 @@ var DeviceCodeClient = /** @class */ (function (_super) {
|
|
|
5280
5427
|
authenticationScheme: request.authenticationScheme,
|
|
5281
5428
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
5282
5429
|
resourceRequestUri: request.resourceRequestUri,
|
|
5283
|
-
shrClaims: request.shrClaims
|
|
5430
|
+
shrClaims: request.shrClaims,
|
|
5431
|
+
sshJwk: request.sshJwk,
|
|
5432
|
+
sshKid: request.sshKid
|
|
5284
5433
|
};
|
|
5285
5434
|
return [4 /*yield*/, this.executePostToTokenEndpoint(this.authority.tokenEndpoint, requestBody, headers, thumbprint)];
|
|
5286
5435
|
case 2:
|
|
@@ -5386,7 +5535,7 @@ var RefreshTokenClient = /** @class */ (function (_super) {
|
|
|
5386
5535
|
return [2 /*return*/, this.acquireTokenWithCachedRefreshToken(request, true)];
|
|
5387
5536
|
}
|
|
5388
5537
|
catch (e) {
|
|
5389
|
-
noFamilyRTInCache = e instanceof
|
|
5538
|
+
noFamilyRTInCache = e instanceof InteractionRequiredAuthError && e.errorCode === InteractionRequiredAuthErrorMessage.noTokensFoundError.code;
|
|
5390
5539
|
clientMismatchErrorWithFamilyRT = e instanceof ServerError && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
5391
5540
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
5392
5541
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
@@ -5414,7 +5563,7 @@ var RefreshTokenClient = /** @class */ (function (_super) {
|
|
|
5414
5563
|
refreshToken = this.cacheManager.readRefreshTokenFromCache(this.config.authOptions.clientId, request.account, foci);
|
|
5415
5564
|
// no refresh Token
|
|
5416
5565
|
if (!refreshToken) {
|
|
5417
|
-
throw
|
|
5566
|
+
throw InteractionRequiredAuthError.createNoTokensFoundError();
|
|
5418
5567
|
}
|
|
5419
5568
|
refreshTokenRequest = __assign(__assign({}, request), { refreshToken: refreshToken.secret, authenticationScheme: request.authenticationScheme || exports.AuthenticationScheme.BEARER, ccsCredential: {
|
|
5420
5569
|
credential: request.account.homeAccountId,
|
|
@@ -5446,7 +5595,9 @@ var RefreshTokenClient = /** @class */ (function (_super) {
|
|
|
5446
5595
|
authenticationScheme: request.authenticationScheme,
|
|
5447
5596
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
5448
5597
|
resourceRequestUri: request.resourceRequestUri,
|
|
5449
|
-
shrClaims: request.shrClaims
|
|
5598
|
+
shrClaims: request.shrClaims,
|
|
5599
|
+
sshJwk: request.sshJwk,
|
|
5600
|
+
sshKid: request.sshKid
|
|
5450
5601
|
};
|
|
5451
5602
|
endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParameters);
|
|
5452
5603
|
return [2 /*return*/, this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint)];
|
|
@@ -5471,9 +5622,9 @@ var RefreshTokenClient = /** @class */ (function (_super) {
|
|
|
5471
5622
|
*/
|
|
5472
5623
|
RefreshTokenClient.prototype.createTokenRequestBody = function (request) {
|
|
5473
5624
|
return __awaiter(this, void 0, void 0, function () {
|
|
5474
|
-
var parameterBuilder, correlationId, clientAssertion, popTokenGenerator,
|
|
5475
|
-
return __generator(this, function (
|
|
5476
|
-
switch (
|
|
5625
|
+
var parameterBuilder, correlationId, clientAssertion, popTokenGenerator, cnfString, clientInfo;
|
|
5626
|
+
return __generator(this, function (_a) {
|
|
5627
|
+
switch (_a.label) {
|
|
5477
5628
|
case 0:
|
|
5478
5629
|
parameterBuilder = new RequestParameterBuilder();
|
|
5479
5630
|
parameterBuilder.addClientId(this.config.authOptions.clientId);
|
|
@@ -5498,12 +5649,22 @@ var RefreshTokenClient = /** @class */ (function (_super) {
|
|
|
5498
5649
|
}
|
|
5499
5650
|
if (!(request.authenticationScheme === exports.AuthenticationScheme.POP)) return [3 /*break*/, 2];
|
|
5500
5651
|
popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
|
|
5501
|
-
_b = (_a = parameterBuilder).addPopToken;
|
|
5502
5652
|
return [4 /*yield*/, popTokenGenerator.generateCnf(request)];
|
|
5503
5653
|
case 1:
|
|
5504
|
-
|
|
5505
|
-
|
|
5654
|
+
cnfString = _a.sent();
|
|
5655
|
+
parameterBuilder.addPopToken(cnfString);
|
|
5656
|
+
return [3 /*break*/, 3];
|
|
5506
5657
|
case 2:
|
|
5658
|
+
if (request.authenticationScheme === exports.AuthenticationScheme.SSH) {
|
|
5659
|
+
if (request.sshJwk) {
|
|
5660
|
+
parameterBuilder.addSshJwk(request.sshJwk);
|
|
5661
|
+
}
|
|
5662
|
+
else {
|
|
5663
|
+
throw ClientConfigurationError.createMissingSshJwkError();
|
|
5664
|
+
}
|
|
5665
|
+
}
|
|
5666
|
+
_a.label = 3;
|
|
5667
|
+
case 3:
|
|
5507
5668
|
if (!StringUtils.isEmptyObj(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {
|
|
5508
5669
|
parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
|
|
5509
5670
|
}
|
|
@@ -5642,7 +5803,9 @@ var ClientCredentialClient = /** @class */ (function (_super) {
|
|
|
5642
5803
|
authenticationScheme: request.authenticationScheme,
|
|
5643
5804
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
5644
5805
|
resourceRequestUri: request.resourceRequestUri,
|
|
5645
|
-
shrClaims: request.shrClaims
|
|
5806
|
+
shrClaims: request.shrClaims,
|
|
5807
|
+
sshJwk: request.sshJwk,
|
|
5808
|
+
sshKid: request.sshKid
|
|
5646
5809
|
};
|
|
5647
5810
|
reqTimestamp = TimeUtils.nowSeconds();
|
|
5648
5811
|
return [4 /*yield*/, this.executePostToTokenEndpoint(authority.tokenEndpoint, requestBody, headers, thumbprint)];
|
|
@@ -5841,7 +6004,9 @@ var OnBehalfOfClient = /** @class */ (function (_super) {
|
|
|
5841
6004
|
authenticationScheme: request.authenticationScheme,
|
|
5842
6005
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
5843
6006
|
resourceRequestUri: request.resourceRequestUri,
|
|
5844
|
-
shrClaims: request.shrClaims
|
|
6007
|
+
shrClaims: request.shrClaims,
|
|
6008
|
+
sshJwk: request.sshJwk,
|
|
6009
|
+
sshKid: request.sshKid
|
|
5845
6010
|
};
|
|
5846
6011
|
reqTimestamp = TimeUtils.nowSeconds();
|
|
5847
6012
|
return [4 /*yield*/, this.executePostToTokenEndpoint(authority.tokenEndpoint, requestBody, headers, thumbprint)];
|
|
@@ -5941,6 +6106,17 @@ var SilentFlowClient = /** @class */ (function (_super) {
|
|
|
5941
6106
|
if (!request) {
|
|
5942
6107
|
throw ClientConfigurationError.createEmptyTokenRequestError();
|
|
5943
6108
|
}
|
|
6109
|
+
if (request.forceRefresh) {
|
|
6110
|
+
// Must refresh due to present force_refresh flag.
|
|
6111
|
+
(_a = this.serverTelemetryManager) === null || _a === void 0 ? void 0 : _a.setCacheOutcome(CacheOutcome.FORCE_REFRESH);
|
|
6112
|
+
this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true.");
|
|
6113
|
+
throw ClientAuthError.createRefreshRequiredError();
|
|
6114
|
+
}
|
|
6115
|
+
else if (!StringUtils.isEmptyObj(request.claims)) {
|
|
6116
|
+
// Must refresh due to request parameters.
|
|
6117
|
+
this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because claims are requested.");
|
|
6118
|
+
throw ClientAuthError.createRefreshRequiredError();
|
|
6119
|
+
}
|
|
5944
6120
|
// We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases
|
|
5945
6121
|
if (!request.account) {
|
|
5946
6122
|
throw ClientAuthError.createNoAccountInSilentRequestError();
|
|
@@ -5948,30 +6124,24 @@ var SilentFlowClient = /** @class */ (function (_super) {
|
|
|
5948
6124
|
requestScopes = new ScopeSet(request.scopes || []);
|
|
5949
6125
|
environment = request.authority || this.authority.getPreferredCache();
|
|
5950
6126
|
authScheme = request.authenticationScheme || exports.AuthenticationScheme.BEARER;
|
|
5951
|
-
cacheRecord = this.cacheManager.readCacheRecord(request.account, this.config.authOptions.clientId, requestScopes, environment, authScheme);
|
|
5952
|
-
if (
|
|
5953
|
-
// Must refresh due to present force_refresh flag.
|
|
5954
|
-
(_a = this.serverTelemetryManager) === null || _a === void 0 ? void 0 : _a.setCacheOutcome(CacheOutcome.FORCE_REFRESH);
|
|
5955
|
-
throw ClientAuthError.createRefreshRequiredError();
|
|
5956
|
-
}
|
|
5957
|
-
else if (!cacheRecord.accessToken) {
|
|
6127
|
+
cacheRecord = this.cacheManager.readCacheRecord(request.account, this.config.authOptions.clientId, requestScopes, environment, authScheme, request.sshKid);
|
|
6128
|
+
if (!cacheRecord.accessToken) {
|
|
5958
6129
|
// Must refresh due to non-existent access_token.
|
|
5959
6130
|
(_b = this.serverTelemetryManager) === null || _b === void 0 ? void 0 : _b.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN);
|
|
6131
|
+
this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties.");
|
|
5960
6132
|
throw ClientAuthError.createRefreshRequiredError();
|
|
5961
6133
|
}
|
|
5962
6134
|
else if (TimeUtils.wasClockTurnedBack(cacheRecord.accessToken.cachedAt) ||
|
|
5963
6135
|
TimeUtils.isTokenExpired(cacheRecord.accessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) {
|
|
5964
6136
|
// Must refresh due to expired access_token.
|
|
5965
6137
|
(_c = this.serverTelemetryManager) === null || _c === void 0 ? void 0 : _c.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED);
|
|
6138
|
+
this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within " + this.config.systemOptions.tokenRenewalOffsetSeconds + " seconds.");
|
|
5966
6139
|
throw ClientAuthError.createRefreshRequiredError();
|
|
5967
6140
|
}
|
|
5968
6141
|
else if (cacheRecord.accessToken.refreshOn && TimeUtils.isTokenExpired(cacheRecord.accessToken.refreshOn, 0)) {
|
|
5969
6142
|
// Must refresh due to the refresh_in value.
|
|
5970
6143
|
(_d = this.serverTelemetryManager) === null || _d === void 0 ? void 0 : _d.setCacheOutcome(CacheOutcome.REFRESH_CACHED_ACCESS_TOKEN);
|
|
5971
|
-
|
|
5972
|
-
}
|
|
5973
|
-
else if (!StringUtils.isEmptyObj(request.claims)) {
|
|
5974
|
-
// Must refresh due to request parameters.
|
|
6144
|
+
this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'.");
|
|
5975
6145
|
throw ClientAuthError.createRefreshRequiredError();
|
|
5976
6146
|
}
|
|
5977
6147
|
if (this.config.serverTelemetryManager) {
|
|
@@ -6059,7 +6229,9 @@ var UsernamePasswordClient = /** @class */ (function (_super) {
|
|
|
6059
6229
|
authenticationScheme: request.authenticationScheme,
|
|
6060
6230
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
6061
6231
|
resourceRequestUri: request.resourceRequestUri,
|
|
6062
|
-
shrClaims: request.shrClaims
|
|
6232
|
+
shrClaims: request.shrClaims,
|
|
6233
|
+
sshJwk: request.sshJwk,
|
|
6234
|
+
sshKid: request.sshKid
|
|
6063
6235
|
};
|
|
6064
6236
|
requestBody = this.createTokenRequestBody(request);
|
|
6065
6237
|
headers = this.createTokenRequestHeaders({
|
|
@@ -6115,7 +6287,6 @@ var UsernamePasswordClient = /** @class */ (function (_super) {
|
|
|
6115
6287
|
function isOpenIdConfigResponse(response) {
|
|
6116
6288
|
return (response.hasOwnProperty("authorization_endpoint") &&
|
|
6117
6289
|
response.hasOwnProperty("token_endpoint") &&
|
|
6118
|
-
response.hasOwnProperty("end_session_endpoint") &&
|
|
6119
6290
|
response.hasOwnProperty("issuer"));
|
|
6120
6291
|
}
|
|
6121
6292
|
|
|
@@ -6197,7 +6368,6 @@ var AuthorityMetadataEntity = /** @class */ (function () {
|
|
|
6197
6368
|
entity.hasOwnProperty("canonical_authority") &&
|
|
6198
6369
|
entity.hasOwnProperty("authorization_endpoint") &&
|
|
6199
6370
|
entity.hasOwnProperty("token_endpoint") &&
|
|
6200
|
-
entity.hasOwnProperty("end_session_endpoint") &&
|
|
6201
6371
|
entity.hasOwnProperty("issuer") &&
|
|
6202
6372
|
entity.hasOwnProperty("aliasesFromNetwork") &&
|
|
6203
6373
|
entity.hasOwnProperty("endpointsFromNetwork") &&
|
|
@@ -6479,6 +6649,10 @@ var Authority = /** @class */ (function () {
|
|
|
6479
6649
|
*/
|
|
6480
6650
|
get: function () {
|
|
6481
6651
|
if (this.discoveryComplete()) {
|
|
6652
|
+
// ROPC policies may not have end_session_endpoint set
|
|
6653
|
+
if (!this.metadata.end_session_endpoint) {
|
|
6654
|
+
throw ClientAuthError.createLogoutNotSupportedError();
|
|
6655
|
+
}
|
|
6482
6656
|
var endpoint = this.replacePath(this.metadata.end_session_endpoint);
|
|
6483
6657
|
return this.replaceTenant(endpoint);
|
|
6484
6658
|
}
|
|
@@ -6879,7 +7053,9 @@ var Authority = /** @class */ (function () {
|
|
|
6879
7053
|
metadata.authorization_endpoint = Authority.buildRegionalAuthorityString(metadata.authorization_endpoint, azureRegion);
|
|
6880
7054
|
// TODO: Enquire on whether we should leave the query string or remove it before releasing the feature
|
|
6881
7055
|
metadata.token_endpoint = Authority.buildRegionalAuthorityString(metadata.token_endpoint, azureRegion, "allowestsrnonmsi=true");
|
|
6882
|
-
|
|
7056
|
+
if (metadata.end_session_endpoint) {
|
|
7057
|
+
metadata.end_session_endpoint = Authority.buildRegionalAuthorityString(metadata.end_session_endpoint, azureRegion);
|
|
7058
|
+
}
|
|
6883
7059
|
return metadata;
|
|
6884
7060
|
};
|
|
6885
7061
|
return Authority;
|
|
@@ -7174,12 +7350,70 @@ var ServerTelemetryManager = /** @class */ (function () {
|
|
|
7174
7350
|
return ServerTelemetryManager;
|
|
7175
7351
|
}());
|
|
7176
7352
|
|
|
7353
|
+
/*
|
|
7354
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7355
|
+
* Licensed under the MIT License.
|
|
7356
|
+
*/
|
|
7357
|
+
/**
|
|
7358
|
+
* This is a helper class that parses supported HTTP response authentication headers to extract and return
|
|
7359
|
+
* header challenge values that can be used outside the basic authorization flows.
|
|
7360
|
+
*/
|
|
7361
|
+
var AuthenticationHeaderParser = /** @class */ (function () {
|
|
7362
|
+
function AuthenticationHeaderParser(headers) {
|
|
7363
|
+
this.headers = headers;
|
|
7364
|
+
}
|
|
7365
|
+
/**
|
|
7366
|
+
* This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.
|
|
7367
|
+
* @returns
|
|
7368
|
+
*/
|
|
7369
|
+
AuthenticationHeaderParser.prototype.getShrNonce = function () {
|
|
7370
|
+
// Attempt to parse nonce from Authentiacation-Info
|
|
7371
|
+
var authenticationInfo = this.headers[HeaderNames.AuthenticationInfo];
|
|
7372
|
+
if (authenticationInfo) {
|
|
7373
|
+
var authenticationInfoChallenges = this.parseChallenges(authenticationInfo);
|
|
7374
|
+
if (authenticationInfoChallenges.nextnonce) {
|
|
7375
|
+
return authenticationInfoChallenges.nextnonce;
|
|
7376
|
+
}
|
|
7377
|
+
throw ClientConfigurationError.createInvalidAuthenticationHeaderError(HeaderNames.AuthenticationInfo, "nextnonce challenge is missing.");
|
|
7378
|
+
}
|
|
7379
|
+
// Attempt to parse nonce from WWW-Authenticate
|
|
7380
|
+
var wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate];
|
|
7381
|
+
if (wwwAuthenticate) {
|
|
7382
|
+
var wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate);
|
|
7383
|
+
if (wwwAuthenticateChallenges.nonce) {
|
|
7384
|
+
return wwwAuthenticateChallenges.nonce;
|
|
7385
|
+
}
|
|
7386
|
+
throw ClientConfigurationError.createInvalidAuthenticationHeaderError(HeaderNames.WWWAuthenticate, "nonce challenge is missing.");
|
|
7387
|
+
}
|
|
7388
|
+
// If neither header is present, throw missing headers error
|
|
7389
|
+
throw ClientConfigurationError.createMissingNonceAuthenticationHeadersError();
|
|
7390
|
+
};
|
|
7391
|
+
/**
|
|
7392
|
+
* Parses an HTTP header's challenge set into a key/value map.
|
|
7393
|
+
* @param header
|
|
7394
|
+
* @returns
|
|
7395
|
+
*/
|
|
7396
|
+
AuthenticationHeaderParser.prototype.parseChallenges = function (header) {
|
|
7397
|
+
var schemeSeparator = header.indexOf(" ");
|
|
7398
|
+
var challenges = header.substr(schemeSeparator + 1).split(",");
|
|
7399
|
+
var challengeMap = {};
|
|
7400
|
+
challenges.forEach(function (challenge) {
|
|
7401
|
+
var _a = challenge.split("="), key = _a[0], value = _a[1];
|
|
7402
|
+
// Remove escaped quotation marks (', ") from challenge string to keep only the challenge value
|
|
7403
|
+
challengeMap[key] = unescape(value.replace(/['"]+/g, ""));
|
|
7404
|
+
});
|
|
7405
|
+
return challengeMap;
|
|
7406
|
+
};
|
|
7407
|
+
return AuthenticationHeaderParser;
|
|
7408
|
+
}());
|
|
7409
|
+
|
|
7177
7410
|
exports.AccessTokenEntity = AccessTokenEntity;
|
|
7178
7411
|
exports.AccountEntity = AccountEntity;
|
|
7179
7412
|
exports.AppMetadataEntity = AppMetadataEntity;
|
|
7180
7413
|
exports.AuthError = AuthError;
|
|
7181
7414
|
exports.AuthErrorMessage = AuthErrorMessage;
|
|
7182
7415
|
exports.AuthToken = AuthToken;
|
|
7416
|
+
exports.AuthenticationHeaderParser = AuthenticationHeaderParser;
|
|
7183
7417
|
exports.Authority = Authority;
|
|
7184
7418
|
exports.AuthorityFactory = AuthorityFactory;
|
|
7185
7419
|
exports.AuthorityMetadataEntity = AuthorityMetadataEntity;
|
|
@@ -7199,6 +7433,7 @@ exports.DeviceCodeClient = DeviceCodeClient;
|
|
|
7199
7433
|
exports.IdToken = AuthToken;
|
|
7200
7434
|
exports.IdTokenEntity = IdTokenEntity;
|
|
7201
7435
|
exports.InteractionRequiredAuthError = InteractionRequiredAuthError;
|
|
7436
|
+
exports.InteractionRequiredAuthErrorMessage = InteractionRequiredAuthErrorMessage;
|
|
7202
7437
|
exports.Logger = Logger;
|
|
7203
7438
|
exports.NetworkManager = NetworkManager;
|
|
7204
7439
|
exports.OIDC_DEFAULT_SCOPES = OIDC_DEFAULT_SCOPES;
|
|
@@ -7221,4 +7456,5 @@ exports.TimeUtils = TimeUtils;
|
|
|
7221
7456
|
exports.TokenCacheContext = TokenCacheContext;
|
|
7222
7457
|
exports.UrlString = UrlString;
|
|
7223
7458
|
exports.UsernamePasswordClient = UsernamePasswordClient;
|
|
7459
|
+
exports.version = version;
|
|
7224
7460
|
//# sourceMappingURL=index.cjs.js.map
|