@azure/msal-node 2.13.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache/ITokenCache.d.ts +1 -1
- package/dist/cache/ITokenCache.d.ts.map +1 -1
- package/dist/cache/NodeStorage.d.ts +1 -1
- package/dist/cache/NodeStorage.d.ts.map +1 -1
- package/dist/cache/NodeStorage.mjs +2 -2
- package/dist/cache/TokenCache.d.ts +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +2 -2
- package/dist/cache/distributed/DistributedCachePlugin.d.ts +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +2 -2
- package/dist/cache/distributed/IPartitionManager.d.ts +1 -1
- package/dist/cache/distributed/IPartitionManager.d.ts.map +1 -1
- package/dist/cache/serializer/Deserializer.d.ts +1 -1
- package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
- package/dist/cache/serializer/Deserializer.mjs +2 -2
- package/dist/cache/serializer/Serializer.d.ts +1 -1
- package/dist/cache/serializer/Serializer.d.ts.map +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/cache/serializer/SerializerTypes.d.ts +1 -1
- 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.mjs +2 -2
- package/dist/client/ClientAssertion.mjs +2 -2
- package/dist/client/ClientCredentialClient.d.ts +2 -2
- package/dist/client/ClientCredentialClient.d.ts.map +1 -1
- package/dist/client/ClientCredentialClient.mjs +2 -2
- package/dist/client/ConfidentialClientApplication.d.ts +1 -1
- package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +3 -2
- package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
- package/dist/client/DeviceCodeClient.d.ts +1 -1
- package/dist/client/DeviceCodeClient.d.ts.map +1 -1
- package/dist/client/DeviceCodeClient.mjs +2 -2
- package/dist/client/IConfidentialClientApplication.d.ts +1 -1
- 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/ManagedIdentityApplication.d.ts +4 -4
- package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +2 -2
- package/dist/client/ManagedIdentityClient.d.ts +6 -6
- package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.d.ts +6 -6
- package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +2 -2
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts +7 -7
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +2 -2
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +8 -8
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +2 -2
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts +6 -6
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +2 -2
- package/dist/client/ManagedIdentitySources/Imds.d.ts +6 -6
- package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +2 -2
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +6 -6
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +2 -2
- package/dist/client/OnBehalfOfClient.d.ts +1 -1
- package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
- package/dist/client/OnBehalfOfClient.mjs +2 -2
- package/dist/client/PublicClientApplication.d.ts +1 -1
- package/dist/client/PublicClientApplication.d.ts.map +1 -1
- package/dist/client/PublicClientApplication.mjs +2 -2
- package/dist/client/UsernamePasswordClient.d.ts +1 -1
- package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
- package/dist/client/UsernamePasswordClient.mjs +2 -2
- package/dist/config/Configuration.d.ts +3 -3
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +2 -2
- package/dist/config/ManagedIdentityId.d.ts +2 -2
- package/dist/config/ManagedIdentityId.d.ts.map +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.d.ts +1 -1
- package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +2 -2
- package/dist/crypto/CryptoProvider.d.ts +1 -1
- package/dist/crypto/CryptoProvider.d.ts.map +1 -1
- package/dist/crypto/CryptoProvider.mjs +1 -1
- package/dist/crypto/GuidGenerator.d.ts +1 -1
- package/dist/crypto/GuidGenerator.d.ts.map +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/HashUtils.d.ts +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/PkceGenerator.d.ts +1 -1
- package/dist/crypto/PkceGenerator.d.ts.map +1 -1
- package/dist/crypto/PkceGenerator.mjs +2 -2
- package/dist/error/ManagedIdentityError.d.ts +2 -2
- package/dist/error/ManagedIdentityError.d.ts.map +1 -1
- package/dist/error/ManagedIdentityError.mjs +2 -2
- package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
- package/dist/error/NodeAuthError.d.ts +1 -1
- package/dist/error/NodeAuthError.d.ts.map +1 -1
- package/dist/error/NodeAuthError.mjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/internals.mjs +5 -1
- package/dist/internals.mjs.map +1 -1
- package/dist/network/HttpClient.d.ts +3 -3
- package/dist/network/HttpClient.d.ts.map +1 -1
- package/dist/network/HttpClient.mjs +2 -2
- package/dist/network/HttpClientWithRetries.d.ts +2 -2
- package/dist/network/HttpClientWithRetries.d.ts.map +1 -1
- package/dist/network/HttpClientWithRetries.mjs +2 -2
- package/dist/network/ILoopbackClient.d.ts +1 -1
- package/dist/network/ILoopbackClient.d.ts.map +1 -1
- package/dist/network/LoopbackClient.d.ts +1 -1
- package/dist/network/LoopbackClient.d.ts.map +1 -1
- package/dist/network/LoopbackClient.mjs +3 -3
- package/dist/network/LoopbackClient.mjs.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- 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/ManagedIdentityRequest.d.ts +2 -2
- package/dist/request/ManagedIdentityRequest.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/response/ManagedIdentityTokenResponse.d.ts +1 -1
- package/dist/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
- package/dist/retry/IHttpRetryPolicy.d.ts +1 -1
- package/dist/retry/LinearRetryPolicy.d.ts +2 -2
- package/dist/retry/LinearRetryPolicy.d.ts.map +1 -1
- package/dist/retry/LinearRetryPolicy.mjs +1 -1
- package/dist/utils/Constants.mjs +2 -2
- package/dist/utils/EncodingUtils.d.ts +1 -1
- package/dist/utils/EncodingUtils.mjs +2 -2
- package/dist/utils/NetworkUtils.d.ts +1 -1
- package/dist/utils/NetworkUtils.d.ts.map +1 -1
- package/dist/utils/NetworkUtils.mjs +1 -1
- package/dist/utils/NetworkUtils.mjs.map +1 -1
- package/lib/msal-node.cjs +12362 -0
- package/lib/msal-node.cjs.map +1 -0
- package/lib/package.json +1 -0
- package/lib/types/cache/ITokenCache.d.ts +16 -0
- package/lib/types/cache/ITokenCache.d.ts.map +1 -0
- package/lib/types/cache/NodeStorage.d.ts +194 -0
- package/lib/types/cache/NodeStorage.d.ts.map +1 -0
- package/lib/types/cache/TokenCache.d.ts +91 -0
- package/lib/types/cache/TokenCache.d.ts.map +1 -0
- package/lib/types/cache/distributed/DistributedCachePlugin.d.ts +11 -0
- package/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +1 -0
- package/lib/types/cache/distributed/ICacheClient.d.ts +18 -0
- package/lib/types/cache/distributed/ICacheClient.d.ts.map +1 -0
- package/lib/types/cache/distributed/IPartitionManager.d.ts +29 -0
- package/lib/types/cache/distributed/IPartitionManager.d.ts.map +1 -0
- package/lib/types/cache/serializer/Deserializer.d.ts +43 -0
- package/lib/types/cache/serializer/Deserializer.d.ts.map +1 -0
- package/lib/types/cache/serializer/Serializer.d.ts +40 -0
- package/lib/types/cache/serializer/Serializer.d.ts.map +1 -0
- package/lib/types/cache/serializer/SerializerTypes.d.ts +103 -0
- package/lib/types/cache/serializer/SerializerTypes.d.ts.map +1 -0
- package/lib/types/client/ClientApplication.d.ts +144 -0
- package/lib/types/client/ClientApplication.d.ts.map +1 -0
- package/lib/types/client/ClientAssertion.d.ts +56 -0
- package/lib/types/client/ClientAssertion.d.ts.map +1 -0
- package/lib/types/client/ClientCredentialClient.d.ts +34 -0
- package/lib/types/client/ClientCredentialClient.d.ts.map +1 -0
- package/lib/types/client/ConfidentialClientApplication.d.ts +59 -0
- package/lib/types/client/ConfidentialClientApplication.d.ts.map +1 -0
- package/lib/types/client/DeviceCodeClient.d.ts +54 -0
- package/lib/types/client/DeviceCodeClient.d.ts.map +1 -0
- package/lib/types/client/IConfidentialClientApplication.d.ts +40 -0
- package/lib/types/client/IConfidentialClientApplication.d.ts.map +1 -0
- package/lib/types/client/IPublicClientApplication.d.ts +43 -0
- package/lib/types/client/IPublicClientApplication.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentityApplication.d.ts +31 -0
- package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentityClient.d.ts +28 -0
- package/lib/types/client/ManagedIdentityClient.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentitySources/AppService.d.ts +18 -0
- package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +28 -0
- package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +31 -0
- package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +17 -0
- package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentitySources/Imds.d.ts +13 -0
- package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -0
- package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +18 -0
- package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -0
- package/lib/types/client/OnBehalfOfClient.d.ts +48 -0
- package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -0
- package/lib/types/client/PublicClientApplication.d.ts +73 -0
- package/lib/types/client/PublicClientApplication.d.ts.map +1 -0
- package/lib/types/client/UsernamePasswordClient.d.ts +26 -0
- package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -0
- package/lib/types/config/Configuration.d.ts +132 -0
- package/lib/types/config/Configuration.d.ts.map +1 -0
- package/lib/types/config/ManagedIdentityId.d.ts +12 -0
- package/lib/types/config/ManagedIdentityId.d.ts.map +1 -0
- package/lib/types/config/ManagedIdentityRequestParameters.d.ts +12 -0
- package/lib/types/config/ManagedIdentityRequestParameters.d.ts.map +1 -0
- package/lib/types/crypto/CryptoProvider.d.ts +63 -0
- package/lib/types/crypto/CryptoProvider.d.ts.map +1 -0
- package/lib/types/crypto/GuidGenerator.d.ts +15 -0
- package/lib/types/crypto/GuidGenerator.d.ts.map +1 -0
- package/lib/types/crypto/HashUtils.d.ts +9 -0
- package/lib/types/crypto/HashUtils.d.ts.map +1 -0
- package/lib/types/crypto/PkceGenerator.d.ts +23 -0
- package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
- package/lib/types/error/ManagedIdentityError.d.ts +31 -0
- package/lib/types/error/ManagedIdentityError.d.ts.map +1 -0
- package/lib/types/error/ManagedIdentityErrorCodes.d.ts +23 -0
- package/lib/types/error/ManagedIdentityErrorCodes.d.ts.map +1 -0
- package/lib/types/error/NodeAuthError.d.ts +74 -0
- package/lib/types/error/NodeAuthError.d.ts.map +1 -0
- package/lib/types/index.d.ts +46 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/internals.d.ts +7 -0
- package/lib/types/internals.d.ts.map +1 -0
- package/lib/types/network/HttpClient.d.ts +26 -0
- package/lib/types/network/HttpClient.d.ts.map +1 -0
- package/lib/types/network/HttpClientWithRetries.d.ts +12 -0
- package/lib/types/network/HttpClientWithRetries.d.ts.map +1 -0
- package/lib/types/network/ILoopbackClient.d.ts +11 -0
- package/lib/types/network/ILoopbackClient.d.ts.map +1 -0
- package/lib/types/network/LoopbackClient.d.ts +22 -0
- package/lib/types/network/LoopbackClient.d.ts.map +1 -0
- package/lib/types/packageMetadata.d.ts +3 -0
- package/lib/types/packageMetadata.d.ts.map +1 -0
- package/lib/types/request/AuthorizationCodeRequest.d.ts +22 -0
- package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
- package/lib/types/request/AuthorizationUrlRequest.d.ts +34 -0
- package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
- package/lib/types/request/ClientCredentialRequest.d.ts +15 -0
- package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -0
- package/lib/types/request/DeviceCodeRequest.d.ts +16 -0
- package/lib/types/request/DeviceCodeRequest.d.ts.map +1 -0
- package/lib/types/request/InteractiveRequest.d.ts +23 -0
- package/lib/types/request/InteractiveRequest.d.ts.map +1 -0
- package/lib/types/request/ManagedIdentityRequest.d.ts +9 -0
- package/lib/types/request/ManagedIdentityRequest.d.ts.map +1 -0
- package/lib/types/request/ManagedIdentityRequestParams.d.ts +10 -0
- package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -0
- package/lib/types/request/OnBehalfOfRequest.d.ts +15 -0
- package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -0
- package/lib/types/request/RefreshTokenRequest.d.ts +18 -0
- package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -0
- package/lib/types/request/SignOutRequest.d.ts +6 -0
- package/lib/types/request/SignOutRequest.d.ts.map +1 -0
- package/lib/types/request/SilentFlowRequest.d.ts +17 -0
- package/lib/types/request/SilentFlowRequest.d.ts.map +1 -0
- package/lib/types/request/UsernamePasswordRequest.d.ts +20 -0
- package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -0
- package/lib/types/response/ManagedIdentityTokenResponse.d.ts +35 -0
- package/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +1 -0
- package/lib/types/retry/IHttpRetryPolicy.d.ts +6 -0
- package/lib/types/retry/IHttpRetryPolicy.d.ts.map +1 -0
- package/lib/types/retry/LinearRetryPolicy.d.ts +12 -0
- package/lib/types/retry/LinearRetryPolicy.d.ts.map +1 -0
- package/lib/types/utils/Constants.d.ts +142 -0
- package/lib/types/utils/Constants.d.ts.map +1 -0
- package/lib/types/utils/EncodingUtils.d.ts +27 -0
- package/lib/types/utils/EncodingUtils.d.ts.map +1 -0
- package/lib/types/utils/NetworkUtils.d.ts +6 -0
- package/lib/types/utils/NetworkUtils.d.ts.map +1 -0
- package/package.json +13 -10
- package/src/cache/ITokenCache.ts +1 -1
- package/src/cache/NodeStorage.ts +1 -1
- package/src/cache/TokenCache.ts +1 -1
- package/src/cache/distributed/DistributedCachePlugin.ts +1 -1
- package/src/cache/distributed/IPartitionManager.ts +1 -1
- package/src/cache/serializer/Deserializer.ts +1 -1
- package/src/cache/serializer/Serializer.ts +1 -1
- package/src/cache/serializer/SerializerTypes.ts +1 -1
- package/src/client/ClientApplication.ts +1 -1
- package/src/client/ClientAssertion.ts +1 -1
- package/src/client/ClientCredentialClient.ts +2 -2
- package/src/client/ConfidentialClientApplication.ts +1 -1
- package/src/client/DeviceCodeClient.ts +1 -1
- package/src/client/IConfidentialClientApplication.ts +1 -1
- package/src/client/IPublicClientApplication.ts +5 -1
- package/src/client/ManagedIdentityApplication.ts +9 -9
- package/src/client/ManagedIdentityClient.ts +13 -13
- package/src/client/ManagedIdentitySources/AppService.ts +7 -7
- package/src/client/ManagedIdentitySources/AzureArc.ts +9 -9
- package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +9 -9
- package/src/client/ManagedIdentitySources/CloudShell.ts +8 -8
- package/src/client/ManagedIdentitySources/Imds.ts +7 -7
- package/src/client/ManagedIdentitySources/ServiceFabric.ts +7 -7
- package/src/client/OnBehalfOfClient.ts +2 -2
- package/src/client/PublicClientApplication.ts +2 -2
- package/src/client/UsernamePasswordClient.ts +1 -1
- package/src/config/Configuration.ts +1 -1
- package/src/config/ManagedIdentityId.ts +3 -3
- package/src/config/ManagedIdentityRequestParameters.ts +2 -2
- package/src/crypto/CryptoProvider.ts +1 -1
- package/src/crypto/GuidGenerator.ts +1 -1
- package/src/crypto/PkceGenerator.ts +1 -1
- package/src/error/ManagedIdentityError.ts +3 -3
- package/src/error/ManagedIdentityErrorCodes.ts +1 -1
- package/src/error/NodeAuthError.ts +1 -1
- package/src/index.ts +1 -1
- package/src/network/HttpClient.ts +1 -1
- package/src/network/HttpClientWithRetries.ts +3 -3
- package/src/network/ILoopbackClient.ts +1 -1
- package/src/network/LoopbackClient.ts +2 -2
- package/src/packageMetadata.ts +1 -1
- package/src/request/AuthorizationCodeRequest.ts +1 -1
- package/src/request/AuthorizationUrlRequest.ts +1 -1
- package/src/request/ClientCredentialRequest.ts +1 -1
- package/src/request/DeviceCodeRequest.ts +1 -1
- package/src/request/ManagedIdentityRequest.ts +2 -2
- package/src/request/OnBehalfOfRequest.ts +1 -1
- package/src/request/RefreshTokenRequest.ts +1 -1
- package/src/request/SignOutRequest.ts +1 -1
- package/src/request/SilentFlowRequest.ts +1 -1
- package/src/request/UsernamePasswordRequest.ts +1 -1
- package/src/response/ManagedIdentityTokenResponse.ts +1 -1
- package/src/retry/LinearRetryPolicy.ts +1 -1
- package/src/utils/Constants.ts +1 -1
- package/src/utils/EncodingUtils.ts +1 -1
- package/src/utils/NetworkUtils.ts +4 -1
- package/dist/cache/NodeStorage.cjs +0 -436
- package/dist/cache/NodeStorage.cjs.map +0 -1
- package/dist/cache/TokenCache.cjs +0 -278
- package/dist/cache/TokenCache.cjs.map +0 -1
- package/dist/cache/distributed/DistributedCachePlugin.cjs +0 -37
- package/dist/cache/distributed/DistributedCachePlugin.cjs.map +0 -1
- package/dist/cache/serializer/Deserializer.cjs +0 -178
- package/dist/cache/serializer/Deserializer.cjs.map +0 -1
- package/dist/cache/serializer/Serializer.cjs +0 -146
- package/dist/cache/serializer/Serializer.cjs.map +0 -1
- package/dist/client/ClientApplication.cjs +0 -354
- package/dist/client/ClientApplication.cjs.map +0 -1
- package/dist/client/ClientAssertion.cjs +0 -161
- package/dist/client/ClientAssertion.cjs.map +0 -1
- package/dist/client/ClientCredentialClient.cjs +0 -205
- package/dist/client/ClientCredentialClient.cjs.map +0 -1
- package/dist/client/ConfidentialClientApplication.cjs +0 -184
- package/dist/client/ConfidentialClientApplication.cjs.map +0 -1
- package/dist/client/DeviceCodeClient.cjs +0 -218
- package/dist/client/DeviceCodeClient.cjs.map +0 -1
- package/dist/client/ManagedIdentityApplication.cjs +0 -102
- package/dist/client/ManagedIdentityApplication.cjs.map +0 -1
- package/dist/client/ManagedIdentityClient.cjs +0 -78
- package/dist/client/ManagedIdentityClient.cjs.map +0 -1
- package/dist/client/ManagedIdentitySources/AppService.cjs +0 -58
- package/dist/client/ManagedIdentitySources/AppService.cjs.map +0 -1
- package/dist/client/ManagedIdentitySources/AzureArc.cjs +0 -179
- package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +0 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +0 -137
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +0 -1
- package/dist/client/ManagedIdentitySources/CloudShell.cjs +0 -53
- package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +0 -1
- package/dist/client/ManagedIdentitySources/Imds.cjs +0 -56
- package/dist/client/ManagedIdentitySources/Imds.cjs.map +0 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +0 -67
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +0 -1
- package/dist/client/OnBehalfOfClient.cjs +0 -214
- package/dist/client/OnBehalfOfClient.cjs.map +0 -1
- package/dist/client/PublicClientApplication.cjs +0 -254
- package/dist/client/PublicClientApplication.cjs.map +0 -1
- package/dist/client/UsernamePasswordClient.cjs +0 -106
- package/dist/client/UsernamePasswordClient.cjs.map +0 -1
- package/dist/config/Configuration.cjs +0 -124
- package/dist/config/Configuration.cjs.map +0 -1
- package/dist/config/ManagedIdentityId.cjs +0 -61
- package/dist/config/ManagedIdentityId.cjs.map +0 -1
- package/dist/config/ManagedIdentityRequestParameters.cjs +0 -39
- package/dist/config/ManagedIdentityRequestParameters.cjs.map +0 -1
- package/dist/crypto/CryptoProvider.cjs +0 -103
- package/dist/crypto/CryptoProvider.cjs.map +0 -1
- package/dist/crypto/GuidGenerator.cjs +0 -33
- package/dist/crypto/GuidGenerator.cjs.map +0 -1
- package/dist/crypto/HashUtils.cjs +0 -29
- package/dist/crypto/HashUtils.cjs.map +0 -1
- package/dist/crypto/PkceGenerator.cjs +0 -68
- package/dist/crypto/PkceGenerator.cjs.map +0 -1
- package/dist/error/ManagedIdentityError.cjs +0 -56
- package/dist/error/ManagedIdentityError.cjs.map +0 -1
- package/dist/error/ManagedIdentityErrorCodes.cjs +0 -49
- package/dist/error/ManagedIdentityErrorCodes.cjs.map +0 -1
- package/dist/error/NodeAuthError.cjs +0 -107
- package/dist/error/NodeAuthError.cjs.map +0 -1
- package/dist/index.cjs +0 -125
- package/dist/index.cjs.map +0 -1
- package/dist/internals.cjs +0 -17
- package/dist/internals.cjs.map +0 -1
- package/dist/network/HttpClient.cjs +0 -301
- package/dist/network/HttpClient.cjs.map +0 -1
- package/dist/network/HttpClientWithRetries.cjs +0 -46
- package/dist/network/HttpClientWithRetries.cjs.map +0 -1
- package/dist/network/LoopbackClient.cjs +0 -99
- package/dist/network/LoopbackClient.cjs.map +0 -1
- package/dist/packageMetadata.cjs +0 -13
- package/dist/packageMetadata.cjs.map +0 -1
- package/dist/retry/LinearRetryPolicy.cjs +0 -49
- package/dist/retry/LinearRetryPolicy.cjs.map +0 -1
- package/dist/utils/Constants.cjs +0 -172
- package/dist/utils/Constants.cjs.map +0 -1
- package/dist/utils/EncodingUtils.cjs +0 -55
- package/dist/utils/EncodingUtils.cjs.map +0 -1
- package/dist/utils/NetworkUtils.cjs +0 -47
- package/dist/utils/NetworkUtils.cjs.map +0 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { ClientConfiguration, AuthenticationResult, BaseAuthRequest, Logger, ServerTelemetryManager, AzureRegionConfiguration, AzureCloudOptions, AuthorizationCodePayload, ClientAssertionCallback } from "@azure/msal-common/node";
|
|
2
|
+
import { Configuration, NodeConfiguration } from "../config/Configuration.js";
|
|
3
|
+
import { CryptoProvider } from "../crypto/CryptoProvider.js";
|
|
4
|
+
import { NodeStorage } from "../cache/NodeStorage.js";
|
|
5
|
+
import { TokenCache } from "../cache/TokenCache.js";
|
|
6
|
+
import { ClientAssertion } from "./ClientAssertion.js";
|
|
7
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
|
|
8
|
+
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
|
|
9
|
+
import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js";
|
|
10
|
+
import { SilentFlowRequest } from "../request/SilentFlowRequest.js";
|
|
11
|
+
import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js";
|
|
12
|
+
/**
|
|
13
|
+
* Base abstract class for all ClientApplications - public and confidential
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class ClientApplication {
|
|
17
|
+
protected readonly cryptoProvider: CryptoProvider;
|
|
18
|
+
private tokenCache;
|
|
19
|
+
/**
|
|
20
|
+
* Platform storage object
|
|
21
|
+
*/
|
|
22
|
+
protected storage: NodeStorage;
|
|
23
|
+
/**
|
|
24
|
+
* Logger object to log the application flow
|
|
25
|
+
*/
|
|
26
|
+
protected logger: Logger;
|
|
27
|
+
/**
|
|
28
|
+
* Platform configuration initialized by the application
|
|
29
|
+
*/
|
|
30
|
+
protected config: NodeConfiguration;
|
|
31
|
+
/**
|
|
32
|
+
* Client assertion passed by the user for confidential client flows
|
|
33
|
+
*/
|
|
34
|
+
protected clientAssertion: ClientAssertion;
|
|
35
|
+
protected developerProvidedClientAssertion: string | ClientAssertionCallback;
|
|
36
|
+
/**
|
|
37
|
+
* Client secret passed by the user for confidential client flows
|
|
38
|
+
*/
|
|
39
|
+
protected clientSecret: string;
|
|
40
|
+
/**
|
|
41
|
+
* Constructor for the ClientApplication
|
|
42
|
+
*/
|
|
43
|
+
protected constructor(configuration: Configuration);
|
|
44
|
+
/**
|
|
45
|
+
* Creates the URL of the authorization request, letting the user input credentials and consent to the
|
|
46
|
+
* application. The URL targets the /authorize endpoint of the authority configured in the
|
|
47
|
+
* application object.
|
|
48
|
+
*
|
|
49
|
+
* Once the user inputs their credentials and consents, the authority will send a response to the redirect URI
|
|
50
|
+
* sent in the request and should contain an authorization code, which can then be used to acquire tokens via
|
|
51
|
+
* `acquireTokenByCode(AuthorizationCodeRequest)`.
|
|
52
|
+
*/
|
|
53
|
+
getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0
|
|
56
|
+
* Authorization Code flow.
|
|
57
|
+
*
|
|
58
|
+
* `getAuthCodeUrl(AuthorizationCodeUrlRequest)` can be used to create the URL for the first step of OAuth2.0
|
|
59
|
+
* Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and
|
|
60
|
+
* AuthorizationCodeRequest are the same.
|
|
61
|
+
*/
|
|
62
|
+
acquireTokenByCode(request: AuthorizationCodeRequest, authCodePayLoad?: AuthorizationCodePayload): Promise<AuthenticationResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Acquires a token by exchanging the refresh token provided for a new set of tokens.
|
|
65
|
+
*
|
|
66
|
+
* This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is
|
|
67
|
+
* recommended that you use `acquireTokenSilent()` for silent scenarios. When using `acquireTokenSilent()`, MSAL will
|
|
68
|
+
* handle the caching and refreshing of tokens automatically.
|
|
69
|
+
*/
|
|
70
|
+
acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Acquires a token silently when a user specifies the account the token is requested for.
|
|
73
|
+
*
|
|
74
|
+
* This API expects the user to provide an account object and looks into the cache to retrieve the token if present.
|
|
75
|
+
* There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token.
|
|
76
|
+
* In case the refresh_token is expired or not found, an error is thrown
|
|
77
|
+
* and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`).
|
|
78
|
+
*/
|
|
79
|
+
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult>;
|
|
80
|
+
/**
|
|
81
|
+
* Acquires tokens with password grant by exchanging client applications username and password for credentials
|
|
82
|
+
*
|
|
83
|
+
* The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely.
|
|
84
|
+
* More details on this recommendation at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-3.4
|
|
85
|
+
* Microsoft's documentation and recommendations are at:
|
|
86
|
+
* https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword
|
|
87
|
+
*
|
|
88
|
+
* @param request - UsenamePasswordRequest
|
|
89
|
+
*/
|
|
90
|
+
acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>;
|
|
91
|
+
/**
|
|
92
|
+
* Gets the token cache for the application.
|
|
93
|
+
*/
|
|
94
|
+
getTokenCache(): TokenCache;
|
|
95
|
+
/**
|
|
96
|
+
* Validates OIDC state by comparing the user cached state with the state received from the server.
|
|
97
|
+
*
|
|
98
|
+
* This API is provided for scenarios where you would use OAuth2.0 state parameter to mitigate against
|
|
99
|
+
* CSRF attacks.
|
|
100
|
+
* For more information about state, visit https://datatracker.ietf.org/doc/html/rfc6819#section-3.6.
|
|
101
|
+
* @param state
|
|
102
|
+
* @param cachedState
|
|
103
|
+
*/
|
|
104
|
+
protected validateState(state: string, cachedState: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Returns the logger instance
|
|
107
|
+
*/
|
|
108
|
+
getLogger(): Logger;
|
|
109
|
+
/**
|
|
110
|
+
* Replaces the default logger set in configurations with new Logger with new configurations
|
|
111
|
+
* @param logger - Logger instance
|
|
112
|
+
*/
|
|
113
|
+
setLogger(logger: Logger): void;
|
|
114
|
+
/**
|
|
115
|
+
* Builds the common configuration to be passed to the common component based on the platform configurarion
|
|
116
|
+
* @param authority - user passed authority in configuration
|
|
117
|
+
* @param serverTelemetryManager - initializes servertelemetry if passed
|
|
118
|
+
*/
|
|
119
|
+
protected buildOauthClientConfiguration(authority: string, requestCorrelationId: string, serverTelemetryManager?: ServerTelemetryManager, azureRegionConfiguration?: AzureRegionConfiguration, azureCloudOptions?: AzureCloudOptions): Promise<ClientConfiguration>;
|
|
120
|
+
private getClientAssertion;
|
|
121
|
+
/**
|
|
122
|
+
* Generates a request with the default scopes & generates a correlationId.
|
|
123
|
+
* @param authRequest - BaseAuthRequest for initialization
|
|
124
|
+
*/
|
|
125
|
+
protected initializeBaseRequest(authRequest: Partial<BaseAuthRequest>): Promise<BaseAuthRequest>;
|
|
126
|
+
/**
|
|
127
|
+
* Initializes the server telemetry payload
|
|
128
|
+
* @param apiId - Id for a specific request
|
|
129
|
+
* @param correlationId - GUID
|
|
130
|
+
* @param forceRefresh - boolean to indicate network call
|
|
131
|
+
*/
|
|
132
|
+
protected initializeServerTelemetryManager(apiId: number, correlationId: string, forceRefresh?: boolean): ServerTelemetryManager;
|
|
133
|
+
/**
|
|
134
|
+
* Create authority instance. If authority not passed in request, default to authority set on the application
|
|
135
|
+
* object. If no authority set in application object, then default to common authority.
|
|
136
|
+
* @param authorityString - authority from user configuration
|
|
137
|
+
*/
|
|
138
|
+
private createAuthority;
|
|
139
|
+
/**
|
|
140
|
+
* Clear the cache
|
|
141
|
+
*/
|
|
142
|
+
clearCache(): void;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=ClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1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AAM,EACb,aAAa,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,OAAO,GACvB,sBAAsB;IAWzB;;;;OAIG;YACW,eAAe;IAkC7B;;OAEG;IACH,UAAU,IAAI,IAAI;CAGrB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CryptoProvider } from "../crypto/CryptoProvider.js";
|
|
2
|
+
/**
|
|
3
|
+
* Client assertion of type jwt-bearer used in confidential client flows
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class ClientAssertion {
|
|
7
|
+
private jwt;
|
|
8
|
+
private privateKey;
|
|
9
|
+
private thumbprint;
|
|
10
|
+
private useSha256;
|
|
11
|
+
private expirationTime;
|
|
12
|
+
private issuer;
|
|
13
|
+
private jwtAudience;
|
|
14
|
+
private publicCertificate;
|
|
15
|
+
/**
|
|
16
|
+
* Initialize the ClientAssertion class from the clientAssertion passed by the user
|
|
17
|
+
* @param assertion - refer https://tools.ietf.org/html/rfc7521
|
|
18
|
+
*/
|
|
19
|
+
static fromAssertion(assertion: string): ClientAssertion;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint
|
|
22
|
+
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
23
|
+
* @param thumbprint - identifier of a certificate
|
|
24
|
+
* @param privateKey - secret key
|
|
25
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
26
|
+
*/
|
|
27
|
+
static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
|
|
28
|
+
/**
|
|
29
|
+
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
30
|
+
* @param thumbprint - identifier of a certificate
|
|
31
|
+
* @param privateKey - secret key
|
|
32
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
33
|
+
*/
|
|
34
|
+
static fromCertificateWithSha256Thumbprint(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
|
|
35
|
+
/**
|
|
36
|
+
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
37
|
+
* @param cryptoProvider - library's crypto helper
|
|
38
|
+
* @param issuer - iss claim
|
|
39
|
+
* @param jwtAudience - aud claim
|
|
40
|
+
*/
|
|
41
|
+
getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
|
|
44
|
+
*/
|
|
45
|
+
private createJwt;
|
|
46
|
+
/**
|
|
47
|
+
* Utility API to check expiration
|
|
48
|
+
*/
|
|
49
|
+
private isExpired;
|
|
50
|
+
/**
|
|
51
|
+
* Extracts the raw certs from a given certificate string and returns them in an array.
|
|
52
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
53
|
+
*/
|
|
54
|
+
static parseCertificate(publicCertificate: string): Array<string>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=ClientAssertion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientAssertion.d.ts","sourceRoot":"","sources":["../../../src/client/ClientAssertion.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D;;;GAGG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,iBAAiB,CAAgB;IAEzC;;;OAGG;WACW,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe;IAM/D;;;;;;OAMG;WACW,eAAe,CACzB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;WACW,mCAAmC,CAC7C,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;IACI,MAAM,CACT,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GACpB,MAAM;IA0BT;;OAEG;IACH,OAAO,CAAC,SAAS;IA8CjB;;OAEG;IACH,OAAO,CAAC,SAAS;IAIjB;;;OAGG;WACW,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;CAoB3E"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AuthenticationResult, Authority, BaseClient, CacheManager, CacheOutcome, ClientConfiguration, CommonClientCredentialRequest, IAppTokenProvider, ICrypto, ServerTelemetryManager } from "@azure/msal-common/node";
|
|
2
|
+
import { ManagedIdentityConfiguration } from "../config/Configuration.js";
|
|
3
|
+
/**
|
|
4
|
+
* OAuth2.0 client credential grant
|
|
5
|
+
*/
|
|
6
|
+
export declare class ClientCredentialClient extends BaseClient {
|
|
7
|
+
private readonly appTokenProvider?;
|
|
8
|
+
constructor(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider);
|
|
9
|
+
/**
|
|
10
|
+
* Public API to acquire a token with ClientCredential Flow for Confidential clients
|
|
11
|
+
* @param request
|
|
12
|
+
*/
|
|
13
|
+
acquireToken(request: CommonClientCredentialRequest): Promise<AuthenticationResult | null>;
|
|
14
|
+
/**
|
|
15
|
+
* looks up cache if the tokens are cached already
|
|
16
|
+
*/
|
|
17
|
+
getCachedAuthenticationResult(request: CommonClientCredentialRequest, config: ClientConfiguration | ManagedIdentityConfiguration, cryptoUtils: ICrypto, authority: Authority, cacheManager: CacheManager, serverTelemetryManager?: ServerTelemetryManager | null): Promise<[AuthenticationResult | null, CacheOutcome]>;
|
|
18
|
+
/**
|
|
19
|
+
* Reads access token from the cache
|
|
20
|
+
*/
|
|
21
|
+
private readAccessTokenFromCache;
|
|
22
|
+
/**
|
|
23
|
+
* Makes a network call to request the token from the service
|
|
24
|
+
* @param request
|
|
25
|
+
* @param authority
|
|
26
|
+
*/
|
|
27
|
+
private executeTokenRequest;
|
|
28
|
+
/**
|
|
29
|
+
* generate the request to the server in the acceptable format
|
|
30
|
+
* @param request
|
|
31
|
+
*/
|
|
32
|
+
private createTokenRequestBody;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ClientCredentialClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientCredentialClient.d.ts","sourceRoot":"","sources":["../../../src/client/ClientCredentialClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EAEpB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,YAAY,EAEZ,mBAAmB,EACnB,6BAA6B,EAM7B,iBAAiB,EACjB,OAAO,EAMP,sBAAsB,EAQzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAE/B,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;IAClD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAoB;gBAGlD,aAAa,EAAE,mBAAmB,EAClC,gBAAgB,CAAC,EAAE,iBAAiB;IAMxC;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAsCvC;;OAEG;IACU,6BAA6B,CACtC,OAAO,EAAE,6BAA6B,EACtC,MAAM,EAAE,mBAAmB,GAAG,4BAA4B,EAC1D,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,IAAI,GACvD,OAAO,CAAC,CAAC,oBAAoB,GAAG,IAAI,EAAE,YAAY,CAAC,CAAC;IA2FvD;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA4BhC;;;;OAIG;YACW,mBAAmB;IA6FjC;;;OAGG;YACW,sBAAsB;CAgEvC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ClientApplication } from "./ClientApplication.js";
|
|
2
|
+
import { Configuration } from "../config/Configuration.js";
|
|
3
|
+
import { AuthenticationResult, IAppTokenProvider } from "@azure/msal-common/node";
|
|
4
|
+
import { IConfidentialClientApplication } from "./IConfidentialClientApplication.js";
|
|
5
|
+
import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js";
|
|
6
|
+
import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js";
|
|
7
|
+
/**
|
|
8
|
+
* This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications
|
|
9
|
+
* will configure application secrets, client certificates/assertions as applicable
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare class ConfidentialClientApplication extends ClientApplication implements IConfidentialClientApplication {
|
|
13
|
+
private appTokenProvider?;
|
|
14
|
+
/**
|
|
15
|
+
* Constructor for the ConfidentialClientApplication
|
|
16
|
+
*
|
|
17
|
+
* Required attributes in the Configuration object are:
|
|
18
|
+
* - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal
|
|
19
|
+
* - authority: the authority URL for your application.
|
|
20
|
+
* - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal.
|
|
21
|
+
*
|
|
22
|
+
* In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
|
|
23
|
+
* 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).
|
|
24
|
+
* If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
|
|
25
|
+
* If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
|
|
26
|
+
* To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
|
|
27
|
+
*
|
|
28
|
+
* In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/
|
|
29
|
+
* Full B2C functionality will be available in this library in future versions.
|
|
30
|
+
*
|
|
31
|
+
* @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance
|
|
32
|
+
*/
|
|
33
|
+
constructor(configuration: Configuration);
|
|
34
|
+
/**
|
|
35
|
+
* This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and
|
|
36
|
+
* is meant for Azure SDK to enhance Managed Identity support.
|
|
37
|
+
*
|
|
38
|
+
* @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source.
|
|
39
|
+
*/
|
|
40
|
+
SetAppTokenProvider(provider: IAppTokenProvider): void;
|
|
41
|
+
/**
|
|
42
|
+
* Acquires tokens from the authority for the application (not for an end user).
|
|
43
|
+
*/
|
|
44
|
+
acquireTokenByClientCredential(request: ClientCredentialRequest): Promise<AuthenticationResult | null>;
|
|
45
|
+
/**
|
|
46
|
+
* Acquires tokens from the authority for the application.
|
|
47
|
+
*
|
|
48
|
+
* Used in scenarios where the current app is a middle-tier service which was called with a token
|
|
49
|
+
* representing an end user. The current app can use the token (oboAssertion) to request another
|
|
50
|
+
* token to access downstream web API, on behalf of that user.
|
|
51
|
+
*
|
|
52
|
+
* The current middle-tier app has no user interaction to obtain consent.
|
|
53
|
+
* See how to gain consent upfront for your middle-tier app from this article.
|
|
54
|
+
* https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application
|
|
55
|
+
*/
|
|
56
|
+
acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<AuthenticationResult | null>;
|
|
57
|
+
private setClientCredential;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ConfidentialClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ConfidentialClientApplication.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAO3D,OAAO,EAGH,oBAAoB,EAGpB,iBAAiB,EAQpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAIhF;;;;GAIG;AACH,qBAAa,6BACT,SAAQ,iBACR,YAAW,8BAA8B;IAEzC,OAAO,CAAC,gBAAgB,CAAC,CAAoB;IAE7C;;;;;;;;;;;;;;;;;;OAkBG;gBACS,aAAa,EAAE,aAAa;IAMxC;;;;;OAKG;IACH,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAItD;;OAEG;IACU,8BAA8B,CACvC,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAwFvC;;;;;;;;;;OAUG;IACU,sBAAsB,CAC/B,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA+BvC,OAAO,CAAC,mBAAmB;CA0D9B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AuthenticationResult, BaseClient, ClientConfiguration, CommonDeviceCodeRequest } from "@azure/msal-common/node";
|
|
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,EAEH,oBAAoB,EACpB,UAAU,EAEV,mBAAmB,EACnB,uBAAuB,EAc1B,MAAM,yBAAyB,CAAC;AAEjC;;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;IAqCvB;;;;;OAKG;YACW,0BAA0B;IAwFxC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAqCjC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AuthenticationResult, IAppTokenProvider, Logger } from "@azure/msal-common/node";
|
|
2
|
+
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
|
|
3
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
|
|
4
|
+
import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js";
|
|
5
|
+
import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js";
|
|
6
|
+
import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js";
|
|
7
|
+
import { SilentFlowRequest } from "../request/SilentFlowRequest.js";
|
|
8
|
+
import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js";
|
|
9
|
+
import { TokenCache } from "../cache/TokenCache.js";
|
|
10
|
+
/**
|
|
11
|
+
* Interface for the ConfidentialClientApplication class defining the public API signatures
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export interface IConfidentialClientApplication {
|
|
15
|
+
/** Creates the URL of the authorization request */
|
|
16
|
+
getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>;
|
|
17
|
+
/** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */
|
|
18
|
+
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
|
|
19
|
+
/** Acquires a token silently when a user specifies the account the token is requested for */
|
|
20
|
+
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult | null>;
|
|
21
|
+
/** Acquires a token by exchanging the refresh token provided for a new set of tokens */
|
|
22
|
+
acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
|
|
23
|
+
/** Acquires tokens from the authority for the application (not for an end user) */
|
|
24
|
+
acquireTokenByClientCredential(request: ClientCredentialRequest): Promise<AuthenticationResult | null>;
|
|
25
|
+
/** Acquires tokens from the authority for the application */
|
|
26
|
+
acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<AuthenticationResult | null>;
|
|
27
|
+
/** Acquires tokens with password grant by exchanging client applications username and password for credentials */
|
|
28
|
+
acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>;
|
|
29
|
+
/** Gets the token cache for the application */
|
|
30
|
+
getTokenCache(): TokenCache;
|
|
31
|
+
/** Returns the logger instance */
|
|
32
|
+
getLogger(): Logger;
|
|
33
|
+
/** Replaces the default logger set in configurations with new Logger with new configurations */
|
|
34
|
+
setLogger(logger: Logger): void;
|
|
35
|
+
/** Clear the cache */
|
|
36
|
+
clearCache(): void;
|
|
37
|
+
/** This extensibility point is meant for Azure SDK to enhance Managed Identity support */
|
|
38
|
+
SetAppTokenProvider(provider: IAppTokenProvider): void;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=IConfidentialClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/IConfidentialClientApplication.ts"],"names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,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,+CAA+C;IAC/C,aAAa,IAAI,UAAU,CAAC;IAE5B,kCAAkC;IAClC,SAAS,IAAI,MAAM,CAAC;IAEpB,gGAAgG;IAChG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,sBAAsB;IACtB,UAAU,IAAI,IAAI,CAAC;IAEnB,0FAA0F;IAC1F,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1D"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AccountInfo, AuthenticationResult, Logger } from "@azure/msal-common/node";
|
|
2
|
+
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
|
|
3
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
|
|
4
|
+
import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js";
|
|
5
|
+
import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js";
|
|
6
|
+
import { SilentFlowRequest } from "../request/SilentFlowRequest.js";
|
|
7
|
+
import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js";
|
|
8
|
+
import { TokenCache } from "../cache/TokenCache.js";
|
|
9
|
+
import { InteractiveRequest } from "../request/InteractiveRequest.js";
|
|
10
|
+
import { SignOutRequest } from "../request/SignOutRequest.js";
|
|
11
|
+
/**
|
|
12
|
+
* Interface for the PublicClientApplication class defining the public API signatures
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface IPublicClientApplication {
|
|
16
|
+
/** Creates the URL of the authorization request */
|
|
17
|
+
getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>;
|
|
18
|
+
/** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */
|
|
19
|
+
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
|
|
20
|
+
/** Acquires a token interactively */
|
|
21
|
+
acquireTokenInteractive(request: InteractiveRequest): Promise<AuthenticationResult>;
|
|
22
|
+
/** Acquires a token silently when a user specifies the account the token is requested for */
|
|
23
|
+
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult>;
|
|
24
|
+
/** Acquires a token by exchanging the refresh token provided for a new set of tokens */
|
|
25
|
+
acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
|
|
26
|
+
/** Acquires a token from the authority using OAuth2.0 device code flow */
|
|
27
|
+
acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise<AuthenticationResult | null>;
|
|
28
|
+
/** Acquires tokens with password grant by exchanging client applications username and password for credentials */
|
|
29
|
+
acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>;
|
|
30
|
+
/** Gets the token cache for the application */
|
|
31
|
+
getTokenCache(): TokenCache;
|
|
32
|
+
/** Returns the logger instance */
|
|
33
|
+
getLogger(): Logger;
|
|
34
|
+
/** Replaces the default logger set in configurations with new Logger with new configurations */
|
|
35
|
+
setLogger(logger: Logger): void;
|
|
36
|
+
/** Clear the cache */
|
|
37
|
+
clearCache(): void;
|
|
38
|
+
/** Gets all cached accounts */
|
|
39
|
+
getAllAccounts(): Promise<AccountInfo[]>;
|
|
40
|
+
/** Removes cache artifacts associated with the given account */
|
|
41
|
+
signOut(request: SignOutRequest): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=IPublicClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,WAAW,EACX,oBAAoB,EACpB,MAAM,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAi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AAI,CAAC;IAEhC,sBAAsB;IACtB,UAAU,IAAI,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,gEAAgE;IAChE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AuthenticationResult } from "@azure/msal-common/node";
|
|
2
|
+
import { ManagedIdentityConfiguration } from "../config/Configuration.js";
|
|
3
|
+
import { ManagedIdentityRequestParams } from "../request/ManagedIdentityRequestParams.js";
|
|
4
|
+
import { ManagedIdentitySourceNames } from "../utils/Constants.js";
|
|
5
|
+
/**
|
|
6
|
+
* Class to initialize a managed identity and identify the service
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class ManagedIdentityApplication {
|
|
10
|
+
private config;
|
|
11
|
+
private logger;
|
|
12
|
+
private static nodeStorage?;
|
|
13
|
+
private networkClient;
|
|
14
|
+
private cryptoProvider;
|
|
15
|
+
private fakeAuthority;
|
|
16
|
+
private fakeClientCredentialClient;
|
|
17
|
+
private managedIdentityClient;
|
|
18
|
+
constructor(configuration?: ManagedIdentityConfiguration);
|
|
19
|
+
/**
|
|
20
|
+
* Acquire an access token from the cache or the managed identity
|
|
21
|
+
* @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer
|
|
22
|
+
* @returns the access token
|
|
23
|
+
*/
|
|
24
|
+
acquireToken(managedIdentityRequestParams: ManagedIdentityRequestParams): Promise<AuthenticationResult>;
|
|
25
|
+
/**
|
|
26
|
+
* Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK.
|
|
27
|
+
* @returns ManagedIdentitySourceNames - The Managed Identity source's name
|
|
28
|
+
*/
|
|
29
|
+
getManagedIdentitySource(): ManagedIdentitySourceNames;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=ManagedIdentityApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManagedIdentityApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAYH,oBAAoB,EAGvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAG/B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,OAAO,EAEH,0BAA0B,EAC7B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,MAAM,CAAmC;IAEjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAc;IACzC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAGvC,OAAO,CAAC,aAAa,CAAY;IAGjC,OAAO,CAAC,0BAA0B,CAAyB;IAE3D,OAAO,CAAC,qBAAqB,CAAwB;gBAEzC,aAAa,CAAC,EAAE,4BAA4B;IA2DxD;;;;OAIG;IACU,YAAY,CACrB,4BAA4B,EAAE,4BAA4B,GAC3D,OAAO,CAAC,oBAAoB,CAAC;IAkEhC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;CAMhE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Authority, INetworkModule, Logger, AuthenticationResult } from "@azure/msal-common/node";
|
|
2
|
+
import { CryptoProvider } from "../crypto/CryptoProvider.js";
|
|
3
|
+
import { ManagedIdentityRequest } from "../request/ManagedIdentityRequest.js";
|
|
4
|
+
import { ManagedIdentityId } from "../config/ManagedIdentityId.js";
|
|
5
|
+
import { NodeStorage } from "../cache/NodeStorage.js";
|
|
6
|
+
import { ManagedIdentitySourceNames } from "../utils/Constants.js";
|
|
7
|
+
export declare class ManagedIdentityClient {
|
|
8
|
+
private logger;
|
|
9
|
+
private nodeStorage;
|
|
10
|
+
private networkClient;
|
|
11
|
+
private cryptoProvider;
|
|
12
|
+
private static identitySource?;
|
|
13
|
+
static sourceName?: ManagedIdentitySourceNames;
|
|
14
|
+
constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider);
|
|
15
|
+
sendManagedIdentityTokenRequest(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise<AuthenticationResult>;
|
|
16
|
+
private allEnvironmentVariablesAreDefined;
|
|
17
|
+
/**
|
|
18
|
+
* Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource.
|
|
19
|
+
* @returns ManagedIdentitySourceNames - The Managed Identity source's name
|
|
20
|
+
*/
|
|
21
|
+
getManagedIdentitySource(): ManagedIdentitySourceNames;
|
|
22
|
+
/**
|
|
23
|
+
* Tries to create a managed identity source for all sources
|
|
24
|
+
* @returns the managed identity Source
|
|
25
|
+
*/
|
|
26
|
+
private selectManagedIdentitySource;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=ManagedIdentityClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManagedIdentityClient.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,EACT,cAAc,EACd,MAAM,EACN,oBAAoB,EACvB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAMnE,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAEvC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAA4B;IAC1D,OAAc,UAAU,CAAC,EAAE,0BAA0B,CAAC;gBAGlD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc;IAQrB,+BAA+B,CACxC,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IAoBhC,OAAO,CAAC,iCAAiC;IAUzC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;IAuB7D;;;OAGG;IACH,OAAO,CAAC,2BAA2B;CA2CtC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { INetworkModule, Logger } from "@azure/msal-common/node";
|
|
2
|
+
import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
|
|
3
|
+
import { CryptoProvider } from "../../crypto/CryptoProvider.js";
|
|
4
|
+
import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
|
|
5
|
+
import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
|
|
6
|
+
import { NodeStorage } from "../../cache/NodeStorage.js";
|
|
7
|
+
/**
|
|
8
|
+
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs
|
|
9
|
+
*/
|
|
10
|
+
export declare class AppService extends BaseManagedIdentitySource {
|
|
11
|
+
private identityEndpoint;
|
|
12
|
+
private identityHeader;
|
|
13
|
+
constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string, identityHeader: string);
|
|
14
|
+
static getEnvironmentVariables(): Array<string | undefined>;
|
|
15
|
+
static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider): AppService | null;
|
|
16
|
+
createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=AppService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppService.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/AppService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAU3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAKzD;;GAEG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,cAAc,CAAS;gBAG3B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM;WAQZ,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAapD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,GAC/B,UAAU,GAAG,IAAI;IAkCb,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA4BtC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { INetworkModule, NetworkResponse, NetworkRequestOptions, Logger, ServerAuthorizationTokenResponse } from "@azure/msal-common/node";
|
|
2
|
+
import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
|
|
3
|
+
import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
|
|
4
|
+
import { CryptoProvider } from "../../crypto/CryptoProvider.js";
|
|
5
|
+
import { NodeStorage } from "../../cache/NodeStorage.js";
|
|
6
|
+
import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js";
|
|
7
|
+
import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
|
|
8
|
+
export declare const ARC_API_VERSION: string;
|
|
9
|
+
export declare const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT: string;
|
|
10
|
+
type FilePathMap = {
|
|
11
|
+
win32: string;
|
|
12
|
+
linux: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const SUPPORTED_AZURE_ARC_PLATFORMS: FilePathMap;
|
|
15
|
+
export declare const AZURE_ARC_FILE_DETECTION: FilePathMap;
|
|
16
|
+
/**
|
|
17
|
+
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs
|
|
18
|
+
*/
|
|
19
|
+
export declare class AzureArc extends BaseManagedIdentitySource {
|
|
20
|
+
private identityEndpoint;
|
|
21
|
+
constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string);
|
|
22
|
+
static getEnvironmentVariables(): Array<string | undefined>;
|
|
23
|
+
static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): AzureArc | null;
|
|
24
|
+
createRequest(resource: string): ManagedIdentityRequestParameters;
|
|
25
|
+
getServerTokenResponseAsync(originalResponse: NetworkResponse<ManagedIdentityTokenResponse>, networkClient: INetworkModule, networkRequest: ManagedIdentityRequestParameters, networkRequestOptions: NetworkRequestOptions): Promise<ServerAuthorizationTokenResponse>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=AzureArc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AzureArc.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/AzureArc.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,MAAM,EACN,gCAAgC,EACnC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAgBhE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAOzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,eAAO,MAAM,eAAe,EAAE,MAAqB,CAAC;AACpD,eAAO,MAAM,mCAAmC,EAAE,MACS,CAAC;AAG5D,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,WAG3C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,WAGtC,CAAC;AAEF;;GAEG;AACH,qBAAa,QAAS,SAAQ,yBAAyB;IACnD,OAAO,CAAC,gBAAgB,CAAS;gBAG7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM;WAOd,uBAAuB,IAAI,KAAK,CAAC,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