@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,31 @@
|
|
|
1
|
+
import { Authority, INetworkModule, Logger, NetworkRequestOptions, NetworkResponse, ServerAuthorizationTokenResponse, AuthenticationResult } from "@azure/msal-common/node";
|
|
2
|
+
import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
|
|
3
|
+
import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
|
|
4
|
+
import { CryptoProvider } from "../../crypto/CryptoProvider.js";
|
|
5
|
+
import { ManagedIdentityRequest } from "../../request/ManagedIdentityRequest.js";
|
|
6
|
+
import { ManagedIdentityIdType } from "../../utils/Constants.js";
|
|
7
|
+
import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js";
|
|
8
|
+
import { NodeStorage } from "../../cache/NodeStorage.js";
|
|
9
|
+
/**
|
|
10
|
+
* Managed Identity User Assigned Id Query Parameter Names
|
|
11
|
+
*/
|
|
12
|
+
export declare const ManagedIdentityUserAssignedIdQueryParameterNames: {
|
|
13
|
+
readonly MANAGED_IDENTITY_CLIENT_ID: "client_id";
|
|
14
|
+
readonly MANAGED_IDENTITY_OBJECT_ID: "object_id";
|
|
15
|
+
readonly MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id";
|
|
16
|
+
};
|
|
17
|
+
export type ManagedIdentityUserAssignedIdQueryParameterNames = (typeof ManagedIdentityUserAssignedIdQueryParameterNames)[keyof typeof ManagedIdentityUserAssignedIdQueryParameterNames];
|
|
18
|
+
export declare abstract class BaseManagedIdentitySource {
|
|
19
|
+
protected logger: Logger;
|
|
20
|
+
private nodeStorage;
|
|
21
|
+
private networkClient;
|
|
22
|
+
private cryptoProvider;
|
|
23
|
+
constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider);
|
|
24
|
+
abstract createRequest(request: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
|
|
25
|
+
getServerTokenResponseAsync(response: NetworkResponse<ManagedIdentityTokenResponse>, _networkClient: INetworkModule, _networkRequest: ManagedIdentityRequestParameters, _networkRequestOptions: NetworkRequestOptions): Promise<ServerAuthorizationTokenResponse>;
|
|
26
|
+
getServerTokenResponse(response: NetworkResponse<ManagedIdentityTokenResponse>): ServerAuthorizationTokenResponse;
|
|
27
|
+
acquireTokenWithManagedIdentity(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise<AuthenticationResult>;
|
|
28
|
+
getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType: ManagedIdentityIdType): string;
|
|
29
|
+
static getValidatedEnvVariableUrlString: (envVariableStringName: string, envVariable: string, sourceName: string, logger: Logger) => string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=BaseManagedIdentitySource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseManagedIdentitySource.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,SAAS,EAIT,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,eAAe,EAEf,gCAAgC,EAGhC,oBAAoB,EAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAc,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAMzD;;GAEG;AACH,eAAO,MAAM,gDAAgD;;;;CAInD,CAAC;AACX,MAAM,MAAM,gDAAgD,GACxD,CAAC,OAAO,gDAAgD,CAAC,CAAC,MAAM,OAAO,gDAAgD,CAAC,CAAC;AAE7H,8BAAsB,yBAAyB;IAC3C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;gBAGnC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc;IAQlC,QAAQ,CAAC,aAAa,CAClB,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;IAEtB,2BAA2B,CACpC,QAAQ,EAAE,eAAe,CAAC,4BAA4B,CAAC,EAEvD,cAAc,EAAE,cAAc,EAE9B,eAAe,EAAE,gCAAgC,EAEjD,sBAAsB,EAAE,qBAAqB,GAC9C,OAAO,CAAC,gCAAgC,CAAC;IAIrC,sBAAsB,CACzB,QAAQ,EAAE,eAAe,CAAC,4BAA4B,CAAC,GACxD,gCAAgC;IAyCtB,+BAA+B,CACxC,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IA0EzB,iDAAiD,CACpD,qBAAqB,EAAE,qBAAqB,GAC7C,MAAM;IA0BT,OAAc,gCAAgC,0BACnB,MAAM,eAChB,MAAM,cACP,MAAM,UACV,MAAM,KACf,MAAM,CAeP;CACL"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { INetworkModule, Logger } from "@azure/msal-common/node";
|
|
2
|
+
import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
|
|
3
|
+
import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
|
|
4
|
+
import { NodeStorage } from "../../cache/NodeStorage.js";
|
|
5
|
+
import { CryptoProvider } from "../../crypto/CryptoProvider.js";
|
|
6
|
+
import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
|
|
7
|
+
/**
|
|
8
|
+
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs
|
|
9
|
+
*/
|
|
10
|
+
export declare class CloudShell extends BaseManagedIdentitySource {
|
|
11
|
+
private msiEndpoint;
|
|
12
|
+
constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, msiEndpoint: string);
|
|
13
|
+
static getEnvironmentVariables(): Array<string | undefined>;
|
|
14
|
+
static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): CloudShell | null;
|
|
15
|
+
createRequest(resource: string): ManagedIdentityRequestParameters;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=CloudShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudShell.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/CloudShell.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAahE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;GAEG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,WAAW,CAAS;gBAGxB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,MAAM;WAOT,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAOpD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACrC,UAAU,GAAG,IAAI;IAwCb,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC;CAc3E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { INetworkModule, Logger } from "@azure/msal-common/node";
|
|
2
|
+
import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
|
|
3
|
+
import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
|
|
4
|
+
import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
|
|
5
|
+
import { CryptoProvider } from "../../crypto/CryptoProvider.js";
|
|
6
|
+
import { NodeStorage } from "../../cache/NodeStorage.js";
|
|
7
|
+
export declare class Imds extends BaseManagedIdentitySource {
|
|
8
|
+
private identityEndpoint;
|
|
9
|
+
constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string);
|
|
10
|
+
static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider): Imds;
|
|
11
|
+
createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Imds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Imds.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/Imds.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAUhE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AASzD,qBAAa,IAAK,SAAQ,yBAAyB;IAC/C,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,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,GAC/B,IAAI;IA8CA,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA4BtC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { INetworkModule, Logger } from "@azure/msal-common/node";
|
|
2
|
+
import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
|
|
3
|
+
import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
|
|
4
|
+
import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
|
|
5
|
+
import { NodeStorage } from "../../cache/NodeStorage.js";
|
|
6
|
+
import { CryptoProvider } from "../../crypto/CryptoProvider.js";
|
|
7
|
+
/**
|
|
8
|
+
* Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs
|
|
9
|
+
*/
|
|
10
|
+
export declare class ServiceFabric 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, managedIdentityId: ManagedIdentityId): ServiceFabric | null;
|
|
16
|
+
createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=ServiceFabric.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceFabric.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/ServiceFabric.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAchE;;GAEG;AACH,qBAAa,aAAc,SAAQ,yBAAyB;IACxD,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;WAkBpD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACrC,aAAa,GAAG,IAAI;IA6ChB,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA6BtC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AuthenticationResult, BaseClient, ClientConfiguration, CommonOnBehalfOfRequest } from "@azure/msal-common/node";
|
|
2
|
+
/**
|
|
3
|
+
* On-Behalf-Of client
|
|
4
|
+
*/
|
|
5
|
+
export declare class OnBehalfOfClient extends BaseClient {
|
|
6
|
+
private scopeSet;
|
|
7
|
+
private userAssertionHash;
|
|
8
|
+
constructor(configuration: ClientConfiguration);
|
|
9
|
+
/**
|
|
10
|
+
* Public API to acquire tokens with on behalf of flow
|
|
11
|
+
* @param request
|
|
12
|
+
*/
|
|
13
|
+
acquireToken(request: CommonOnBehalfOfRequest): Promise<AuthenticationResult | null>;
|
|
14
|
+
/**
|
|
15
|
+
* look up cache for tokens
|
|
16
|
+
* Find idtoken in the cache
|
|
17
|
+
* Find accessToken based on user assertion and account info in the cache
|
|
18
|
+
* Please note we are not yet supported OBO tokens refreshed with long lived RT. User will have to send a new assertion if the current access token expires
|
|
19
|
+
* This is to prevent security issues when the assertion changes over time, however, longlived RT helps retaining the session
|
|
20
|
+
* @param request
|
|
21
|
+
*/
|
|
22
|
+
private getCachedAuthenticationResult;
|
|
23
|
+
/**
|
|
24
|
+
* read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager
|
|
25
|
+
* Certain use cases of OBO flow do not expect an idToken in the cache/or from the service
|
|
26
|
+
* @param atHomeAccountId {string}
|
|
27
|
+
*/
|
|
28
|
+
private readIdTokenFromCacheForOBO;
|
|
29
|
+
/**
|
|
30
|
+
* Fetches the cached access token based on incoming assertion
|
|
31
|
+
* @param clientId
|
|
32
|
+
* @param request
|
|
33
|
+
* @param userAssertionHash
|
|
34
|
+
*/
|
|
35
|
+
private readAccessTokenFromCacheForOBO;
|
|
36
|
+
/**
|
|
37
|
+
* Make a network call to the server requesting credentials
|
|
38
|
+
* @param request
|
|
39
|
+
* @param authority
|
|
40
|
+
*/
|
|
41
|
+
private executeTokenRequest;
|
|
42
|
+
/**
|
|
43
|
+
* generate a server request in accepable format
|
|
44
|
+
* @param request
|
|
45
|
+
*/
|
|
46
|
+
private createTokenRequestBody;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=OnBehalfOfClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnBehalfOfClient.d.ts","sourceRoot":"","sources":["../../../src/client/OnBehalfOfClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,oBAAoB,EAIpB,UAAU,EAGV,mBAAmB,EACnB,uBAAuB,EAgB1B,MAAM,yBAAyB,CAAC;AAGjC;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC5C,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,iBAAiB,CAAS;gBAEtB,aAAa,EAAE,mBAAmB;IAI9C;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA4BvC;;;;;;;OAOG;YACW,6BAA6B;IAiF3C;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAsBlC;;;;;OAKG;IACH,OAAO,CAAC,8BAA8B;IA0CtC;;;;OAIG;YACW,mBAAmB;IAwDjC;;;OAGG;YACW,sBAAsB;CAmEvC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AuthenticationResult, AccountInfo } from "@azure/msal-common/node";
|
|
2
|
+
import { Configuration } from "../config/Configuration.js";
|
|
3
|
+
import { ClientApplication } from "./ClientApplication.js";
|
|
4
|
+
import { IPublicClientApplication } from "./IPublicClientApplication.js";
|
|
5
|
+
import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js";
|
|
6
|
+
import { InteractiveRequest } from "../request/InteractiveRequest.js";
|
|
7
|
+
import { SilentFlowRequest } from "../request/SilentFlowRequest.js";
|
|
8
|
+
import { SignOutRequest } from "../request/SignOutRequest.js";
|
|
9
|
+
/**
|
|
10
|
+
* This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications
|
|
11
|
+
* are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare class PublicClientApplication extends ClientApplication implements IPublicClientApplication {
|
|
15
|
+
private nativeBrokerPlugin?;
|
|
16
|
+
private readonly skus;
|
|
17
|
+
/**
|
|
18
|
+
* Important attributes in the Configuration object for auth are:
|
|
19
|
+
* - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal.
|
|
20
|
+
* - authority: the authority URL for your application.
|
|
21
|
+
*
|
|
22
|
+
* AAD authorities are 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
|
+
* Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered
|
|
29
|
+
* its own authority. You will have to set the all of the knownAuthorities at the time of the client application
|
|
30
|
+
* construction.
|
|
31
|
+
*
|
|
32
|
+
* ADFS authorities are of the form https://\{instance\}/adfs.
|
|
33
|
+
*/
|
|
34
|
+
constructor(configuration: Configuration);
|
|
35
|
+
/**
|
|
36
|
+
* Acquires a token from the authority using OAuth2.0 device code flow.
|
|
37
|
+
* This flow is designed for devices that do not have access to a browser or have input constraints.
|
|
38
|
+
* The authorization server issues a DeviceCode object with a verification code, an end-user code,
|
|
39
|
+
* and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be
|
|
40
|
+
* instructed to use another device to navigate to the verification URI to input credentials.
|
|
41
|
+
* Since the client cannot receive incoming requests, it polls the authorization server repeatedly
|
|
42
|
+
* until the end-user completes input of credentials.
|
|
43
|
+
*/
|
|
44
|
+
acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise<AuthenticationResult | null>;
|
|
45
|
+
/**
|
|
46
|
+
* Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token.
|
|
47
|
+
*/
|
|
48
|
+
acquireTokenInteractive(request: InteractiveRequest): Promise<AuthenticationResult>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker.
|
|
51
|
+
* @param request
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Removes cache artifacts associated with the given account
|
|
57
|
+
* @param request
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
signOut(request: SignOutRequest): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker.
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
getAllAccounts(): Promise<AccountInfo[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw.
|
|
68
|
+
* @param loopbackClient
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
private waitForRedirectUri;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=PublicClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/PublicClientApplication.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAUpB,WAAW,EAKd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D;;;;GAIG;AACH,qBAAa,uBACT,SAAQ,iBACR,YAAW,wBAAwB;IAEnC,OAAO,CAAC,kBAAkB,CAAC,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B;;;;;;;;;;;;;;;;OAgBG;gBACS,aAAa,EAAE,aAAa;IAoBxC;;;;;;;;OAQG;IACU,wBAAwB,CACjC,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAoCvC;;OAEG;IACG,uBAAuB,CACzB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IAgGhC;;;;OAIG;IACG,kBAAkB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IA0BhC;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAerD;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAY9C;;;;OAIG;YACW,kBAAkB;CAsCnC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AuthenticationResult, BaseClient, ClientConfiguration, CommonUsernamePasswordRequest } from "@azure/msal-common/node";
|
|
2
|
+
/**
|
|
3
|
+
* Oauth2.0 Password grant client
|
|
4
|
+
* Note: We are only supporting public clients for password grant and for purely testing purposes
|
|
5
|
+
*/
|
|
6
|
+
export declare class UsernamePasswordClient extends BaseClient {
|
|
7
|
+
constructor(configuration: ClientConfiguration);
|
|
8
|
+
/**
|
|
9
|
+
* API to acquire a token by passing the username and password to the service in exchage of credentials
|
|
10
|
+
* password_grant
|
|
11
|
+
* @param request
|
|
12
|
+
*/
|
|
13
|
+
acquireToken(request: CommonUsernamePasswordRequest): Promise<AuthenticationResult | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Executes POST request to token endpoint
|
|
16
|
+
* @param authority
|
|
17
|
+
* @param request
|
|
18
|
+
*/
|
|
19
|
+
private executeTokenRequest;
|
|
20
|
+
/**
|
|
21
|
+
* Generates a map for all the params to be sent to the service
|
|
22
|
+
* @param request
|
|
23
|
+
*/
|
|
24
|
+
private createTokenRequestBody;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=UsernamePasswordClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsernamePasswordClient.d.ts","sourceRoot":"","sources":["../../../src/client/UsernamePasswordClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EAEpB,UAAU,EAGV,mBAAmB,EACnB,6BAA6B,EAWhC,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;gBACtC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACG,YAAY,CACd,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA8BvC;;;;OAIG;YACW,mBAAmB;IAmCjC;;;OAGG;YACW,sBAAsB;CAyEvC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry, INativeBrokerPlugin, ClientAssertionCallback } from "@azure/msal-common/node";
|
|
4
|
+
import http from "http";
|
|
5
|
+
import https from "https";
|
|
6
|
+
import { ManagedIdentityId } from "./ManagedIdentityId.js";
|
|
7
|
+
/**
|
|
8
|
+
* - clientId - Client id of the application.
|
|
9
|
+
* - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common.
|
|
10
|
+
* - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in.
|
|
11
|
+
* - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal.
|
|
12
|
+
* - clientAssertion - A ClientAssertion object containing an assertion string or a callback function that returns an assertion string that the application uses when requesting a token, as well as the assertion's type (urn:ietf:params:oauth:client-assertion-type:jwt-bearer). Only used in confidential client applications.
|
|
13
|
+
* - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 or SHA-256 thumbprint of the certificate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- )
|
|
14
|
+
* - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
|
|
15
|
+
* - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type NodeAuthOptions = {
|
|
19
|
+
clientId: string;
|
|
20
|
+
authority?: string;
|
|
21
|
+
clientSecret?: string;
|
|
22
|
+
clientAssertion?: string | ClientAssertionCallback;
|
|
23
|
+
clientCertificate?: {
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use thumbprintSha2 property instead. Thumbprint needs to be computed with SHA-256 algorithm.
|
|
26
|
+
* SHA-1 is only needed for backwards compatibility with older versions of ADFS.
|
|
27
|
+
*/
|
|
28
|
+
thumbprint?: string;
|
|
29
|
+
thumbprintSha256?: string;
|
|
30
|
+
privateKey: string;
|
|
31
|
+
x5c?: string;
|
|
32
|
+
};
|
|
33
|
+
knownAuthorities?: Array<string>;
|
|
34
|
+
cloudDiscoveryMetadata?: string;
|
|
35
|
+
authorityMetadata?: string;
|
|
36
|
+
clientCapabilities?: Array<string>;
|
|
37
|
+
protocolMode?: ProtocolMode;
|
|
38
|
+
azureCloudOptions?: AzureCloudOptions;
|
|
39
|
+
skipAuthorityMetadataCache?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Use this to configure the below cache configuration options:
|
|
43
|
+
*
|
|
44
|
+
* - cachePlugin - Plugin for reading and writing token cache to disk.
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export type CacheOptions = {
|
|
48
|
+
cachePlugin?: ICachePlugin;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated claims-based-caching functionality will be removed in the next version of MSALJS
|
|
51
|
+
*/
|
|
52
|
+
claimsBasedCachingEnabled?: boolean;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Use this to configure the below broker options:
|
|
56
|
+
* - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions)
|
|
57
|
+
*
|
|
58
|
+
* Note: These options are only available for PublicClientApplications using the Authorization Code Flow
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export type BrokerOptions = {
|
|
62
|
+
nativeBrokerPlugin?: INativeBrokerPlugin;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Type for configuring logger and http client options
|
|
66
|
+
*
|
|
67
|
+
* - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger
|
|
68
|
+
* - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client.
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export type NodeSystemOptions = {
|
|
72
|
+
loggerOptions?: LoggerOptions;
|
|
73
|
+
networkClient?: INetworkModule;
|
|
74
|
+
proxyUrl?: string;
|
|
75
|
+
customAgentOptions?: http.AgentOptions | https.AgentOptions;
|
|
76
|
+
disableInternalRetries?: boolean;
|
|
77
|
+
};
|
|
78
|
+
export type NodeTelemetryOptions = {
|
|
79
|
+
application?: ApplicationTelemetry;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Use the configuration object to configure MSAL and initialize the client application object
|
|
83
|
+
*
|
|
84
|
+
* - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
|
|
85
|
+
* - broker: this is where you configure broker options
|
|
86
|
+
* - cache: this is where you configure cache location
|
|
87
|
+
* - system: this is where you can configure the network client, logger
|
|
88
|
+
* - telemetry: this is where you can configure telemetry options
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export type Configuration = {
|
|
92
|
+
auth: NodeAuthOptions;
|
|
93
|
+
broker?: BrokerOptions;
|
|
94
|
+
cache?: CacheOptions;
|
|
95
|
+
system?: NodeSystemOptions;
|
|
96
|
+
telemetry?: NodeTelemetryOptions;
|
|
97
|
+
};
|
|
98
|
+
export type ManagedIdentityIdParams = {
|
|
99
|
+
userAssignedClientId?: string;
|
|
100
|
+
userAssignedResourceId?: string;
|
|
101
|
+
userAssignedObjectId?: string;
|
|
102
|
+
};
|
|
103
|
+
export type ManagedIdentityConfiguration = {
|
|
104
|
+
managedIdentityIdParams?: ManagedIdentityIdParams;
|
|
105
|
+
system?: NodeSystemOptions;
|
|
106
|
+
};
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type NodeConfiguration = {
|
|
109
|
+
auth: Required<NodeAuthOptions>;
|
|
110
|
+
broker: BrokerOptions;
|
|
111
|
+
cache: CacheOptions;
|
|
112
|
+
system: Required<NodeSystemOptions>;
|
|
113
|
+
telemetry: Required<NodeTelemetryOptions>;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Sets the default options when not explicitly configured from app developer
|
|
117
|
+
*
|
|
118
|
+
* @param auth - Authentication options
|
|
119
|
+
* @param cache - Cache options
|
|
120
|
+
* @param system - System options
|
|
121
|
+
* @param telemetry - Telemetry options
|
|
122
|
+
*
|
|
123
|
+
* @returns Configuration
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
export declare function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration;
|
|
127
|
+
export type ManagedIdentityNodeConfiguration = {
|
|
128
|
+
managedIdentityId: ManagedIdentityId;
|
|
129
|
+
system: Required<Pick<NodeSystemOptions, "loggerOptions" | "networkClient">>;
|
|
130
|
+
};
|
|
131
|
+
export declare function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }: ManagedIdentityConfiguration): ManagedIdentityNodeConfiguration;
|
|
132
|
+
//# sourceMappingURL=Configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../../src/config/Configuration.ts"],"names":[],"mappings":";;AAKA,OAAO,EACH,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,YAAY,EAGZ,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAU3D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAAC;IACnD,iBAAiB,CAAC,EAAE;QAChB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,kBAAkB,CAAC,EAAE,mBAAmB,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IAC5D,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACtC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,oBAAoB,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACvC,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAoDF,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACpC,SAAS,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,GACZ,EAAE,aAAa,GAAG,iBAAiB,CA2BnC;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC3C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,QAAQ,CACZ,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,eAAe,CAAC,CAC7D,CAAC;CACL,CAAC;AAEF,wBAAgB,iCAAiC,CAAC,EAC9C,uBAAuB,EACvB,MAAM,GACT,EAAE,4BAA4B,GAAG,gCAAgC,CAwCjE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ManagedIdentityIdType } from "../utils/Constants.js";
|
|
2
|
+
import { ManagedIdentityIdParams } from "./Configuration.js";
|
|
3
|
+
export declare class ManagedIdentityId {
|
|
4
|
+
private _id;
|
|
5
|
+
get id(): string;
|
|
6
|
+
private set id(value);
|
|
7
|
+
private _idType;
|
|
8
|
+
get idType(): ManagedIdentityIdType;
|
|
9
|
+
private set idType(value);
|
|
10
|
+
constructor(managedIdentityIdParams?: ManagedIdentityIdParams);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ManagedIdentityId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManagedIdentityId.d.ts","sourceRoot":"","sources":["../../../src/config/ManagedIdentityId.ts"],"names":[],"mappings":"AASA,OAAO,EAEH,qBAAqB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,GAAG,CAAS;IACpB,IAAW,EAAE,IAAI,MAAM,CAEtB;IACD,OAAO,KAAK,EAAE,QAEb;IAED,OAAO,CAAC,OAAO,CAAwB;IACvC,IAAW,MAAM,IAAI,qBAAqB,CAEzC;IACD,OAAO,KAAK,MAAM,QAEjB;gBAEW,uBAAuB,CAAC,EAAE,uBAAuB;CAwChE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpMethod } from "../utils/Constants.js";
|
|
2
|
+
export declare class ManagedIdentityRequestParameters {
|
|
3
|
+
private _baseEndpoint;
|
|
4
|
+
httpMethod: HttpMethod;
|
|
5
|
+
headers: Record<string, string>;
|
|
6
|
+
bodyParameters: Record<string, string>;
|
|
7
|
+
queryParameters: Record<string, string>;
|
|
8
|
+
constructor(httpMethod: HttpMethod, endpoint: string);
|
|
9
|
+
computeUri(): string;
|
|
10
|
+
computeParametersBodyString(): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ManagedIdentityRequestParameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManagedIdentityRequestParameters.d.ts","sourceRoot":"","sources":["../../../src/config/ManagedIdentityRequestParameters.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,qBAAa,gCAAgC;IACzC,OAAO,CAAC,aAAa,CAAS;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAEnC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM;IAQ7C,UAAU,IAAI,MAAM;IAepB,2BAA2B,IAAI,MAAM;CAS/C"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ICrypto, PkceCodes } from "@azure/msal-common/node";
|
|
2
|
+
/**
|
|
3
|
+
* This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and
|
|
4
|
+
* implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class CryptoProvider implements ICrypto {
|
|
8
|
+
private pkceGenerator;
|
|
9
|
+
private guidGenerator;
|
|
10
|
+
private hashUtils;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* base64 URL safe encoded string
|
|
14
|
+
*/
|
|
15
|
+
base64UrlEncode(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Stringifies and base64Url encodes input public key
|
|
18
|
+
* @param inputKid
|
|
19
|
+
* @returns Base64Url encoded public key
|
|
20
|
+
*/
|
|
21
|
+
encodeKid(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new random GUID - used to populate state and nonce.
|
|
24
|
+
* @returns string (GUID)
|
|
25
|
+
*/
|
|
26
|
+
createNewGuid(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Encodes input string to base64.
|
|
29
|
+
* @param input - string to be encoded
|
|
30
|
+
*/
|
|
31
|
+
base64Encode(input: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Decodes input string from base64.
|
|
34
|
+
* @param input - string to be decoded
|
|
35
|
+
*/
|
|
36
|
+
base64Decode(input: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Generates PKCE codes used in Authorization Code Flow.
|
|
39
|
+
*/
|
|
40
|
+
generatePkceCodes(): Promise<PkceCodes>;
|
|
41
|
+
/**
|
|
42
|
+
* Generates a keypair, stores it and returns a thumbprint - not yet implemented for node
|
|
43
|
+
*/
|
|
44
|
+
getPublicKeyThumbprint(): Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Removes cryptographic keypair from key store matching the keyId passed in
|
|
47
|
+
* @param kid
|
|
48
|
+
*/
|
|
49
|
+
removeTokenBindingKey(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Removes all cryptographic keys from Keystore
|
|
52
|
+
*/
|
|
53
|
+
clearKeystore(): Promise<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node
|
|
56
|
+
*/
|
|
57
|
+
signJwt(): Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the SHA-256 hash of an input string
|
|
60
|
+
*/
|
|
61
|
+
hashString(plainText: string): Promise<string>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=CryptoProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoProvider.d.ts","sourceRoot":"","sources":["../../../src/crypto/CryptoProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAM7D;;;;GAIG;AACH,qBAAa,cAAe,YAAW,OAAO;IAC1C,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAY;;IAS7B;;OAEG;IACH,eAAe,IAAI,MAAM;IAGzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAIvC;;OAEG;IACH,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC;;;OAGG;IACH,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzC;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1B;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAMvD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IGuidGenerator } from "@azure/msal-common/node";
|
|
2
|
+
export declare class GuidGenerator implements IGuidGenerator {
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers.
|
|
6
|
+
* uuidv4 generates guids from cryprtographically-string random
|
|
7
|
+
*/
|
|
8
|
+
generateGuid(): string;
|
|
9
|
+
/**
|
|
10
|
+
* verifies if a string is GUID
|
|
11
|
+
* @param guid
|
|
12
|
+
*/
|
|
13
|
+
isGuid(guid: string): boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=GuidGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidGenerator.d.ts","sourceRoot":"","sources":["../../../src/crypto/GuidGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,qBAAa,aAAc,YAAW,cAAc;IAChD;;;;OAIG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAKhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HashUtils.d.ts","sourceRoot":"","sources":["../../../src/crypto/HashUtils.ts"],"names":[],"mappings":";AAQA,qBAAa,SAAS;IAClB;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAGjC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PkceCodes } from "@azure/msal-common/node";
|
|
2
|
+
/**
|
|
3
|
+
* https://tools.ietf.org/html/rfc7636#page-8
|
|
4
|
+
*/
|
|
5
|
+
export declare class PkceGenerator {
|
|
6
|
+
private hashUtils;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* generates the codeVerfier and the challenge from the codeVerfier
|
|
10
|
+
* reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2
|
|
11
|
+
*/
|
|
12
|
+
generatePkceCodes(): Promise<PkceCodes>;
|
|
13
|
+
/**
|
|
14
|
+
* generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1
|
|
15
|
+
*/
|
|
16
|
+
private generateCodeVerifier;
|
|
17
|
+
/**
|
|
18
|
+
* generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2
|
|
19
|
+
* @param codeVerifier
|
|
20
|
+
*/
|
|
21
|
+
private generateCodeChallengeFromVerifier;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=PkceGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PkceGenerator.d.ts","sourceRoot":"","sources":["../../../src/crypto/PkceGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAM/D;;GAEG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,SAAS,CAAY;;IAK7B;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAM7C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;;OAGG;IACH,OAAO,CAAC,iCAAiC;CAM5C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AuthError } from "@azure/msal-common/node";
|
|
2
|
+
import * as ManagedIdentityErrorCodes from "./ManagedIdentityErrorCodes.js";
|
|
3
|
+
export { ManagedIdentityErrorCodes };
|
|
4
|
+
/**
|
|
5
|
+
* ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ManagedIdentityErrorMessages: {
|
|
8
|
+
invalid_file_extension: string;
|
|
9
|
+
invalid_file_path: string;
|
|
10
|
+
invalid_managed_identity_id_type: string;
|
|
11
|
+
invalid_secret: string;
|
|
12
|
+
platform_not_supported: string;
|
|
13
|
+
missing_client_id: string;
|
|
14
|
+
azure_pod_identity_authority_host_url_malformed: string;
|
|
15
|
+
identity_endpoint_url_malformed: string;
|
|
16
|
+
imds_endpoint_url_malformed: string;
|
|
17
|
+
msi_endpoint_url_malformed: string;
|
|
18
|
+
network_unavailable: string;
|
|
19
|
+
unable_to_create_azure_arc: string;
|
|
20
|
+
unable_to_create_cloud_shell: string;
|
|
21
|
+
unable_to_create_source: string;
|
|
22
|
+
unable_to_read_secret_file: string;
|
|
23
|
+
user_assigned_not_available_at_runtime: string;
|
|
24
|
+
www_authenticate_header_missing: string;
|
|
25
|
+
www_authenticate_header_unsupported_format: string;
|
|
26
|
+
};
|
|
27
|
+
export declare class ManagedIdentityError extends AuthError {
|
|
28
|
+
constructor(errorCode: string);
|
|
29
|
+
}
|
|
30
|
+
export declare function createManagedIdentityError(errorCode: string): ManagedIdentityError;
|
|
31
|
+
//# sourceMappingURL=ManagedIdentityError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManagedIdentityError.d.ts","sourceRoot":"","sources":["../../../src/error/ManagedIdentityError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,yBAAyB,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;CAqCxC,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,SAAS;gBACnC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,0BAA0B,CACtC,SAAS,EAAE,MAAM,GAClB,oBAAoB,CAEtB"}
|