Removed client secret credential support for file service. (#1015)
* Removed client secret credential support for file service. * Removed #include "azure/identity/client_secret_credential.hpp"
This commit is contained in:
parent
c9c12e27aa
commit
50170a062d
@ -4,6 +4,7 @@
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* Removed constructors in clients that takes a `Azure::Identity::ClientSecretCredential`.
|
||||
* Removed Share Lease related API due to it not supported in recent service versions.
|
||||
- ShareClient::AcquireLease
|
||||
- ShareClient::ReleaseLease
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
|
||||
#include "azure/core/http/pipeline.hpp"
|
||||
#include "azure/core/response.hpp"
|
||||
#include "azure/identity/client_secret_credential.hpp"
|
||||
#include "azure/storage/common/storage_credential.hpp"
|
||||
#include "azure/storage/files/shares/protocol/share_rest_client.hpp"
|
||||
#include "azure/storage/files/shares/share_options.hpp"
|
||||
@ -45,17 +44,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::shared_ptr<SharedKeyCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of ShareClient using token authentication.
|
||||
* @param shareUri The URI of the file share this client's request targets.
|
||||
* @param credential The client secret credential used to initialize the client.
|
||||
* @param options Optional parameters used to initialize the client.
|
||||
*/
|
||||
explicit ShareClient(
|
||||
const std::string& shareUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of ShareClient using anonymous access or shared access
|
||||
* signature.
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
|
||||
#include "azure/core/http/pipeline.hpp"
|
||||
#include "azure/core/response.hpp"
|
||||
#include "azure/identity/client_secret_credential.hpp"
|
||||
#include "azure/storage/common/storage_credential.hpp"
|
||||
#include "azure/storage/files/shares/protocol/share_rest_client.hpp"
|
||||
#include "azure/storage/files/shares/share_client.hpp"
|
||||
@ -47,17 +46,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::shared_ptr<SharedKeyCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of DirectoryClient using token authentication.
|
||||
* @param shareDirectoryUri The URI of the directory this client's request targets.
|
||||
* @param credential The client secret credential used to initialize the client.
|
||||
* @param options Optional parameters used to initialize the client.
|
||||
*/
|
||||
explicit DirectoryClient(
|
||||
const std::string& shareDirectoryUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of DirectoryClient using anonymous access or shared access
|
||||
* signature.
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
|
||||
#include "azure/core/http/pipeline.hpp"
|
||||
#include "azure/core/response.hpp"
|
||||
#include "azure/identity/client_secret_credential.hpp"
|
||||
#include "azure/storage/common/storage_credential.hpp"
|
||||
#include "azure/storage/files/shares/protocol/share_rest_client.hpp"
|
||||
#include "azure/storage/files/shares/share_client.hpp"
|
||||
@ -46,17 +45,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::shared_ptr<SharedKeyCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of FileClient using token authentication.
|
||||
* @param shareFileUri The URI of the file this client's request targets.
|
||||
* @param credential The client secret credential used to initialize the client.
|
||||
* @param options Optional parameters used to initialize the client.
|
||||
*/
|
||||
explicit FileClient(
|
||||
const std::string& shareFileUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of FileClient using anonymous access or shared access
|
||||
* signature.
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
|
||||
#include "azure/core/http/pipeline.hpp"
|
||||
#include "azure/core/response.hpp"
|
||||
#include "azure/identity/client_secret_credential.hpp"
|
||||
#include "azure/storage/common/storage_credential.hpp"
|
||||
#include "azure/storage/files/shares/protocol/share_rest_client.hpp"
|
||||
#include "azure/storage/files/shares/share_options.hpp"
|
||||
@ -42,17 +41,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::shared_ptr<SharedKeyCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of ShareServiceClient using token authentication.
|
||||
* @param serviceUri The service URI this client's request targets.
|
||||
* @param credential The client secret credential used to initialize the client.
|
||||
* @param options Optional parameters used to initialize the client.
|
||||
*/
|
||||
explicit ShareServiceClient(
|
||||
const std::string& serviceUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options = ShareClientOptions());
|
||||
|
||||
/**
|
||||
* @brief Initialize a new instance of ShareServiceClient using anonymous access or shared
|
||||
* access signature.
|
||||
|
||||
@ -63,33 +63,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
ShareClient::ShareClient(
|
||||
const std::string& shareUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options)
|
||||
: m_shareUri(shareUri)
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Azure::Storage::Details::FileServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StorageRetryPolicy>(options.RetryOptions));
|
||||
for (const auto& p : options.PerRetryPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Azure::Storage::Details::StorageScope));
|
||||
policies.emplace_back(
|
||||
std::make_unique<Azure::Core::Http::TransportPolicy>(options.TransportPolicyOptions));
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
ShareClient::ShareClient(const std::string& shareUri, const ShareClientOptions& options)
|
||||
: m_shareUri(shareUri)
|
||||
{
|
||||
|
||||
@ -64,33 +64,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
DirectoryClient::DirectoryClient(
|
||||
const std::string& shareDirectoryUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options)
|
||||
: m_shareDirectoryUri(shareDirectoryUri)
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Azure::Storage::Details::FileServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StorageRetryPolicy>(options.RetryOptions));
|
||||
for (const auto& p : options.PerRetryPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Azure::Storage::Details::StorageScope));
|
||||
policies.emplace_back(
|
||||
std::make_unique<Azure::Core::Http::TransportPolicy>(options.TransportPolicyOptions));
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
DirectoryClient::DirectoryClient(
|
||||
const std::string& shareDirectoryUri,
|
||||
const ShareClientOptions& options)
|
||||
|
||||
@ -67,33 +67,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
FileClient::FileClient(
|
||||
const std::string& shareFileUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options)
|
||||
: m_shareFileUri(shareFileUri)
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Azure::Storage::Details::FileServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StorageRetryPolicy>(options.RetryOptions));
|
||||
for (const auto& p : options.PerRetryPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Azure::Storage::Details::StorageScope));
|
||||
policies.emplace_back(
|
||||
std::make_unique<Azure::Core::Http::TransportPolicy>(options.TransportPolicyOptions));
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
FileClient::FileClient(const std::string& shareFileUri, const ShareClientOptions& options)
|
||||
: m_shareFileUri(shareFileUri)
|
||||
{
|
||||
|
||||
@ -59,33 +59,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
ShareServiceClient::ShareServiceClient(
|
||||
const std::string& serviceUri,
|
||||
std::shared_ptr<Core::TokenCredential> credential,
|
||||
const ShareClientOptions& options)
|
||||
: m_serviceUri(serviceUri)
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Azure::Storage::Details::FileServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StorageRetryPolicy>(options.RetryOptions));
|
||||
for (const auto& p : options.PerRetryPolicies)
|
||||
{
|
||||
policies.emplace_back(p->Clone());
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Azure::Storage::Details::StorageScope));
|
||||
policies.emplace_back(
|
||||
std::make_unique<Azure::Core::Http::TransportPolicy>(options.TransportPolicyOptions));
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
ShareServiceClient::ShareServiceClient(
|
||||
const std::string& serviceUri,
|
||||
const ShareClientOptions& options)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user