@azure/msal-common 0.0.1-alpha.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/LICENSE +21 -0
- package/README.md +62 -0
- package/dist/_virtual/_tslib.js +90 -0
- package/dist/_virtual/_tslib.js.map +1 -0
- package/dist/account/AccountInfo.d.ts +30 -0
- package/dist/account/AccountInfo.d.ts.map +1 -0
- package/dist/account/AuthToken.d.ts +17 -0
- package/dist/account/AuthToken.d.ts.map +1 -0
- package/dist/account/AuthToken.js +43 -0
- package/dist/account/AuthToken.js.map +1 -0
- package/dist/account/CcsCredential.d.ts +9 -0
- package/dist/account/CcsCredential.d.ts.map +1 -0
- package/dist/account/CcsCredential.js +14 -0
- package/dist/account/CcsCredential.js.map +1 -0
- package/dist/account/ClientCredentials.d.ts +15 -0
- package/dist/account/ClientCredentials.d.ts.map +1 -0
- package/dist/account/ClientInfo.d.ts +20 -0
- package/dist/account/ClientInfo.d.ts.map +1 -0
- package/dist/account/ClientInfo.js +44 -0
- package/dist/account/ClientInfo.js.map +1 -0
- package/dist/account/DecodedAuthToken.d.ts +9 -0
- package/dist/account/DecodedAuthToken.d.ts.map +1 -0
- package/dist/account/TokenClaims.d.ts +60 -0
- package/dist/account/TokenClaims.d.ts.map +1 -0
- package/dist/authority/Authority.d.ts +200 -0
- package/dist/authority/Authority.d.ts.map +1 -0
- package/dist/authority/Authority.js +678 -0
- package/dist/authority/Authority.js.map +1 -0
- package/dist/authority/AuthorityFactory.d.ts +29 -0
- package/dist/authority/AuthorityFactory.d.ts.map +1 -0
- package/dist/authority/AuthorityFactory.js +69 -0
- package/dist/authority/AuthorityFactory.js.map +1 -0
- package/dist/authority/AuthorityMetadata.d.ts +623 -0
- package/dist/authority/AuthorityMetadata.d.ts.map +1 -0
- package/dist/authority/AuthorityMetadata.js +12 -0
- package/dist/authority/AuthorityMetadata.js.map +1 -0
- package/dist/authority/AuthorityOptions.d.ts +19 -0
- package/dist/authority/AuthorityOptions.d.ts.map +1 -0
- package/dist/authority/AuthorityOptions.js +24 -0
- package/dist/authority/AuthorityOptions.js.map +1 -0
- package/dist/authority/AuthorityType.d.ts +8 -0
- package/dist/authority/AuthorityType.d.ts.map +1 -0
- package/dist/authority/AuthorityType.js +17 -0
- package/dist/authority/AuthorityType.js.map +1 -0
- package/dist/authority/AzureRegion.d.ts +2 -0
- package/dist/authority/AzureRegion.d.ts.map +1 -0
- package/dist/authority/AzureRegionConfiguration.d.ts +6 -0
- package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -0
- package/dist/authority/CloudDiscoveryMetadata.d.ts +6 -0
- package/dist/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
- package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
- package/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
- package/dist/authority/CloudInstanceDiscoveryResponse.js +13 -0
- package/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -0
- package/dist/authority/ImdsOptions.d.ts +7 -0
- package/dist/authority/ImdsOptions.d.ts.map +1 -0
- package/dist/authority/OpenIdConfigResponse.d.ts +12 -0
- package/dist/authority/OpenIdConfigResponse.d.ts.map +1 -0
- package/dist/authority/OpenIdConfigResponse.js +15 -0
- package/dist/authority/OpenIdConfigResponse.js.map +1 -0
- package/dist/authority/ProtocolMode.d.ts +8 -0
- package/dist/authority/ProtocolMode.d.ts.map +1 -0
- package/dist/authority/ProtocolMode.js +17 -0
- package/dist/authority/ProtocolMode.js.map +1 -0
- package/dist/authority/RegionDiscovery.d.ts +28 -0
- package/dist/authority/RegionDiscovery.d.ts.map +1 -0
- package/dist/authority/RegionDiscovery.js +127 -0
- package/dist/authority/RegionDiscovery.js.map +1 -0
- package/dist/authority/RegionDiscoveryMetadata.d.ts +7 -0
- package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
- package/dist/cache/CacheManager.d.ts +393 -0
- package/dist/cache/CacheManager.d.ts.map +1 -0
- package/dist/cache/CacheManager.js +885 -0
- package/dist/cache/CacheManager.js.map +1 -0
- package/dist/cache/entities/AccessTokenEntity.d.ts +57 -0
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -0
- package/dist/cache/entities/AccessTokenEntity.js +124 -0
- package/dist/cache/entities/AccessTokenEntity.js.map +1 -0
- package/dist/cache/entities/AccountEntity.d.ts +100 -0
- package/dist/cache/entities/AccountEntity.d.ts.map +1 -0
- package/dist/cache/entities/AccountEntity.js +243 -0
- package/dist/cache/entities/AccountEntity.js.map +1 -0
- package/dist/cache/entities/AppMetadataEntity.d.ts +40 -0
- package/dist/cache/entities/AppMetadataEntity.d.ts.map +1 -0
- package/dist/cache/entities/AppMetadataEntity.js +74 -0
- package/dist/cache/entities/AppMetadataEntity.js.map +1 -0
- package/dist/cache/entities/AuthorityMetadataEntity.d.ts +48 -0
- package/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
- package/dist/cache/entities/AuthorityMetadataEntity.js +82 -0
- package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -0
- package/dist/cache/entities/CacheRecord.d.ts +14 -0
- package/dist/cache/entities/CacheRecord.d.ts.map +1 -0
- package/dist/cache/entities/CacheRecord.js +19 -0
- package/dist/cache/entities/CacheRecord.js.map +1 -0
- package/dist/cache/entities/CredentialEntity.d.ts +94 -0
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -0
- package/dist/cache/entities/CredentialEntity.js +164 -0
- package/dist/cache/entities/CredentialEntity.js.map +1 -0
- package/dist/cache/entities/IdTokenEntity.d.ts +35 -0
- package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -0
- package/dist/cache/entities/IdTokenEntity.js +70 -0
- package/dist/cache/entities/IdTokenEntity.js.map +1 -0
- package/dist/cache/entities/RefreshTokenEntity.d.ts +37 -0
- package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
- package/dist/cache/entities/RefreshTokenEntity.js +73 -0
- package/dist/cache/entities/RefreshTokenEntity.js.map +1 -0
- package/dist/cache/entities/ServerTelemetryEntity.d.ts +13 -0
- package/dist/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
- package/dist/cache/entities/ServerTelemetryEntity.js +35 -0
- package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -0
- package/dist/cache/entities/ThrottlingEntity.d.ts +14 -0
- package/dist/cache/entities/ThrottlingEntity.d.ts.map +1 -0
- package/dist/cache/entities/ThrottlingEntity.js +32 -0
- package/dist/cache/entities/ThrottlingEntity.js.map +1 -0
- package/dist/cache/interface/ICacheManager.d.ts +157 -0
- package/dist/cache/interface/ICacheManager.d.ts.map +1 -0
- package/dist/cache/interface/ICachePlugin.d.ts +6 -0
- package/dist/cache/interface/ICachePlugin.d.ts.map +1 -0
- package/dist/cache/interface/ISerializableTokenCache.d.ts +5 -0
- package/dist/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
- package/dist/cache/persistence/TokenCacheContext.d.ts +24 -0
- package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -0
- package/dist/cache/persistence/TokenCacheContext.js +39 -0
- package/dist/cache/persistence/TokenCacheContext.js.map +1 -0
- package/dist/cache/utils/CacheTypes.d.ts +60 -0
- package/dist/cache/utils/CacheTypes.d.ts.map +1 -0
- package/dist/client/AuthorizationCodeClient.d.ts +76 -0
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -0
- package/dist/client/AuthorizationCodeClient.js +468 -0
- package/dist/client/AuthorizationCodeClient.js.map +1 -0
- package/dist/client/BaseClient.d.ts +45 -0
- package/dist/client/BaseClient.d.ts.map +1 -0
- package/dist/client/BaseClient.js +103 -0
- package/dist/client/BaseClient.js.map +1 -0
- package/dist/client/ClientCredentialClient.d.ts +39 -0
- package/dist/client/ClientCredentialClient.d.ts.map +1 -0
- package/dist/client/ClientCredentialClient.js +202 -0
- package/dist/client/ClientCredentialClient.js.map +1 -0
- package/dist/client/DeviceCodeClient.d.ts +52 -0
- package/dist/client/DeviceCodeClient.d.ts.map +1 -0
- package/dist/client/DeviceCodeClient.js +232 -0
- package/dist/client/DeviceCodeClient.js.map +1 -0
- package/dist/client/OnBehalfOfClient.d.ts +51 -0
- package/dist/client/OnBehalfOfClient.d.ts.map +1 -0
- package/dist/client/OnBehalfOfClient.js +244 -0
- package/dist/client/OnBehalfOfClient.js.map +1 -0
- package/dist/client/RefreshTokenClient.d.ts +40 -0
- package/dist/client/RefreshTokenClient.d.ts.map +1 -0
- package/dist/client/RefreshTokenClient.js +255 -0
- package/dist/client/RefreshTokenClient.js.map +1 -0
- package/dist/client/SilentFlowClient.d.ts +25 -0
- package/dist/client/SilentFlowClient.d.ts.map +1 -0
- package/dist/client/SilentFlowClient.js +128 -0
- package/dist/client/SilentFlowClient.js.map +1 -0
- package/dist/client/UsernamePasswordClient.d.ts +29 -0
- package/dist/client/UsernamePasswordClient.d.ts.map +1 -0
- package/dist/client/UsernamePasswordClient.js +120 -0
- package/dist/client/UsernamePasswordClient.js.map +1 -0
- package/dist/config/AppTokenProvider.d.ts +39 -0
- package/dist/config/AppTokenProvider.d.ts.map +1 -0
- package/dist/config/ClientConfiguration.d.ts +135 -0
- package/dist/config/ClientConfiguration.d.ts.map +1 -0
- package/dist/config/ClientConfiguration.js +105 -0
- package/dist/config/ClientConfiguration.js.map +1 -0
- package/dist/crypto/ICrypto.d.ts +63 -0
- package/dist/crypto/ICrypto.d.ts.map +1 -0
- package/dist/crypto/ICrypto.js +80 -0
- package/dist/crypto/ICrypto.js.map +1 -0
- package/dist/crypto/IGuidGenerator.d.ts +5 -0
- package/dist/crypto/IGuidGenerator.d.ts.map +1 -0
- package/dist/crypto/JoseHeader.d.ts +22 -0
- package/dist/crypto/JoseHeader.d.ts.map +1 -0
- package/dist/crypto/JoseHeader.js +45 -0
- package/dist/crypto/JoseHeader.js.map +1 -0
- package/dist/crypto/PopTokenGenerator.d.ts +56 -0
- package/dist/crypto/PopTokenGenerator.d.ts.map +1 -0
- package/dist/crypto/PopTokenGenerator.js +107 -0
- package/dist/crypto/PopTokenGenerator.js.map +1 -0
- package/dist/crypto/SignedHttpRequest.d.ts +12 -0
- package/dist/crypto/SignedHttpRequest.d.ts.map +1 -0
- package/dist/error/AuthError.d.ts +48 -0
- package/dist/error/AuthError.d.ts.map +1 -0
- package/dist/error/AuthError.js +61 -0
- package/dist/error/AuthError.js.map +1 -0
- package/dist/error/ClientAuthError.d.ts +372 -0
- package/dist/error/ClientAuthError.d.ts.map +1 -0
- package/dist/error/ClientAuthError.js +477 -0
- package/dist/error/ClientAuthError.js.map +1 -0
- package/dist/error/ClientConfigurationError.d.ts +199 -0
- package/dist/error/ClientConfigurationError.d.ts.map +1 -0
- package/dist/error/ClientConfigurationError.js +260 -0
- package/dist/error/ClientConfigurationError.js.map +1 -0
- package/dist/error/InteractionRequiredAuthError.d.ts +42 -0
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -0
- package/dist/error/InteractionRequiredAuthError.js +80 -0
- package/dist/error/InteractionRequiredAuthError.js.map +1 -0
- package/dist/error/JoseHeaderError.d.ts +29 -0
- package/dist/error/JoseHeaderError.d.ts.map +1 -0
- package/dist/error/JoseHeaderError.js +50 -0
- package/dist/error/JoseHeaderError.js.map +1 -0
- package/dist/error/ServerError.d.ts +8 -0
- package/dist/error/ServerError.d.ts.map +1 -0
- package/dist/error/ServerError.js +25 -0
- package/dist/error/ServerError.js.map +1 -0
- package/dist/index.cjs.js +8441 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/Logger.d.ts +95 -0
- package/dist/logger/Logger.d.ts.map +1 -0
- package/dist/logger/Logger.js +185 -0
- package/dist/logger/Logger.js.map +1 -0
- package/dist/network/INetworkModule.d.ts +31 -0
- package/dist/network/INetworkModule.d.ts.map +1 -0
- package/dist/network/INetworkModule.js +21 -0
- package/dist/network/INetworkModule.js.map +1 -0
- package/dist/network/NetworkManager.d.ts +21 -0
- package/dist/network/NetworkManager.d.ts.map +1 -0
- package/dist/network/NetworkManager.js +56 -0
- package/dist/network/NetworkManager.js.map +1 -0
- package/dist/network/RequestThumbprint.d.ts +17 -0
- package/dist/network/RequestThumbprint.d.ts.map +1 -0
- package/dist/network/ThrottlingUtils.d.ts +42 -0
- package/dist/network/ThrottlingUtils.d.ts.map +1 -0
- package/dist/network/ThrottlingUtils.js +101 -0
- package/dist/network/ThrottlingUtils.js.map +1 -0
- package/dist/packageMetadata.d.ts +3 -0
- package/dist/packageMetadata.d.ts.map +1 -0
- package/dist/packageMetadata.js +8 -0
- package/dist/packageMetadata.js.map +1 -0
- 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 +34 -0
- package/dist/request/BaseAuthRequest.d.ts.map +1 -0
- package/dist/request/CommonAuthorizationCodeRequest.d.ts +28 -0
- package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
- package/dist/request/CommonAuthorizationUrlRequest.d.ts +51 -0
- package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
- package/dist/request/CommonClientCredentialRequest.d.ts +17 -0
- package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -0
- package/dist/request/CommonDeviceCodeRequest.d.ts +19 -0
- package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -0
- package/dist/request/CommonEndSessionRequest.d.ts +21 -0
- package/dist/request/CommonEndSessionRequest.d.ts.map +1 -0
- package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -0
- package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
- package/dist/request/CommonRefreshTokenRequest.d.ts +21 -0
- package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -0
- package/dist/request/CommonSilentFlowRequest.d.ts +20 -0
- package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -0
- package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -0
- package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
- package/dist/request/RequestParameterBuilder.d.ts +217 -0
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -0
- package/dist/request/RequestParameterBuilder.js +387 -0
- package/dist/request/RequestParameterBuilder.js.map +1 -0
- package/dist/request/RequestValidator.d.ts +34 -0
- package/dist/request/RequestValidator.d.ts.map +1 -0
- package/dist/request/RequestValidator.js +92 -0
- package/dist/request/RequestValidator.js.map +1 -0
- package/dist/request/ScopeSet.d.ts +83 -0
- package/dist/request/ScopeSet.d.ts.map +1 -0
- package/dist/request/ScopeSet.js +192 -0
- package/dist/request/ScopeSet.js.map +1 -0
- package/dist/response/AuthenticationResult.d.ts +38 -0
- package/dist/response/AuthenticationResult.d.ts.map +1 -0
- package/dist/response/AuthorizationCodePayload.d.ts +14 -0
- package/dist/response/AuthorizationCodePayload.d.ts.map +1 -0
- package/dist/response/DeviceCodeResponse.d.ts +26 -0
- package/dist/response/DeviceCodeResponse.d.ts.map +1 -0
- package/dist/response/ExternalTokenResponse.d.ts +15 -0
- package/dist/response/ExternalTokenResponse.d.ts.map +1 -0
- package/dist/response/IMDSBadResponse.d.ts +5 -0
- package/dist/response/IMDSBadResponse.d.ts.map +1 -0
- package/dist/response/ResponseHandler.d.ts +71 -0
- package/dist/response/ResponseHandler.d.ts.map +1 -0
- package/dist/response/ResponseHandler.js +293 -0
- package/dist/response/ResponseHandler.js.map +1 -0
- package/dist/response/ServerAuthorizationCodeResponse.d.ts +22 -0
- package/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
- package/dist/response/ServerAuthorizationTokenResponse.d.ts +43 -0
- package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
- 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 +281 -0
- package/dist/telemetry/performance/PerformanceClient.js.map +1 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts +249 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
- package/dist/telemetry/performance/PerformanceEvent.js +121 -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.d.ts +67 -0
- package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
- package/dist/telemetry/server/ServerTelemetryManager.js +168 -0
- package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -0
- package/dist/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
- package/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
- package/dist/url/IUri.d.ts +13 -0
- package/dist/url/IUri.d.ts.map +1 -0
- package/dist/url/UrlString.d.ts +62 -0
- package/dist/url/UrlString.d.ts.map +1 -0
- package/dist/url/UrlString.js +208 -0
- package/dist/url/UrlString.js.map +1 -0
- package/dist/utils/Constants.d.ts +340 -0
- package/dist/utils/Constants.d.ts.map +1 -0
- package/dist/utils/Constants.js +381 -0
- package/dist/utils/Constants.js.map +1 -0
- package/dist/utils/MsalTypes.d.ts +7 -0
- package/dist/utils/MsalTypes.d.ts.map +1 -0
- package/dist/utils/ProtocolUtils.d.ts +43 -0
- package/dist/utils/ProtocolUtils.d.ts.map +1 -0
- package/dist/utils/ProtocolUtils.js +77 -0
- package/dist/utils/ProtocolUtils.js.map +1 -0
- package/dist/utils/StringUtils.d.ts +54 -0
- package/dist/utils/StringUtils.d.ts.map +1 -0
- package/dist/utils/StringUtils.js +129 -0
- package/dist/utils/StringUtils.js.map +1 -0
- package/dist/utils/TimeUtils.d.ts +28 -0
- package/dist/utils/TimeUtils.d.ts.map +1 -0
- package/dist/utils/TimeUtils.js +53 -0
- package/dist/utils/TimeUtils.js.map +1 -0
- package/package.json +76 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Microsoft Authentication Library for JavaScript (MSAL.js) Common Protocols Package
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@azure/msal-common/)
|
|
4
|
+
[](https://nodei.co/npm/@azure/msal-common/)
|
|
5
|
+
[](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js)
|
|
6
|
+
|
|
7
|
+
| <a href="https://docs.microsoft.com/azure/active-directory/develop/guidedsetups/active-directory-javascriptspa" target="_blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html" target="_blank">Library Reference</a> |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
|
|
10
|
+
1. [About](#about)
|
|
11
|
+
2. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md)
|
|
12
|
+
1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/CHANGELOG.md)
|
|
13
|
+
1. [Releases](#releases)
|
|
14
|
+
1. [Prerequisites and Usage](#prerequisites-and-usage)
|
|
15
|
+
1. [Installation](#installation)
|
|
16
|
+
1. [Security Reporting](#security-reporting)
|
|
17
|
+
1. [License](#license)
|
|
18
|
+
1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
|
|
19
|
+
|
|
20
|
+
## About
|
|
21
|
+
|
|
22
|
+
The MSAL library for JavaScript enables client-side JavaScript applications to authenticate users using [Azure AD](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-overview) work and school accounts (AAD), Microsoft personal accounts (MSA) and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through [Azure AD B2C](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-overview#identity-providers) service. It also enables your app to get tokens to access [Microsoft Cloud](https://www.microsoft.com/enterprise) services such as [Microsoft Graph](https://graph.microsoft.io).
|
|
23
|
+
|
|
24
|
+
The `@azure/msal-common` package described by the code in this folder serves as a common package dependency for the `@azure/msal-browser` package (and in the future, the msal-node package). Be aware that this is an internal library, and is subject to frequent change. **It is not meant for production consumption by itself.**
|
|
25
|
+
|
|
26
|
+
## FAQ
|
|
27
|
+
|
|
28
|
+
See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md).
|
|
29
|
+
|
|
30
|
+
## Releases
|
|
31
|
+
|
|
32
|
+
*Expect us to detail our major and minor releases moving forward, while leaving out our patch releases. Patch release notes can be found in our change log.*
|
|
33
|
+
|
|
34
|
+
| Date | Release | Announcement | Main features |
|
|
35
|
+
| ------| ------- | ---------| --------- |
|
|
36
|
+
| August 4, 2020 | @azure/msal-common v1.1.0 | [Release Notes](https://https://github.com/AzureAD/microsoft-authentication-library-for-js/releases/tag/msal-common-v1.1.0)
|
|
37
|
+
| July 20, 2020 | @azure/msal-common v1.0.0 | [Release Notes](https://github.com/AzureAD/microsoft-authentication-library-for-js/releases/tag/msal-common-v1.0.0) | Full release version of the `@azure/msal-common` |
|
|
38
|
+
| May 11, 2020 | @azure/msal-common v1.0.0-beta | Beta version of the `@azure/msal-common` package |
|
|
39
|
+
| January 17, 2020 | @azure/msal-common v1.0.0-alpha | No release notes yet | Alpha version of the `@azure/msal-common` package with authorization code flow for SPAs working in dev. |
|
|
40
|
+
|
|
41
|
+
## Prerequisites and Usage
|
|
42
|
+
This library is not meant for production use. Please use one of these packages specific to the platform you are developing for:
|
|
43
|
+
|
|
44
|
+
- [MSAL for Single Page Applications (SPAs)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser)
|
|
45
|
+
- [MSAL for Node.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node)
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
### Via NPM:
|
|
49
|
+
|
|
50
|
+
npm install @azure/msal-common
|
|
51
|
+
|
|
52
|
+
## Security Reporting
|
|
53
|
+
|
|
54
|
+
If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License");
|
|
59
|
+
|
|
60
|
+
## We Value and Adhere to the Microsoft Open Source Code of Conduct
|
|
61
|
+
|
|
62
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*! @azure/msal-common v0.0.1-alpha.0 2022-08-02 */
|
|
2
|
+
'use strict';
|
|
3
|
+
/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */
|
|
17
|
+
/* global Reflect, Promise */
|
|
18
|
+
|
|
19
|
+
var extendStatics = function(d, b) {
|
|
20
|
+
extendStatics = Object.setPrototypeOf ||
|
|
21
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
22
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
23
|
+
return extendStatics(d, b);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
function __extends(d, b) {
|
|
27
|
+
extendStatics(d, b);
|
|
28
|
+
function __() { this.constructor = d; }
|
|
29
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var __assign = function() {
|
|
33
|
+
__assign = Object.assign || function __assign(t) {
|
|
34
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
35
|
+
s = arguments[i];
|
|
36
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
37
|
+
}
|
|
38
|
+
return t;
|
|
39
|
+
};
|
|
40
|
+
return __assign.apply(this, arguments);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
44
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
45
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
46
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
47
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
48
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
49
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function __generator(thisArg, body) {
|
|
54
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
55
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
56
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
57
|
+
function step(op) {
|
|
58
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
59
|
+
while (_) try {
|
|
60
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
61
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
62
|
+
switch (op[0]) {
|
|
63
|
+
case 0: case 1: t = op; break;
|
|
64
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
65
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
66
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
67
|
+
default:
|
|
68
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
69
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
70
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
71
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
72
|
+
if (t[2]) _.ops.pop();
|
|
73
|
+
_.trys.pop(); continue;
|
|
74
|
+
}
|
|
75
|
+
op = body.call(thisArg, _);
|
|
76
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
77
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function __spreadArrays() {
|
|
82
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
83
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
84
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
85
|
+
r[k] = a[j];
|
|
86
|
+
return r;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { __assign, __awaiter, __extends, __generator, __spreadArrays };
|
|
90
|
+
//# sourceMappingURL=_tslib.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TokenClaims } from "./TokenClaims";
|
|
2
|
+
/**
|
|
3
|
+
* Account object with the following signature:
|
|
4
|
+
* - homeAccountId - Home account identifier for this account object
|
|
5
|
+
* - environment - Entity which issued the token represented by the domain of the issuer (e.g. login.microsoftonline.com)
|
|
6
|
+
* - tenantId - Full tenant or organizational id that this account belongs to
|
|
7
|
+
* - username - preferred_username claim of the id_token that represents this account
|
|
8
|
+
* - localAccountId - Local, tenant-specific account identifer for this account object, usually used in legacy cases
|
|
9
|
+
* - name - Full name for the account, including given name and family name
|
|
10
|
+
* - idTokenClaims - Object contains claims from ID token
|
|
11
|
+
* - localAccountId - The user's account ID
|
|
12
|
+
* - nativeAccountId - The user's native account ID
|
|
13
|
+
*/
|
|
14
|
+
export declare type AccountInfo = {
|
|
15
|
+
homeAccountId: string;
|
|
16
|
+
environment: string;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
username: string;
|
|
19
|
+
localAccountId: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
idTokenClaims?: TokenClaims & {
|
|
22
|
+
[key: string]: string | number | string[] | object | undefined | unknown;
|
|
23
|
+
};
|
|
24
|
+
nativeAccountId?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare type ActiveAccountFilters = {
|
|
27
|
+
homeAccountId: string;
|
|
28
|
+
localAccountId: string;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=AccountInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountInfo.d.ts","sourceRoot":"","sources":["../../src/account/AccountInfo.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C;;;;;;;;;;;GAWG;AACH,oBAAY,WAAW,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,WAAW,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;KAAE,CAAC;IAC3G,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TokenClaims } from "./TokenClaims";
|
|
2
|
+
import { ICrypto } from "../crypto/ICrypto";
|
|
3
|
+
/**
|
|
4
|
+
* JWT Token representation class. Parses token string and generates claims object.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AuthToken {
|
|
7
|
+
rawToken: string;
|
|
8
|
+
claims: TokenClaims;
|
|
9
|
+
constructor(rawToken: string, crypto: ICrypto);
|
|
10
|
+
/**
|
|
11
|
+
* Extract token by decoding the rawToken
|
|
12
|
+
*
|
|
13
|
+
* @param encodedToken
|
|
14
|
+
*/
|
|
15
|
+
static extractTokenClaims(encodedToken: string, crypto: ICrypto): TokenClaims;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=AuthToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthToken.d.ts","sourceRoot":"","sources":["../../src/account/AuthToken.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,qBAAa,SAAS;IAGlB,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,WAAW,CAAC;gBACR,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO;IAS7C;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,WAAW;CAehF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*! @azure/msal-common v0.0.1-alpha.0 2022-08-02 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { ClientAuthError } from '../error/ClientAuthError.js';
|
|
4
|
+
import { StringUtils } from '../utils/StringUtils.js';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
+
* Licensed under the MIT License.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* JWT Token representation class. Parses token string and generates claims object.
|
|
12
|
+
*/
|
|
13
|
+
var AuthToken = /** @class */ (function () {
|
|
14
|
+
function AuthToken(rawToken, crypto) {
|
|
15
|
+
if (StringUtils.isEmpty(rawToken)) {
|
|
16
|
+
throw ClientAuthError.createTokenNullOrEmptyError(rawToken);
|
|
17
|
+
}
|
|
18
|
+
this.rawToken = rawToken;
|
|
19
|
+
this.claims = AuthToken.extractTokenClaims(rawToken, crypto);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Extract token by decoding the rawToken
|
|
23
|
+
*
|
|
24
|
+
* @param encodedToken
|
|
25
|
+
*/
|
|
26
|
+
AuthToken.extractTokenClaims = function (encodedToken, crypto) {
|
|
27
|
+
var decodedToken = StringUtils.decodeAuthToken(encodedToken);
|
|
28
|
+
// token will be decoded to get the username
|
|
29
|
+
try {
|
|
30
|
+
var base64TokenPayload = decodedToken.JWSPayload;
|
|
31
|
+
// base64Decode() should throw an error if there is an issue
|
|
32
|
+
var base64Decoded = crypto.base64Decode(base64TokenPayload);
|
|
33
|
+
return JSON.parse(base64Decoded);
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
throw ClientAuthError.createTokenParsingError(err);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return AuthToken;
|
|
40
|
+
}());
|
|
41
|
+
|
|
42
|
+
export { AuthToken };
|
|
43
|
+
//# sourceMappingURL=AuthToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthToken.js","sources":["../../src/account/AuthToken.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TokenClaims } from \"./TokenClaims\";\nimport { DecodedAuthToken } from \"./DecodedAuthToken\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ICrypto } from \"../crypto/ICrypto\";\n\n/**\n * JWT Token representation class. Parses token string and generates claims object.\n */\nexport class AuthToken {\n\n // Raw Token string\n rawToken: string;\n // Claims inside token\n claims: TokenClaims;\n constructor(rawToken: string, crypto: ICrypto) {\n if (StringUtils.isEmpty(rawToken)) {\n throw ClientAuthError.createTokenNullOrEmptyError(rawToken);\n }\n\n this.rawToken = rawToken;\n this.claims = AuthToken.extractTokenClaims(rawToken, crypto);\n }\n\n /**\n * Extract token by decoding the rawToken\n *\n * @param encodedToken\n */\n static extractTokenClaims(encodedToken: string, crypto: ICrypto): TokenClaims {\n\n const decodedToken: DecodedAuthToken = StringUtils.decodeAuthToken(encodedToken);\n\n // token will be decoded to get the username\n try {\n const base64TokenPayload = decodedToken.JWSPayload;\n\n // base64Decode() should throw an error if there is an issue\n const base64Decoded = crypto.base64Decode(base64TokenPayload);\n return JSON.parse(base64Decoded) as TokenClaims;\n } catch (err) {\n throw ClientAuthError.createTokenParsingError(err);\n }\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAQH;;AAEG;AACH,IAAA,SAAA,kBAAA,YAAA;IAMI,SAAY,SAAA,CAAA,QAAgB,EAAE,MAAe,EAAA;AACzC,QAAA,IAAI,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AAC/B,YAAA,MAAM,eAAe,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC;AAC/D,SAAA;AAED,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;KAChE;AAED;;;;AAIG;AACI,IAAA,SAAA,CAAA,kBAAkB,GAAzB,UAA0B,YAAoB,EAAE,MAAe,EAAA;QAE3D,IAAM,YAAY,GAAqB,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;;QAGjF,IAAI;AACA,YAAA,IAAM,kBAAkB,GAAG,YAAY,CAAC,UAAU,CAAC;;YAGnD,IAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;AAC9D,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAgB,CAAC;AACnD,SAAA;AAAC,QAAA,OAAO,GAAG,EAAE;AACV,YAAA,MAAM,eAAe,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;AACtD,SAAA;KACJ,CAAA;IACL,OAAC,SAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CcsCredential.d.ts","sourceRoot":"","sources":["../../src/account/CcsCredential.ts"],"names":[],"mappings":"AAKA,oBAAY,aAAa,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,iBAAiB,CAAA;CAC1B,CAAC;AAEF,oBAAY,iBAAiB;IACzB,eAAe,oBAAoB;IACnC,GAAG,QAAQ;CACd"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*! @azure/msal-common v0.0.1-alpha.0 2022-08-02 */
|
|
2
|
+
'use strict';
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
* Licensed under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
var CcsCredentialType;
|
|
8
|
+
(function (CcsCredentialType) {
|
|
9
|
+
CcsCredentialType["HOME_ACCOUNT_ID"] = "home_account_id";
|
|
10
|
+
CcsCredentialType["UPN"] = "UPN";
|
|
11
|
+
})(CcsCredentialType || (CcsCredentialType = {}));
|
|
12
|
+
|
|
13
|
+
export { CcsCredentialType };
|
|
14
|
+
//# sourceMappingURL=CcsCredential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CcsCredential.js","sources":["../../src/account/CcsCredential.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type CcsCredential = {\n credential: string,\n type: CcsCredentialType\n};\n\nexport enum CcsCredentialType {\n HOME_ACCOUNT_ID = \"home_account_id\",\n UPN = \"UPN\"\n}\n"],"names":[],"mappings":";;AAAA;;;AAGG;IAOS,kBAGX;AAHD,CAAA,UAAY,iBAAiB,EAAA;AACzB,IAAA,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC,CAAA;AACnC,IAAA,iBAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACf,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,GAG5B,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client Assertion credential for Confidential Clients
|
|
3
|
+
*/
|
|
4
|
+
export declare type ClientAssertion = {
|
|
5
|
+
assertion: string;
|
|
6
|
+
assertionType: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Client Credentials set for Confidential Clients
|
|
10
|
+
*/
|
|
11
|
+
export declare type ClientCredentials = {
|
|
12
|
+
clientSecret?: string;
|
|
13
|
+
clientAssertion?: ClientAssertion;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=ClientCredentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientCredentials.d.ts","sourceRoot":"","sources":["../../src/account/ClientCredentials.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAA;CACxB,CAAC;AAEF;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAA;CACpC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ICrypto } from "../crypto/ICrypto";
|
|
2
|
+
/**
|
|
3
|
+
* Client info object which consists of two IDs. Need to add more info here.
|
|
4
|
+
*/
|
|
5
|
+
export declare type ClientInfo = {
|
|
6
|
+
uid: string;
|
|
7
|
+
utid: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Function to build a client info object from server clientInfo string
|
|
11
|
+
* @param rawClientInfo
|
|
12
|
+
* @param crypto
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildClientInfo(rawClientInfo: string, crypto: ICrypto): ClientInfo;
|
|
15
|
+
/**
|
|
16
|
+
* Function to build a client info object from cached homeAccountId string
|
|
17
|
+
* @param homeAccountId
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo;
|
|
20
|
+
//# sourceMappingURL=ClientInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientInfo.d.ts","sourceRoot":"","sources":["../../src/account/ClientInfo.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C;;GAEG;AACH,oBAAY,UAAU,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAA;CACf,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,CAWlF;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,aAAa,EAAE,MAAM,GAAG,UAAU,CASlF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*! @azure/msal-common v0.0.1-alpha.0 2022-08-02 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { ClientAuthError } from '../error/ClientAuthError.js';
|
|
4
|
+
import { StringUtils } from '../utils/StringUtils.js';
|
|
5
|
+
import { Constants, Separators } from '../utils/Constants.js';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Function to build a client info object from server clientInfo string
|
|
13
|
+
* @param rawClientInfo
|
|
14
|
+
* @param crypto
|
|
15
|
+
*/
|
|
16
|
+
function buildClientInfo(rawClientInfo, crypto) {
|
|
17
|
+
if (StringUtils.isEmpty(rawClientInfo)) {
|
|
18
|
+
throw ClientAuthError.createClientInfoEmptyError();
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
var decodedClientInfo = crypto.base64Decode(rawClientInfo);
|
|
22
|
+
return JSON.parse(decodedClientInfo);
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
throw ClientAuthError.createClientInfoDecodingError(e);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Function to build a client info object from cached homeAccountId string
|
|
30
|
+
* @param homeAccountId
|
|
31
|
+
*/
|
|
32
|
+
function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
33
|
+
if (StringUtils.isEmpty(homeAccountId)) {
|
|
34
|
+
throw ClientAuthError.createClientInfoDecodingError("Home account ID was empty.");
|
|
35
|
+
}
|
|
36
|
+
var clientInfoParts = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2);
|
|
37
|
+
return {
|
|
38
|
+
uid: clientInfoParts[0],
|
|
39
|
+
utid: clientInfoParts.length < 2 ? Constants.EMPTY_STRING : clientInfoParts[1]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { buildClientInfo, buildClientInfoFromHomeAccountId };
|
|
44
|
+
//# sourceMappingURL=ClientInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientInfo.js","sources":["../../src/account/ClientInfo.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ICrypto } from \"../crypto/ICrypto\";\nimport { Separators, Constants } from \"../utils/Constants\";\n\n/**\n * Client info object which consists of two IDs. Need to add more info here.\n */\nexport type ClientInfo = {\n uid: string,\n utid: string\n};\n\n/**\n * Function to build a client info object from server clientInfo string\n * @param rawClientInfo\n * @param crypto\n */\nexport function buildClientInfo(rawClientInfo: string, crypto: ICrypto): ClientInfo {\n if (StringUtils.isEmpty(rawClientInfo)) {\n throw ClientAuthError.createClientInfoEmptyError();\n }\n\n try {\n const decodedClientInfo: string = crypto.base64Decode(rawClientInfo);\n return JSON.parse(decodedClientInfo) as ClientInfo;\n } catch (e) {\n throw ClientAuthError.createClientInfoDecodingError(e);\n }\n}\n\n/**\n * Function to build a client info object from cached homeAccountId string\n * @param homeAccountId \n */\nexport function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo {\n if (StringUtils.isEmpty(homeAccountId)) {\n throw ClientAuthError.createClientInfoDecodingError(\"Home account ID was empty.\");\n }\n const clientInfoParts: string[] = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2);\n return {\n uid: clientInfoParts[0],\n utid: clientInfoParts.length < 2 ? Constants.EMPTY_STRING : clientInfoParts[1]\n };\n}\n"],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAeH;;;;AAIG;AACa,SAAA,eAAe,CAAC,aAAqB,EAAE,MAAe,EAAA;AAClE,IAAA,IAAI,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;AACpC,QAAA,MAAM,eAAe,CAAC,0BAA0B,EAAE,CAAC;AACtD,KAAA;IAED,IAAI;QACA,IAAM,iBAAiB,GAAW,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;AACrE,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAe,CAAC;AACtD,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACR,QAAA,MAAM,eAAe,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;AAC1D,KAAA;AACL,CAAC;AAED;;;AAGG;AACG,SAAU,gCAAgC,CAAC,aAAqB,EAAA;AAClE,IAAA,IAAI,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;AACpC,QAAA,MAAM,eAAe,CAAC,6BAA6B,CAAC,4BAA4B,CAAC,CAAC;AACrF,KAAA;AACD,IAAA,IAAM,eAAe,GAAa,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;IAC3F,OAAO;AACH,QAAA,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;AACvB,QAAA,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC;KACjF,CAAC;AACN;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DecodedAuthToken.d.ts","sourceRoot":"","sources":["../../src/account/DecodedAuthToken.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type which describes Id Token claims known by MSAL.
|
|
3
|
+
*/
|
|
4
|
+
export declare type TokenClaims = {
|
|
5
|
+
/**
|
|
6
|
+
* Audience
|
|
7
|
+
*/
|
|
8
|
+
aud?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Issuer
|
|
11
|
+
*/
|
|
12
|
+
iss?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Issued at
|
|
15
|
+
*/
|
|
16
|
+
iat?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Not valid before
|
|
19
|
+
*/
|
|
20
|
+
nbf?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Immutable object identifier, this ID uniquely identifies the user across applications
|
|
23
|
+
*/
|
|
24
|
+
oid?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Immutable subject identifier, this is a pairwise identifier - it is unique to a particular application ID
|
|
27
|
+
*/
|
|
28
|
+
sub?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Users' tenant or '9188040d-6c67-4c5b-b112-36a304b66dad' for personal accounts.
|
|
31
|
+
*/
|
|
32
|
+
tid?: string;
|
|
33
|
+
ver?: string;
|
|
34
|
+
upn?: string;
|
|
35
|
+
preferred_username?: string;
|
|
36
|
+
login_hint?: string;
|
|
37
|
+
emails?: string[];
|
|
38
|
+
name?: string;
|
|
39
|
+
nonce?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Expiration
|
|
42
|
+
*/
|
|
43
|
+
exp?: number;
|
|
44
|
+
home_oid?: string;
|
|
45
|
+
sid?: string;
|
|
46
|
+
cloud_instance_host_name?: string;
|
|
47
|
+
cnf?: {
|
|
48
|
+
kid: string;
|
|
49
|
+
};
|
|
50
|
+
x5c_ca?: string[];
|
|
51
|
+
ts?: number;
|
|
52
|
+
at?: string;
|
|
53
|
+
u?: string;
|
|
54
|
+
p?: string;
|
|
55
|
+
m?: string;
|
|
56
|
+
roles?: string[];
|
|
57
|
+
amr?: string[];
|
|
58
|
+
idp?: string;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=TokenClaims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenClaims.d.ts","sourceRoot":"","sources":["../../src/account/TokenClaims.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,WAAW,GAAG;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,GAAG,CAAC,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|