diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/append_blob_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/append_blob_client.hpp index 210f773a1..1e429c08a 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/append_blob_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/append_blob_client.hpp @@ -53,7 +53,7 @@ namespace Azure { namespace Storage { namespace Blobs { */ explicit AppendBlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options = BlobClientOptions()); /** diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_batch_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_batch_client.hpp index 332fa99ec..21fa0dad2 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_batch_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_batch_client.hpp @@ -108,7 +108,7 @@ namespace Azure { namespace Storage { namespace Blobs { */ explicit BlobBatchClient( const std::string& serviceUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options = BlobClientOptions()); /** diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp index f50b2b9a9..4d565ffae 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp @@ -57,7 +57,7 @@ namespace Azure { namespace Storage { namespace Blobs { */ explicit BlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options = BlobClientOptions()); /** diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp index 2461fa7d8..30b20056d 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp @@ -49,7 +49,7 @@ namespace Azure { namespace Storage { namespace Blobs { */ explicit BlobContainerClient( const std::string& containerUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options = BlobClientOptions()); /** diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp index a86edbfbc..57008b27b 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp @@ -279,13 +279,13 @@ namespace Azure { namespace Storage { namespace Blobs { void SetPermissions(BlobSasPermissions permissions); /** - * @brief Uses the SharedKeyCredential to sign this shared access signature, to produce + * @brief Uses the StorageSharedKeyCredential to sign this shared access signature, to produce * the proper SAS query parameters for authentication requests. * * @param credential The storage account's shared key credential. * @return The SAS query parameters used for authenticating requests. */ - std::string GenerateSasToken(const SharedKeyCredential& credential); + std::string GenerateSasToken(const StorageSharedKeyCredential& credential); /** * @brief Uses an account's user delegation key to sign this shared access signature, to diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp index d52f4f219..b71928ef2 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp @@ -43,7 +43,7 @@ namespace Azure { namespace Storage { namespace Blobs { */ explicit BlobServiceClient( const std::string& serviceUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options = BlobClientOptions()); /** diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/block_blob_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/block_blob_client.hpp index d1b8f2a0b..b1a1018be 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/block_blob_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/block_blob_client.hpp @@ -63,7 +63,7 @@ namespace Azure { namespace Storage { namespace Blobs { */ explicit BlockBlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options = BlobClientOptions()); /** diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/page_blob_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/page_blob_client.hpp index 5f50e4009..920103a9f 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/page_blob_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/page_blob_client.hpp @@ -55,7 +55,7 @@ namespace Azure { namespace Storage { namespace Blobs { */ explicit PageBlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options = BlobClientOptions()); /** diff --git a/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp index a57acaae3..1ce5b9bf8 100644 --- a/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp @@ -21,7 +21,7 @@ namespace Azure { namespace Storage { namespace Blobs { AppendBlobClient::AppendBlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options) : BlobClient(blobUrl, std::move(credential), options) { @@ -52,8 +52,7 @@ namespace Azure { namespace Storage { namespace Blobs { else { newClient.m_blobUrl.AppendQueryParameter( - Storage::Details::HttpQuerySnapshot, - Storage::Details::UrlEncodeQueryParameter(snapshot)); + Storage::Details::HttpQuerySnapshot, Storage::Details::UrlEncodeQueryParameter(snapshot)); } return newClient; } diff --git a/sdk/storage/azure-storage-blobs/src/blob_batch_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_batch_client.cpp index 555e08baa..a27ad3134 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_batch_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_batch_client.cpp @@ -85,7 +85,7 @@ namespace Azure { namespace Storage { namespace Blobs { BlobBatchClient::BlobBatchClient( const std::string& serviceUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options) : m_serviceUrl(serviceUrl) { diff --git a/sdk/storage/azure-storage-blobs/src/blob_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_client.cpp index aba47a290..1d5f1d497 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_client.cpp @@ -42,7 +42,7 @@ namespace Azure { namespace Storage { namespace Blobs { BlobClient::BlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options) : BlobClient(blobUrl, options) { diff --git a/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp index e27f93f59..ec272d6c0 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp @@ -38,7 +38,7 @@ namespace Azure { namespace Storage { namespace Blobs { BlobContainerClient::BlobContainerClient( const std::string& containerUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options) : BlobContainerClient(containerUrl, options) { diff --git a/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp b/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp index 4b47a60b0..8373a2b2b 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp @@ -107,7 +107,7 @@ namespace Azure { namespace Storage { namespace Blobs { } } - std::string BlobSasBuilder::GenerateSasToken(const SharedKeyCredential& credential) + std::string BlobSasBuilder::GenerateSasToken(const StorageSharedKeyCredential& credential) { std::string canonicalName = "/blob/" + credential.AccountName + "/" + ContainerName; if (Resource == BlobSasResource::Blob || Resource == BlobSasResource::BlobSnapshot diff --git a/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp index 16fdb901e..695b47dd0 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp @@ -33,7 +33,7 @@ namespace Azure { namespace Storage { namespace Blobs { BlobServiceClient::BlobServiceClient( const std::string& serviceUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options) : m_serviceUrl(serviceUrl) { diff --git a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp index 8621db3cb..700a0a8e4 100644 --- a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp @@ -24,7 +24,7 @@ namespace Azure { namespace Storage { namespace Blobs { BlockBlobClient::BlockBlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options) : BlobClient(blobUrl, std::move(credential), options) { @@ -55,8 +55,7 @@ namespace Azure { namespace Storage { namespace Blobs { else { newClient.m_blobUrl.AppendQueryParameter( - Storage::Details::HttpQuerySnapshot, - Storage::Details::UrlEncodeQueryParameter(snapshot)); + Storage::Details::HttpQuerySnapshot, Storage::Details::UrlEncodeQueryParameter(snapshot)); } return newClient; } diff --git a/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp index d41b90b05..471eae0de 100644 --- a/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp @@ -23,7 +23,7 @@ namespace Azure { namespace Storage { namespace Blobs { PageBlobClient::PageBlobClient( const std::string& blobUrl, - std::shared_ptr credential, + std::shared_ptr credential, const BlobClientOptions& options) : BlobClient(blobUrl, std::move(credential), options) { @@ -54,8 +54,7 @@ namespace Azure { namespace Storage { namespace Blobs { else { newClient.m_blobUrl.AppendQueryParameter( - Storage::Details::HttpQuerySnapshot, - Storage::Details::UrlEncodeQueryParameter(snapshot)); + Storage::Details::HttpQuerySnapshot, Storage::Details::UrlEncodeQueryParameter(snapshot)); } return newClient; } diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index 28b387fcd..ea8cc2ab5 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -2,6 +2,8 @@ ## 12.0.0-beta.6 (Unreleased) +* Rename `SharedKeyCredential` to `StorageSharedKeyCredential`. +* Rename `StorageSharedKeyCredential::UpdateAccountKey` to `StorageSharedKeyCredential::Update`. ## 12.0.0-beta.5 (2020-11-13) diff --git a/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp b/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp index e8348bcd1..661be912a 100644 --- a/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp +++ b/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp @@ -249,7 +249,7 @@ namespace Azure { namespace Storage { void SetPermissions(AccountSasPermissions permissions); /** - * @brief Uses the SharedKeyCredential to sign this shared access signature, to produce + * @brief Uses the StorageSharedKeyCredential to sign this shared access signature, to produce * the proper SAS query parameters for authentication requests. * * @param credential @@ -257,7 +257,7 @@ namespace Azure { namespace Storage { * @return The SAS query parameters used for * authenticating requests. */ - std::string GenerateSasToken(const SharedKeyCredential& credential); + std::string GenerateSasToken(const StorageSharedKeyCredential& credential); private: std::string Permissions; diff --git a/sdk/storage/azure-storage-common/inc/azure/storage/common/shared_key_policy.hpp b/sdk/storage/azure-storage-common/inc/azure/storage/common/shared_key_policy.hpp index fd71ac1dd..378e69a68 100644 --- a/sdk/storage/azure-storage-common/inc/azure/storage/common/shared_key_policy.hpp +++ b/sdk/storage/azure-storage-common/inc/azure/storage/common/shared_key_policy.hpp @@ -10,7 +10,7 @@ namespace Azure { namespace Storage { class SharedKeyPolicy : public Core::Http::HttpPolicy { public: - explicit SharedKeyPolicy(std::shared_ptr credential) + explicit SharedKeyPolicy(std::shared_ptr credential) : m_credential(std::move(credential)) { } @@ -35,7 +35,7 @@ namespace Azure { namespace Storage { private: std::string GetSignature(const Core::Http::Request& request) const; - std::shared_ptr m_credential; + std::shared_ptr m_credential; }; }} // namespace Azure::Storage diff --git a/sdk/storage/azure-storage-common/inc/azure/storage/common/storage_credential.hpp b/sdk/storage/azure-storage-common/inc/azure/storage/common/storage_credential.hpp index b86c1383c..aef358aa2 100644 --- a/sdk/storage/azure-storage-common/inc/azure/storage/common/storage_credential.hpp +++ b/sdk/storage/azure-storage-common/inc/azure/storage/common/storage_credential.hpp @@ -26,19 +26,19 @@ namespace Azure { namespace Storage { } // namespace Files /** - * @brief A SharedKeyCredential is a credential backed by a storage account's name and one + * @brief A StorageSharedKeyCredential is a credential backed by a storage account's name and one * of its access keys. */ - class SharedKeyCredential { + class StorageSharedKeyCredential { public: /** - * @brief Initializes a new instance of the SharedKeyCredential. + * @brief Initializes a new instance of the StorageSharedKeyCredential. * * @param accountName Name of the storage account. * @param accountKey Access key of the storage * account. */ - explicit SharedKeyCredential(std::string accountName, std::string accountKey) + explicit StorageSharedKeyCredential(std::string accountName, std::string accountKey) : AccountName(std::move(accountName)), m_accountKey(std::move(accountKey)) { } @@ -49,7 +49,7 @@ namespace Azure { namespace Storage { * * @param accountKey A storage account access key. */ - void UpdateAccountKey(std::string accountKey) + void Update(std::string accountKey) { std::lock_guard guard(m_mutex); m_accountKey = std::move(accountKey); @@ -84,7 +84,7 @@ namespace Azure { namespace Storage { Azure::Core::Http::Url FileServiceUrl; Azure::Core::Http::Url QueueServiceUrl; Azure::Core::Http::Url DataLakeServiceUrl; - std::shared_ptr KeyCredential; + std::shared_ptr KeyCredential; }; ConnectionStringParts ParseConnectionString(const std::string& connectionString); diff --git a/sdk/storage/azure-storage-common/src/account_sas_builder.cpp b/sdk/storage/azure-storage-common/src/account_sas_builder.cpp index 8222a9be7..369b02d22 100644 --- a/sdk/storage/azure-storage-common/src/account_sas_builder.cpp +++ b/sdk/storage/azure-storage-common/src/account_sas_builder.cpp @@ -57,7 +57,7 @@ namespace Azure { namespace Storage { } } - std::string AccountSasBuilder::GenerateSasToken(const SharedKeyCredential& credential) + std::string AccountSasBuilder::GenerateSasToken(const StorageSharedKeyCredential& credential) { std::string protocol; if (Protocol == SasProtocol::HttpsAndHtttp) diff --git a/sdk/storage/azure-storage-common/src/storage_credential.cpp b/sdk/storage/azure-storage-common/src/storage_credential.cpp index 64f8b4cd1..5f3211e92 100644 --- a/sdk/storage/azure-storage-common/src/storage_credential.cpp +++ b/sdk/storage/azure-storage-common/src/storage_credential.cpp @@ -90,7 +90,7 @@ namespace Azure { namespace Storage { namespace Details { throw std::runtime_error("Cannot find account name in connection string"); } connectionStringParts.KeyCredential - = std::make_shared(accountName, accountKey); + = std::make_shared(accountName, accountKey); } std::string sas = getWithDefault(connectionStringMap, "SharedAccessSignature"); diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp index 1ab32b983..70a3e4e9d 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp @@ -41,7 +41,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ explicit DirectoryClient( const std::string& directoryUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options = DataLakeClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp index 760cfe42c..d0b28b57f 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp @@ -42,7 +42,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ explicit FileClient( const std::string& fileUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options = DataLakeClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp index 8dccdf9f6..a3d74c7aa 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp @@ -44,7 +44,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ explicit FileSystemClient( const std::string& fileSystemUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options = DataLakeClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp index 7e09b64d4..d25e584fb 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp @@ -42,7 +42,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ explicit PathClient( const std::string& pathUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options = DataLakeClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp index 4c2fc53a9..5de2cec37 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp @@ -310,13 +310,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { void SetPermissions(DataLakeSasPermissions permissions); /** - * @brief Uses the SharedKeyCredential to sign this shared access signature, to produce + * @brief Uses the StorageSharedKeyCredential to sign this shared access signature, to produce * the proper SAS query parameters for authentication requests. * * @param credential The storage account's shared key credential. * @return The SAS query parameters used for authenticating requests. */ - std::string GenerateSasToken(const SharedKeyCredential& credential); + std::string GenerateSasToken(const StorageSharedKeyCredential& credential); /** * @brief Uses an account's user delegation key to sign this shared access signature, to diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp index 3fee5c659..fc6aa0115 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp @@ -39,7 +39,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ explicit DataLakeServiceClient( const std::string& serviceUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options = DataLakeClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp index 2c36e94db..372dc8d93 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp @@ -44,7 +44,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { DirectoryClient::DirectoryClient( const std::string& directoryUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options) : PathClient(directoryUri, credential, options) { diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp index b9966f8f8..40f3bad1b 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp @@ -121,7 +121,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { FileClient::FileClient( const std::string& fileUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options) : PathClient(fileUri, credential, options), m_blockBlobClient(m_blobClient.AsBlockBlobClient()) diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp index 96109d965..6f9b6771c 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp @@ -60,7 +60,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { FileSystemClient::FileSystemClient( const std::string& fileSystemUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options) : m_dfsUri(Details::GetDfsUriFromUri(fileSystemUri)), m_blobContainerClient( diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp index a1eac5e86..10d4c0905 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp @@ -105,7 +105,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { PathClient::PathClient( const std::string& pathUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options) : m_dfsUri(Details::GetDfsUriFromUri(pathUri)), m_blobClient(Details::GetBlobUriFromUri(pathUri), credential, GetBlobClientOptions(options)) diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp index cfc4458c2..f7e30fe57 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp @@ -113,7 +113,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { } } - std::string DataLakeSasBuilder::GenerateSasToken(const SharedKeyCredential& credential) + std::string DataLakeSasBuilder::GenerateSasToken(const StorageSharedKeyCredential& credential) { std::string canonicalName = "/blob/" + credential.AccountName + "/" + FileSystemName; if (Resource == DataLakeSasResource::File) @@ -126,9 +126,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { std::string stringToSign = Permissions + "\n" + (StartsOn.HasValue() ? StartsOn.GetValue() : "") + "\n" + ExpiresOn + "\n" + canonicalName + "\n" + Identifier + "\n" + (IPRange.HasValue() ? IPRange.GetValue() : "") + "\n" + protocol + "\n" - + Storage::Details::DefaultSasVersion + "\n" + resource + "\n" + "\n" + CacheControl - + "\n" + ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage + "\n" - + ContentType; + + Storage::Details::DefaultSasVersion + "\n" + resource + "\n" + "\n" + CacheControl + "\n" + + ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage + "\n" + ContentType; std::string signature = Base64Encode( Storage::Details::HmacSha256(stringToSign, Base64Decode(credential.GetAccountKey()))); diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp index 3238b565e..ad2fab287 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp @@ -71,7 +71,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { DataLakeServiceClient::DataLakeServiceClient( const std::string& serviceUri, - std::shared_ptr credential, + std::shared_ptr credential, const DataLakeClientOptions& options) : m_dfsUri(Details::GetDfsUriFromUri(serviceUri)), m_blobServiceClient( Details::GetBlobUriFromUri(serviceUri), diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_client.hpp index f580a9253..d1ef2b4c6 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_client.hpp @@ -41,7 +41,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { */ explicit ShareClient( const std::string& shareUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options = ShareClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_directory_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_directory_client.hpp index b45729aa2..78092a9de 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_directory_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_directory_client.hpp @@ -43,7 +43,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { */ explicit DirectoryClient( const std::string& shareDirectoryUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options = ShareClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_file_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_file_client.hpp index 2bab4be8b..7dd344a60 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_file_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_file_client.hpp @@ -42,7 +42,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { */ explicit FileClient( const std::string& shareFileUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options = ShareClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp index e96afcfc1..76da30969 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp @@ -218,13 +218,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { void SetPermissions(ShareFileSasPermissions permissions); /** - * @brief Uses the SharedKeyCredential to sign this shared access signature, to produce + * @brief Uses the StorageSharedKeyCredential to sign this shared access signature, to produce * the proper SAS query parameters for authentication requests. * * @param credential The storage account's shared key credential. * @return The SAS query parameters used for authenticating requests. */ - std::string GenerateSasToken(const SharedKeyCredential& credential); + std::string GenerateSasToken(const StorageSharedKeyCredential& credential); private: std::string Permissions; diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_service_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_service_client.hpp index f20d1f7e3..acd457fe2 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_service_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_service_client.hpp @@ -38,7 +38,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { */ explicit ShareServiceClient( const std::string& serviceUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options = ShareClientOptions()); /** diff --git a/sdk/storage/azure-storage-files-shares/src/share_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_client.cpp index 7e377fffe..6fc0ab1cf 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_client.cpp @@ -38,7 +38,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ShareClient::ShareClient( const std::string& shareUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options) : m_shareUri(shareUri) { diff --git a/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp index 1ede26d1d..f2701f2f9 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp @@ -40,7 +40,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { DirectoryClient::DirectoryClient( const std::string& shareDirectoryUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options) : m_shareDirectoryUri(shareDirectoryUri) { diff --git a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp index b903eadf7..e878e2ed4 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp @@ -42,7 +42,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { FileClient::FileClient( const std::string& shareFileUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options) : m_shareFileUri(shareFileUri) { diff --git a/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp b/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp index 5475ad1a7..b1e1968cd 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp @@ -74,7 +74,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { } } - std::string ShareSasBuilder::GenerateSasToken(const SharedKeyCredential& credential) + std::string ShareSasBuilder::GenerateSasToken(const StorageSharedKeyCredential& credential) { std::string canonicalName = "/file/" + credential.AccountName + "/" + ShareName; if (Resource == ShareSasResource::File) diff --git a/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp index 3871a2587..4a394b772 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp @@ -35,7 +35,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ShareServiceClient::ShareServiceClient( const std::string& serviceUri, - std::shared_ptr credential, + std::shared_ptr credential, const ShareClientOptions& options) : m_serviceUri(serviceUri) {