@azure/msal-node 1.17.1 → 2.0.0-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 -21
- package/README.md +182 -181
- package/dist/cache/ITokenCache.d.ts.map +1 -1
- package/dist/cache/NodeStorage.d.ts.map +1 -1
- package/dist/cache/NodeStorage.esm.js +410 -0
- package/dist/cache/NodeStorage.esm.js.map +1 -0
- package/dist/cache/NodeStorage.js +412 -0
- package/dist/cache/NodeStorage.js.map +1 -0
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.esm.js +278 -0
- package/dist/cache/TokenCache.esm.js.map +1 -0
- package/dist/cache/TokenCache.js +280 -0
- package/dist/cache/TokenCache.js.map +1 -0
- package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.esm.js +33 -0
- package/dist/cache/distributed/DistributedCachePlugin.esm.js.map +1 -0
- package/dist/cache/distributed/DistributedCachePlugin.js +35 -0
- package/dist/cache/distributed/DistributedCachePlugin.js.map +1 -0
- package/dist/cache/distributed/ICacheClient.d.ts.map +1 -1
- package/dist/cache/distributed/IPartitionManager.d.ts.map +1 -1
- package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
- package/dist/cache/serializer/Deserializer.esm.js +182 -0
- package/dist/cache/serializer/Deserializer.esm.js.map +1 -0
- package/dist/cache/serializer/Deserializer.js +184 -0
- package/dist/cache/serializer/Deserializer.js.map +1 -0
- package/dist/cache/serializer/Serializer.d.ts.map +1 -1
- package/dist/cache/serializer/Serializer.esm.js +139 -0
- package/dist/cache/serializer/Serializer.esm.js.map +1 -0
- package/dist/cache/serializer/Serializer.js +141 -0
- package/dist/cache/serializer/Serializer.js.map +1 -0
- package/dist/cache/serializer/SerializerTypes.d.ts +8 -8
- package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -1
- package/dist/client/ClientApplication.d.ts +1 -1
- package/dist/client/ClientApplication.d.ts.map +1 -1
- package/dist/client/ClientApplication.esm.js +342 -0
- package/dist/client/ClientApplication.esm.js.map +1 -0
- package/dist/client/ClientApplication.js +344 -0
- package/dist/client/ClientApplication.js.map +1 -0
- package/dist/client/ClientAssertion.d.ts.map +1 -1
- package/dist/client/ClientAssertion.esm.js +126 -0
- package/dist/client/ClientAssertion.esm.js.map +1 -0
- package/dist/client/ClientAssertion.js +128 -0
- package/dist/client/ClientAssertion.js.map +1 -0
- package/dist/client/ClientCredentialClient.d.ts +34 -0
- package/dist/client/ClientCredentialClient.d.ts.map +1 -0
- package/dist/client/ClientCredentialClient.esm.js +164 -0
- package/dist/client/ClientCredentialClient.esm.js.map +1 -0
- package/dist/client/ClientCredentialClient.js +166 -0
- package/dist/client/ClientCredentialClient.js.map +1 -0
- package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
- package/dist/client/ConfidentialClientApplication.esm.js +175 -0
- package/dist/client/ConfidentialClientApplication.esm.js.map +1 -0
- package/dist/client/ConfidentialClientApplication.js +177 -0
- package/dist/client/ConfidentialClientApplication.js.map +1 -0
- package/dist/client/DeviceCodeClient.d.ts +54 -0
- package/dist/client/DeviceCodeClient.d.ts.map +1 -0
- package/dist/client/DeviceCodeClient.esm.js +214 -0
- package/dist/client/DeviceCodeClient.esm.js.map +1 -0
- package/dist/client/DeviceCodeClient.js +216 -0
- package/dist/client/DeviceCodeClient.js.map +1 -0
- package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
- package/dist/client/IPublicClientApplication.d.ts +1 -1
- package/dist/client/IPublicClientApplication.d.ts.map +1 -1
- package/dist/client/OnBehalfOfClient.d.ts +48 -0
- package/dist/client/OnBehalfOfClient.d.ts.map +1 -0
- package/dist/client/OnBehalfOfClient.esm.js +211 -0
- package/dist/client/OnBehalfOfClient.esm.js.map +1 -0
- package/dist/client/OnBehalfOfClient.js +213 -0
- package/dist/client/OnBehalfOfClient.js.map +1 -0
- package/dist/client/PublicClientApplication.d.ts +1 -1
- package/dist/client/PublicClientApplication.d.ts.map +1 -1
- package/dist/client/PublicClientApplication.esm.js +187 -0
- package/dist/client/PublicClientApplication.esm.js.map +1 -0
- package/dist/client/PublicClientApplication.js +189 -0
- package/dist/client/PublicClientApplication.js.map +1 -0
- package/dist/client/UsernamePasswordClient.d.ts +26 -0
- package/dist/client/UsernamePasswordClient.d.ts.map +1 -0
- package/dist/client/UsernamePasswordClient.esm.js +109 -0
- package/dist/client/UsernamePasswordClient.esm.js.map +1 -0
- package/dist/client/UsernamePasswordClient.js +111 -0
- package/dist/client/UsernamePasswordClient.js.map +1 -0
- package/dist/config/Configuration.d.ts +9 -8
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.esm.js +78 -0
- package/dist/config/Configuration.esm.js.map +1 -0
- package/dist/config/Configuration.js +80 -0
- package/dist/config/Configuration.js.map +1 -0
- package/dist/crypto/CryptoProvider.d.ts.map +1 -1
- package/dist/crypto/CryptoProvider.esm.js +85 -0
- package/dist/crypto/CryptoProvider.esm.js.map +1 -0
- package/dist/crypto/CryptoProvider.js +87 -0
- package/dist/crypto/CryptoProvider.js.map +1 -0
- package/dist/crypto/GuidGenerator.d.ts.map +1 -1
- package/dist/crypto/GuidGenerator.esm.js +29 -0
- package/dist/crypto/GuidGenerator.esm.js.map +1 -0
- package/dist/crypto/GuidGenerator.js +31 -0
- package/dist/crypto/GuidGenerator.js.map +1 -0
- package/dist/crypto/HashUtils.d.ts.map +1 -1
- package/dist/crypto/HashUtils.esm.js +21 -0
- package/dist/crypto/HashUtils.esm.js.map +1 -0
- package/dist/crypto/HashUtils.js +23 -0
- package/dist/crypto/HashUtils.js.map +1 -0
- package/dist/crypto/PkceGenerator.d.ts.map +1 -1
- package/dist/crypto/PkceGenerator.esm.js +60 -0
- package/dist/crypto/PkceGenerator.esm.js.map +1 -0
- package/dist/crypto/PkceGenerator.js +62 -0
- package/dist/crypto/PkceGenerator.js.map +1 -0
- package/dist/error/NodeAuthError.d.ts.map +1 -1
- package/dist/error/NodeAuthError.esm.js +92 -0
- package/dist/error/NodeAuthError.esm.js.map +1 -0
- package/dist/error/NodeAuthError.js +95 -0
- package/dist/error/NodeAuthError.js.map +1 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +20 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +101 -6
- package/dist/index.js.map +1 -0
- package/dist/internals.d.ts +7 -0
- package/dist/internals.d.ts.map +1 -0
- package/dist/internals.esm.js +10 -0
- package/dist/internals.esm.js.map +1 -0
- package/dist/internals.js +15 -0
- package/dist/internals.js.map +1 -0
- package/dist/msal-node.cjs.development.js +1 -1
- package/dist/msal-node.cjs.development.js.map +1 -1
- package/dist/msal-node.cjs.production.min.js +1 -1
- package/dist/msal-node.cjs.production.min.js.map +1 -1
- package/dist/msal-node.esm.js +1 -1
- package/dist/msal-node.esm.js.map +1 -1
- package/dist/network/HttpClient.d.ts +1 -0
- package/dist/network/HttpClient.d.ts.map +1 -1
- package/dist/network/HttpClient.esm.js +286 -0
- package/dist/network/HttpClient.esm.js.map +1 -0
- package/dist/network/HttpClient.js +288 -0
- package/dist/network/HttpClient.js.map +1 -0
- package/dist/network/ILoopbackClient.d.ts.map +1 -1
- package/dist/network/LoopbackClient.d.ts.map +1 -1
- package/dist/network/LoopbackClient.esm.js +94 -0
- package/dist/network/LoopbackClient.esm.js.map +1 -0
- package/dist/network/LoopbackClient.js +96 -0
- package/dist/network/LoopbackClient.js.map +1 -0
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.d.ts.map +1 -1
- package/dist/packageMetadata.esm.js +8 -0
- package/dist/packageMetadata.esm.js.map +1 -0
- package/dist/packageMetadata.js +11 -0
- package/dist/packageMetadata.js.map +1 -0
- package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/ClientCredentialRequest.d.ts +1 -1
- package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
- package/dist/request/DeviceCodeRequest.d.ts +1 -1
- package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
- package/dist/request/InteractiveRequest.d.ts +1 -1
- package/dist/request/InteractiveRequest.d.ts.map +1 -1
- package/dist/request/OnBehalfOfRequest.d.ts +1 -1
- package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
- package/dist/request/RefreshTokenRequest.d.ts +1 -1
- package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/SignOutRequest.d.ts +1 -1
- package/dist/request/SignOutRequest.d.ts.map +1 -1
- package/dist/request/SilentFlowRequest.d.ts +1 -1
- package/dist/request/SilentFlowRequest.d.ts.map +1 -1
- package/dist/request/UsernamePasswordRequest.d.ts +1 -1
- package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.esm.js +98 -0
- package/dist/utils/Constants.esm.js.map +1 -0
- package/dist/utils/Constants.js +106 -0
- package/dist/utils/Constants.js.map +1 -0
- package/dist/utils/EncodingUtils.d.ts.map +1 -1
- package/dist/utils/EncodingUtils.esm.js +51 -0
- package/dist/utils/EncodingUtils.esm.js.map +1 -0
- package/dist/utils/EncodingUtils.js +53 -0
- package/dist/utils/EncodingUtils.js.map +1 -0
- package/dist/utils/NetworkUtils.d.ts.map +1 -1
- package/dist/utils/NetworkUtils.esm.js +43 -0
- package/dist/utils/NetworkUtils.esm.js.map +1 -0
- package/dist/utils/NetworkUtils.js +45 -0
- package/dist/utils/NetworkUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/LICENSE +21 -0
- package/node_modules/@azure/msal-common/README.md +62 -0
- package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts +32 -0
- package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts +21 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.js +56 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts +9 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.js +14 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts +15 -0
- package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.js +46 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts +9 -0
- package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts +66 -0
- package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts +216 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.js +688 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts +31 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js +58 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts +623 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js +881 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts +19 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js +24 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts +10 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js +19 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts +2 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js +13 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js +13 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts +12 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js +15 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts +8 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js +17 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts +31 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js +116 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts +7 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
- package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts +444 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.js +1024 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts +57 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js +123 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts +100 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js +259 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts +40 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js +73 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts +48 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js +85 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js +18 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts +89 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js +144 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts +35 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js +64 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts +37 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js +67 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts +13 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js +34 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js +30 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts +166 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts +5 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts +24 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js +30 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts +63 -0
- package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts +72 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js +453 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts +51 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.js +107 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts +35 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js +260 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts +25 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js +108 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts +39 -0
- package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts +134 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js +101 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts +63 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js +49 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts +5 -0
- package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts +22 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js +44 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts +58 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js +92 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts +12 -0
- package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts +48 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.js +58 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts +413 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js +526 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts +199 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js +256 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts +60 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js +86 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts +29 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js +46 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts +8 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.js +21 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/index.cjs.js +8975 -0
- package/node_modules/@azure/msal-common/dist/index.cjs.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/index.d.ts +94 -0
- package/node_modules/@azure/msal-common/dist/index.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/index.js +54 -0
- package/node_modules/@azure/msal-common/dist/index.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts +96 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.js +205 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts +30 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.js +21 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts +33 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.js +42 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts +17 -0
- package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts +42 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js +102 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts +3 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.js +8 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js +63 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts +38 -0
- package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts +28 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts +51 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts +18 -0
- package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts +22 -0
- package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts +22 -0
- package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts +19 -0
- package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts +18 -0
- package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts +217 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js +385 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts +34 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.js +92 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts +89 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.js +207 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts +40 -0
- package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts +26 -0
- package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts +16 -0
- package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts +5 -0
- package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts +73 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js +325 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts +26 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts +45 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts +43 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts +190 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js +413 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts +440 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js +232 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js +43 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts +66 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js +206 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/url/IUri.d.ts +13 -0
- package/node_modules/@azure/msal-common/dist/url/IUri.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts +71 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.js +252 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts +332 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.js +378 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts +7 -0
- package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts +43 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js +80 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts +54 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.js +131 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts +28 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js +50 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/package.json +79 -0
- package/package.json +77 -68
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*! @azure/msal-node v2.0.0-alpha.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
var ClientApplication = require('./ClientApplication.js');
|
|
6
|
+
var ClientAssertion = require('./ClientAssertion.js');
|
|
7
|
+
var Constants = require('../utils/Constants.js');
|
|
8
|
+
var msalCommon = require('@azure/msal-common');
|
|
9
|
+
var ClientCredentialClient = require('./ClientCredentialClient.js');
|
|
10
|
+
var OnBehalfOfClient = require('./OnBehalfOfClient.js');
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14
|
+
* Licensed under the MIT License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications
|
|
18
|
+
* will configure application secrets, client certificates/assertions as applicable
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
class ConfidentialClientApplication extends ClientApplication.ClientApplication {
|
|
22
|
+
/**
|
|
23
|
+
* Constructor for the ConfidentialClientApplication
|
|
24
|
+
*
|
|
25
|
+
* Required attributes in the Configuration object are:
|
|
26
|
+
* - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal
|
|
27
|
+
* - authority: the authority URL for your application.
|
|
28
|
+
* - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal.
|
|
29
|
+
*
|
|
30
|
+
* In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
|
|
31
|
+
* If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
|
|
32
|
+
* If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
|
|
33
|
+
* If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
|
|
34
|
+
* To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
|
|
35
|
+
*
|
|
36
|
+
* In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/
|
|
37
|
+
* Full B2C functionality will be available in this library in future versions.
|
|
38
|
+
*
|
|
39
|
+
* @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance
|
|
40
|
+
*/
|
|
41
|
+
constructor(configuration) {
|
|
42
|
+
super(configuration);
|
|
43
|
+
this.setClientCredential(this.config);
|
|
44
|
+
this.appTokenProvider = undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and
|
|
48
|
+
* is meant for Azure SDK to enhance Managed Identity support.
|
|
49
|
+
*
|
|
50
|
+
* @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source.
|
|
51
|
+
*/
|
|
52
|
+
SetAppTokenProvider(provider) {
|
|
53
|
+
this.appTokenProvider = provider;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Acquires tokens from the authority for the application (not for an end user).
|
|
57
|
+
*/
|
|
58
|
+
async acquireTokenByClientCredential(request) {
|
|
59
|
+
this.logger.info("acquireTokenByClientCredential called", request.correlationId);
|
|
60
|
+
// If there is a client assertion present in the request, it overrides the one present in the client configuration
|
|
61
|
+
let clientAssertion;
|
|
62
|
+
if (request.clientAssertion) {
|
|
63
|
+
clientAssertion = {
|
|
64
|
+
assertion: request.clientAssertion,
|
|
65
|
+
assertionType: Constants.Constants.JWT_BEARER_ASSERTION_TYPE,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const baseRequest = await this.initializeBaseRequest(request);
|
|
69
|
+
// valid base request should not contain oidc scopes in this grant type
|
|
70
|
+
const validBaseRequest = {
|
|
71
|
+
...baseRequest,
|
|
72
|
+
scopes: baseRequest.scopes.filter((scope) => !msalCommon.OIDC_DEFAULT_SCOPES.includes(scope)),
|
|
73
|
+
};
|
|
74
|
+
const validRequest = {
|
|
75
|
+
...request,
|
|
76
|
+
...validBaseRequest,
|
|
77
|
+
clientAssertion,
|
|
78
|
+
};
|
|
79
|
+
/*
|
|
80
|
+
* valid request should not have "common" or "organizations" in lieu of the tenant_id in the authority in the auth configuration
|
|
81
|
+
* example authority: "https://login.microsoftonline.com/TenantId",
|
|
82
|
+
*/
|
|
83
|
+
const authority = new msalCommon.UrlString(validRequest.authority);
|
|
84
|
+
const tenantId = authority.getUrlComponents().PathSegments[0];
|
|
85
|
+
if (Object.values(msalCommon.AADAuthorityConstants).includes(tenantId)) {
|
|
86
|
+
throw msalCommon.ClientAuthError.createMissingTenantIdError();
|
|
87
|
+
}
|
|
88
|
+
const azureRegionConfiguration = {
|
|
89
|
+
azureRegion: validRequest.azureRegion,
|
|
90
|
+
environmentRegion: process.env[Constants.REGION_ENVIRONMENT_VARIABLE],
|
|
91
|
+
};
|
|
92
|
+
const serverTelemetryManager = this.initializeServerTelemetryManager(Constants.ApiId.acquireTokenByClientCredential, validRequest.correlationId, validRequest.skipCache);
|
|
93
|
+
try {
|
|
94
|
+
const clientCredentialConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, azureRegionConfiguration, request.azureCloudOptions);
|
|
95
|
+
const clientCredentialClient = new ClientCredentialClient.ClientCredentialClient(clientCredentialConfig, this.appTokenProvider);
|
|
96
|
+
this.logger.verbose("Client credential client created", validRequest.correlationId);
|
|
97
|
+
return clientCredentialClient.acquireToken(validRequest);
|
|
98
|
+
}
|
|
99
|
+
catch (e) {
|
|
100
|
+
if (e instanceof msalCommon.AuthError) {
|
|
101
|
+
e.setCorrelationId(validRequest.correlationId);
|
|
102
|
+
}
|
|
103
|
+
serverTelemetryManager.cacheFailedRequest(e);
|
|
104
|
+
throw e;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Acquires tokens from the authority for the application.
|
|
109
|
+
*
|
|
110
|
+
* Used in scenarios where the current app is a middle-tier service which was called with a token
|
|
111
|
+
* representing an end user. The current app can use the token (oboAssertion) to request another
|
|
112
|
+
* token to access downstream web API, on behalf of that user.
|
|
113
|
+
*
|
|
114
|
+
* The current middle-tier app has no user interaction to obtain consent.
|
|
115
|
+
* See how to gain consent upfront for your middle-tier app from this article.
|
|
116
|
+
* https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application
|
|
117
|
+
*/
|
|
118
|
+
async acquireTokenOnBehalfOf(request) {
|
|
119
|
+
this.logger.info("acquireTokenOnBehalfOf called", request.correlationId);
|
|
120
|
+
const validRequest = {
|
|
121
|
+
...request,
|
|
122
|
+
...(await this.initializeBaseRequest(request)),
|
|
123
|
+
};
|
|
124
|
+
try {
|
|
125
|
+
const onBehalfOfConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, undefined, undefined, request.azureCloudOptions);
|
|
126
|
+
const oboClient = new OnBehalfOfClient.OnBehalfOfClient(onBehalfOfConfig);
|
|
127
|
+
this.logger.verbose("On behalf of client created", validRequest.correlationId);
|
|
128
|
+
return oboClient.acquireToken(validRequest);
|
|
129
|
+
}
|
|
130
|
+
catch (e) {
|
|
131
|
+
if (e instanceof msalCommon.AuthError) {
|
|
132
|
+
e.setCorrelationId(validRequest.correlationId);
|
|
133
|
+
}
|
|
134
|
+
throw e;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
setClientCredential(configuration) {
|
|
138
|
+
const clientSecretNotEmpty = !msalCommon.StringUtils.isEmpty(configuration.auth.clientSecret);
|
|
139
|
+
const clientAssertionNotEmpty = !msalCommon.StringUtils.isEmpty(configuration.auth.clientAssertion);
|
|
140
|
+
const certificate = configuration.auth.clientCertificate || {
|
|
141
|
+
thumbprint: msalCommon.Constants.EMPTY_STRING,
|
|
142
|
+
privateKey: msalCommon.Constants.EMPTY_STRING,
|
|
143
|
+
};
|
|
144
|
+
const certificateNotEmpty = !msalCommon.StringUtils.isEmpty(certificate.thumbprint) ||
|
|
145
|
+
!msalCommon.StringUtils.isEmpty(certificate.privateKey);
|
|
146
|
+
/*
|
|
147
|
+
* If app developer configures this callback, they don't need a credential
|
|
148
|
+
* i.e. AzureSDK can get token from Managed Identity without a cert / secret
|
|
149
|
+
*/
|
|
150
|
+
if (this.appTokenProvider) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
// Check that at most one credential is set on the application
|
|
154
|
+
if ((clientSecretNotEmpty && clientAssertionNotEmpty) ||
|
|
155
|
+
(clientAssertionNotEmpty && certificateNotEmpty) ||
|
|
156
|
+
(clientSecretNotEmpty && certificateNotEmpty)) {
|
|
157
|
+
throw msalCommon.ClientAuthError.createInvalidCredentialError();
|
|
158
|
+
}
|
|
159
|
+
if (configuration.auth.clientSecret) {
|
|
160
|
+
this.clientSecret = configuration.auth.clientSecret;
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (configuration.auth.clientAssertion) {
|
|
164
|
+
this.clientAssertion = ClientAssertion.ClientAssertion.fromAssertion(configuration.auth.clientAssertion);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (!certificateNotEmpty) {
|
|
168
|
+
throw msalCommon.ClientAuthError.createInvalidCredentialError();
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.clientAssertion = ClientAssertion.ClientAssertion.fromCertificate(certificate.thumbprint, certificate.privateKey, configuration.auth.clientCertificate?.x5c);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
exports.ConfidentialClientApplication = ConfidentialClientApplication;
|
|
177
|
+
//# sourceMappingURL=ConfidentialClientApplication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfidentialClientApplication.js","sources":["../../src/client/ConfidentialClientApplication.ts"],"sourcesContent":[null],"names":["ClientApplication","NodeConstants","OIDC_DEFAULT_SCOPES","UrlString","AADAuthorityConstants","ClientAuthError","REGION_ENVIRONMENT_VARIABLE","ApiId","ClientCredentialClient","AuthError","OnBehalfOfClient","StringUtils","Constants","ClientAssertion"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AAgCH;;;;AAIG;AACG,MAAO,6BACT,SAAQA,mCAAiB,CAAA;AAKzB;;;;;;;;;;;;;;;;;;AAkBG;AACH,IAAA,WAAA,CAAY,aAA4B,EAAA;QACpC,KAAK,CAAC,aAAa,CAAC,CAAC;AACrB,QAAA,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACtC,QAAA,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;KACrC;AAED;;;;;AAKG;AACH,IAAA,mBAAmB,CAAC,QAA2B,EAAA;AAC3C,QAAA,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;KACpC;AAED;;AAEG;IACI,MAAM,8BAA8B,CACvC,OAAgC,EAAA;QAEhC,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,uCAAuC,EACvC,OAAO,CAAC,aAAa,CACxB,CAAC;;AAGF,QAAA,IAAI,eAAe,CAAC;QACpB,IAAI,OAAO,CAAC,eAAe,EAAE;AACzB,YAAA,eAAe,GAAG;gBACd,SAAS,EAAE,OAAO,CAAC,eAAe;gBAClC,aAAa,EAAEC,mBAAa,CAAC,yBAAyB;a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,eAAe,CACrC,CAAC;YACF,OAAO;AACV,SAAA;QAED,IAAI,CAAC,mBAAmB,EAAE;AACtB,YAAA,MAAMR,0BAAe,CAAC,4BAA4B,EAAE,CAAC;AACxD,SAAA;AAAM,aAAA;YACH,IAAI,CAAC,eAAe,GAAGQ,+BAAe,CAAC,eAAe,CAClD,WAAW,CAAC,UAAU,EACtB,WAAW,CAAC,UAAU,EACtB,aAAa,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,CAC5C,CAAC;AACL,SAAA;KACJ;AACJ;;;;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AuthenticationResult, BaseClient, ClientConfiguration, CommonDeviceCodeRequest } from "@azure/msal-common";
|
|
2
|
+
/**
|
|
3
|
+
* OAuth2.0 Device code client
|
|
4
|
+
*/
|
|
5
|
+
export declare class DeviceCodeClient extends BaseClient {
|
|
6
|
+
constructor(configuration: ClientConfiguration);
|
|
7
|
+
/**
|
|
8
|
+
* Gets device code from device code endpoint, calls back to with device code response, and
|
|
9
|
+
* polls token endpoint to exchange device code for tokens
|
|
10
|
+
* @param request
|
|
11
|
+
*/
|
|
12
|
+
acquireToken(request: CommonDeviceCodeRequest): Promise<AuthenticationResult | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates device code request and executes http GET
|
|
15
|
+
* @param request
|
|
16
|
+
*/
|
|
17
|
+
private getDeviceCode;
|
|
18
|
+
/**
|
|
19
|
+
* Creates query string for the device code request
|
|
20
|
+
* @param request
|
|
21
|
+
*/
|
|
22
|
+
createExtraQueryParameters(request: CommonDeviceCodeRequest): string;
|
|
23
|
+
/**
|
|
24
|
+
* Executes POST request to device code endpoint
|
|
25
|
+
* @param deviceCodeEndpoint
|
|
26
|
+
* @param queryString
|
|
27
|
+
* @param headers
|
|
28
|
+
*/
|
|
29
|
+
private executePostRequestToDeviceCodeEndpoint;
|
|
30
|
+
/**
|
|
31
|
+
* Create device code endpoint query parameters and returns string
|
|
32
|
+
*/
|
|
33
|
+
private createQueryString;
|
|
34
|
+
/**
|
|
35
|
+
* Breaks the polling with specific conditions.
|
|
36
|
+
* @param request CommonDeviceCodeRequest
|
|
37
|
+
* @param deviceCodeResponse DeviceCodeResponse
|
|
38
|
+
*/
|
|
39
|
+
private continuePolling;
|
|
40
|
+
/**
|
|
41
|
+
* Creates token request with device code response and polls token endpoint at interval set by the device code
|
|
42
|
+
* response
|
|
43
|
+
* @param request
|
|
44
|
+
* @param deviceCodeResponse
|
|
45
|
+
*/
|
|
46
|
+
private acquireTokenWithDeviceCode;
|
|
47
|
+
/**
|
|
48
|
+
* Creates query parameters and converts to string.
|
|
49
|
+
* @param request
|
|
50
|
+
* @param deviceCodeResponse
|
|
51
|
+
*/
|
|
52
|
+
private createTokenRequestBody;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=DeviceCodeClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceCodeClient.d.ts","sourceRoot":"","sources":["../../src/client/DeviceCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EACpB,UAAU,EAEV,mBAAmB,EACnB,uBAAuB,EAa1B,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAChC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA4BvC;;;OAGG;YACW,aAAa;IA8B3B;;;OAGG;IACH,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM;IAYpE;;;;;OAKG;YACW,sCAAsC;IAkCpD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA2BzB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAiCvB;;;;;OAKG;YACW,0BAA0B;IAoFxC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAqCjC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/*! @azure/msal-node v2.0.0-alpha.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { BaseClient, TimeUtils, ResponseHandler, UrlString, RequestParameterBuilder, StringUtils, ClientAuthError, Constants, ServerError, GrantType } from '@azure/msal-common';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
+
* Licensed under the MIT License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* OAuth2.0 Device code client
|
|
11
|
+
*/
|
|
12
|
+
class DeviceCodeClient extends BaseClient {
|
|
13
|
+
constructor(configuration) {
|
|
14
|
+
super(configuration);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Gets device code from device code endpoint, calls back to with device code response, and
|
|
18
|
+
* polls token endpoint to exchange device code for tokens
|
|
19
|
+
* @param request
|
|
20
|
+
*/
|
|
21
|
+
async acquireToken(request) {
|
|
22
|
+
const deviceCodeResponse = await this.getDeviceCode(request);
|
|
23
|
+
request.deviceCodeCallback(deviceCodeResponse);
|
|
24
|
+
const reqTimestamp = TimeUtils.nowSeconds();
|
|
25
|
+
const response = await this.acquireTokenWithDeviceCode(request, deviceCodeResponse);
|
|
26
|
+
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
27
|
+
// Validate response. This function throws a server error if an error is returned by the server.
|
|
28
|
+
responseHandler.validateTokenResponse(response);
|
|
29
|
+
return await responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates device code request and executes http GET
|
|
33
|
+
* @param request
|
|
34
|
+
*/
|
|
35
|
+
async getDeviceCode(request) {
|
|
36
|
+
const queryParametersString = this.createExtraQueryParameters(request);
|
|
37
|
+
const endpoint = UrlString.appendQueryString(this.authority.deviceCodeEndpoint, queryParametersString);
|
|
38
|
+
const queryString = this.createQueryString(request);
|
|
39
|
+
const headers = this.createTokenRequestHeaders();
|
|
40
|
+
const thumbprint = {
|
|
41
|
+
clientId: this.config.authOptions.clientId,
|
|
42
|
+
authority: request.authority,
|
|
43
|
+
scopes: request.scopes,
|
|
44
|
+
claims: request.claims,
|
|
45
|
+
authenticationScheme: request.authenticationScheme,
|
|
46
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
47
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
48
|
+
shrClaims: request.shrClaims,
|
|
49
|
+
sshKid: request.sshKid,
|
|
50
|
+
};
|
|
51
|
+
return this.executePostRequestToDeviceCodeEndpoint(endpoint, queryString, headers, thumbprint);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Creates query string for the device code request
|
|
55
|
+
* @param request
|
|
56
|
+
*/
|
|
57
|
+
createExtraQueryParameters(request) {
|
|
58
|
+
const parameterBuilder = new RequestParameterBuilder();
|
|
59
|
+
if (request.extraQueryParameters) {
|
|
60
|
+
parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);
|
|
61
|
+
}
|
|
62
|
+
return parameterBuilder.createQueryString();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Executes POST request to device code endpoint
|
|
66
|
+
* @param deviceCodeEndpoint
|
|
67
|
+
* @param queryString
|
|
68
|
+
* @param headers
|
|
69
|
+
*/
|
|
70
|
+
async executePostRequestToDeviceCodeEndpoint(deviceCodeEndpoint, queryString, headers, thumbprint) {
|
|
71
|
+
const { body: { user_code: userCode, device_code: deviceCode, verification_uri: verificationUri, expires_in: expiresIn, interval, message, }, } = await this.networkManager.sendPostRequest(thumbprint, deviceCodeEndpoint, {
|
|
72
|
+
body: queryString,
|
|
73
|
+
headers: headers,
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
userCode,
|
|
77
|
+
deviceCode,
|
|
78
|
+
verificationUri,
|
|
79
|
+
expiresIn,
|
|
80
|
+
interval,
|
|
81
|
+
message,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Create device code endpoint query parameters and returns string
|
|
86
|
+
*/
|
|
87
|
+
createQueryString(request) {
|
|
88
|
+
const parameterBuilder = new RequestParameterBuilder();
|
|
89
|
+
parameterBuilder.addScopes(request.scopes);
|
|
90
|
+
parameterBuilder.addClientId(this.config.authOptions.clientId);
|
|
91
|
+
if (request.extraQueryParameters) {
|
|
92
|
+
parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);
|
|
93
|
+
}
|
|
94
|
+
if (!StringUtils.isEmpty(request.claims) ||
|
|
95
|
+
(this.config.authOptions.clientCapabilities &&
|
|
96
|
+
this.config.authOptions.clientCapabilities.length > 0)) {
|
|
97
|
+
parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
|
|
98
|
+
}
|
|
99
|
+
return parameterBuilder.createQueryString();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Breaks the polling with specific conditions.
|
|
103
|
+
* @param request CommonDeviceCodeRequest
|
|
104
|
+
* @param deviceCodeResponse DeviceCodeResponse
|
|
105
|
+
*/
|
|
106
|
+
continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, userSpecifiedCancelFlag) {
|
|
107
|
+
if (userSpecifiedCancelFlag) {
|
|
108
|
+
this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true");
|
|
109
|
+
throw ClientAuthError.createDeviceCodeCancelledError();
|
|
110
|
+
}
|
|
111
|
+
else if (userSpecifiedTimeout &&
|
|
112
|
+
userSpecifiedTimeout < deviceCodeExpirationTime &&
|
|
113
|
+
TimeUtils.nowSeconds() > userSpecifiedTimeout) {
|
|
114
|
+
this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}`);
|
|
115
|
+
throw ClientAuthError.createUserTimeoutReachedError();
|
|
116
|
+
}
|
|
117
|
+
else if (TimeUtils.nowSeconds() > deviceCodeExpirationTime) {
|
|
118
|
+
if (userSpecifiedTimeout) {
|
|
119
|
+
this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${userSpecifiedTimeout}`);
|
|
120
|
+
}
|
|
121
|
+
this.logger.error(`Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}`);
|
|
122
|
+
throw ClientAuthError.createDeviceCodeExpiredError();
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Creates token request with device code response and polls token endpoint at interval set by the device code
|
|
128
|
+
* response
|
|
129
|
+
* @param request
|
|
130
|
+
* @param deviceCodeResponse
|
|
131
|
+
*/
|
|
132
|
+
async acquireTokenWithDeviceCode(request, deviceCodeResponse) {
|
|
133
|
+
const queryParametersString = this.createTokenQueryParameters(request);
|
|
134
|
+
const endpoint = UrlString.appendQueryString(this.authority.tokenEndpoint, queryParametersString);
|
|
135
|
+
const requestBody = this.createTokenRequestBody(request, deviceCodeResponse);
|
|
136
|
+
const headers = this.createTokenRequestHeaders();
|
|
137
|
+
const userSpecifiedTimeout = request.timeout
|
|
138
|
+
? TimeUtils.nowSeconds() + request.timeout
|
|
139
|
+
: undefined;
|
|
140
|
+
const deviceCodeExpirationTime = TimeUtils.nowSeconds() + deviceCodeResponse.expiresIn;
|
|
141
|
+
const pollingIntervalMilli = deviceCodeResponse.interval * 1000;
|
|
142
|
+
/*
|
|
143
|
+
* Poll token endpoint while (device code is not expired AND operation has not been cancelled by
|
|
144
|
+
* setting CancellationToken.cancel = true). POST request is sent at interval set by pollingIntervalMilli
|
|
145
|
+
*/
|
|
146
|
+
while (this.continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, request.cancel)) {
|
|
147
|
+
const thumbprint = {
|
|
148
|
+
clientId: this.config.authOptions.clientId,
|
|
149
|
+
authority: request.authority,
|
|
150
|
+
scopes: request.scopes,
|
|
151
|
+
claims: request.claims,
|
|
152
|
+
authenticationScheme: request.authenticationScheme,
|
|
153
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
154
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
155
|
+
shrClaims: request.shrClaims,
|
|
156
|
+
sshKid: request.sshKid,
|
|
157
|
+
};
|
|
158
|
+
const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint);
|
|
159
|
+
if (response.body && response.body.error) {
|
|
160
|
+
// user authorization is pending. Sleep for polling interval and try again
|
|
161
|
+
if (response.body.error === Constants.AUTHORIZATION_PENDING) {
|
|
162
|
+
this.logger.info("Authorization pending. Continue polling.");
|
|
163
|
+
await TimeUtils.delay(pollingIntervalMilli);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
// for any other error, throw
|
|
167
|
+
this.logger.info("Unexpected error in polling from the server");
|
|
168
|
+
throw ServerError.createPostRequestFailed(response.body.error);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.logger.verbose("Authorization completed successfully. Polling stopped.");
|
|
173
|
+
return response.body;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/*
|
|
177
|
+
* The above code should've thrown by this point, but to satisfy TypeScript,
|
|
178
|
+
* and in the rare case the conditionals in continuePolling() may not catch everything...
|
|
179
|
+
*/
|
|
180
|
+
this.logger.error("Polling stopped for unknown reasons.");
|
|
181
|
+
throw ClientAuthError.createDeviceCodeUnknownError();
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Creates query parameters and converts to string.
|
|
185
|
+
* @param request
|
|
186
|
+
* @param deviceCodeResponse
|
|
187
|
+
*/
|
|
188
|
+
createTokenRequestBody(request, deviceCodeResponse) {
|
|
189
|
+
const requestParameters = new RequestParameterBuilder();
|
|
190
|
+
requestParameters.addScopes(request.scopes);
|
|
191
|
+
requestParameters.addClientId(this.config.authOptions.clientId);
|
|
192
|
+
requestParameters.addGrantType(GrantType.DEVICE_CODE_GRANT);
|
|
193
|
+
requestParameters.addDeviceCode(deviceCodeResponse.deviceCode);
|
|
194
|
+
const correlationId = request.correlationId ||
|
|
195
|
+
this.config.cryptoInterface.createNewGuid();
|
|
196
|
+
requestParameters.addCorrelationId(correlationId);
|
|
197
|
+
requestParameters.addClientInfo();
|
|
198
|
+
requestParameters.addLibraryInfo(this.config.libraryInfo);
|
|
199
|
+
requestParameters.addApplicationTelemetry(this.config.telemetry.application);
|
|
200
|
+
requestParameters.addThrottling();
|
|
201
|
+
if (this.serverTelemetryManager) {
|
|
202
|
+
requestParameters.addServerTelemetry(this.serverTelemetryManager);
|
|
203
|
+
}
|
|
204
|
+
if (!StringUtils.isEmptyObj(request.claims) ||
|
|
205
|
+
(this.config.authOptions.clientCapabilities &&
|
|
206
|
+
this.config.authOptions.clientCapabilities.length > 0)) {
|
|
207
|
+
requestParameters.addClaims(request.claims, this.config.authOptions.clientCapabilities);
|
|
208
|
+
}
|
|
209
|
+
return requestParameters.createQueryString();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export { DeviceCodeClient };
|
|
214
|
+
//# sourceMappingURL=DeviceCodeClient.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceCodeClient.esm.js","sources":["../../src/client/DeviceCodeClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAsBH;;AAEG;AACG,MAAO,gBAAiB,SAAQ,UAAU,CAAA;AAC5C,IAAA,WAAA,CAAY,aAAkC,EAAA;QAC1C,KAAK,CAAC,aAAa,CAAC,CAAC;KACxB;AAED;;;;AAIG;IACI,MAAM,YAAY,CACrB,OAAgC,EAAA;QAEhC,MAAM,kBAAkB,GAAuB,MAAM,IAAI,CAAC,aAAa,CACnE,OAAO,CACV,CAAC;AACF,QAAA,OAAO,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;AAC/C,QAAA,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,QAAQ,GACV,MAAM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