Skip to content

Commit

Permalink
Remove unused SharedKeyLitePolicy and connection string helpers in Ta…
Browse files Browse the repository at this point in the history
…bles. (#6268)

* Remove SharedKeyLitePolicy and connection string helpers in Tables.

* Remove files and tests that are no longer necessary.
  • Loading branch information
ahsonkhan authored Nov 27, 2024
1 parent 11ee6a6 commit 4efb0fc
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 308 deletions.
3 changes: 0 additions & 3 deletions sdk/tables/azure-data-tables/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,13 @@ set(
set(
AZURE_DATA_TABLES_SOURCE
src/account_sas_builder.cpp
src/credentials/named_key_credential.cpp
src/cryptography/hmacsha256.cpp
src/models.cpp
src/policies/shared_key_lite_policy.cpp
src/policies/tenant_bearer_token_policy.cpp
src/policies/timeout_policy.cpp
src/private/hmacsha256.hpp
src/private/package_version.hpp
src/private/policies/service_version_policy.hpp
src/private/policies/shared_key_lite_policy.hpp
src/private/policies/tenant_bearer_token_policy.hpp
src/private/policies/timeout_policy.hpp
src/private/serializers.hpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
#include <memory>
#include <mutex>
#include <string>
namespace Azure { namespace Data { namespace Tables { namespace _detail { namespace Policies {
class SharedKeyLitePolicy;
}}}}} // namespace Azure::Data::Tables::_detail::Policies

namespace Azure { namespace Data { namespace Tables { namespace Sas {
class AccountSasBuilder;
Expand All @@ -28,7 +25,7 @@ namespace Azure { namespace Data { namespace Tables { namespace Credentials {
/**
* @brief Initializes a new instance of the NamedKeyCredential.
*
* @param accountName Name of the account.
* @param accountName Name of the account.
* @param accountKey Access key of the
* account.
*/
Expand All @@ -38,10 +35,10 @@ namespace Azure { namespace Data { namespace Tables { namespace Credentials {
}

/**
* @brief Update the account's access key. This intended to be used when you've
* @brief Update the account's access key. This intended to be used when you've
* regenerated your account's access keys and want to update long lived clients.
*
* @param accountKey An account access key.
* @param accountKey An account access key.
*/
void Update(std::string accountKey)
{
Expand All @@ -55,7 +52,6 @@ namespace Azure { namespace Data { namespace Tables { namespace Credentials {
const std::string AccountName;

private:
friend class Azure::Data::Tables::_detail::Policies::SharedKeyLitePolicy;
friend class Azure::Data::Tables::Sas::AccountSasBuilder;
friend class Azure::Data::Tables::Sas::TablesSasBuilder;

Expand All @@ -69,17 +65,4 @@ namespace Azure { namespace Data { namespace Tables { namespace Credentials {
std::string m_accountKey;
};

namespace _detail {
struct ConnectionStringParts
{
std::string AccountName;
std::string AccountKey;
Azure::Core::Url TableServiceUrl;
std::shared_ptr<NamedKeyCredential> KeyCredential;
};

ConnectionStringParts ParseConnectionString(const std::string& connectionString);
std::string GetDefaultScopeForAudience(const std::string& audience);
} // namespace _detail

}}}} // namespace Azure::Data::Tables::Credentials
100 changes: 0 additions & 100 deletions sdk/tables/azure-data-tables/src/credentials/named_key_credential.cpp

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions sdk/tables/azure-data-tables/src/table_clients.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "azure/data/tables/table_service_client.hpp"
#include "private/package_version.hpp"
#include "private/policies/service_version_policy.hpp"
#include "private/policies/shared_key_lite_policy.hpp"
#include "private/policies/tenant_bearer_token_policy.hpp"
#include "private/policies/timeout_policy.hpp"
#include "private/serializers.hpp"
Expand All @@ -17,7 +16,6 @@
using namespace Azure::Data::Tables;
using namespace Azure::Data::Tables::_detail::Policies;
using namespace Azure::Data::Tables::_detail::Xml;
using namespace Azure::Data::Tables::Credentials::_detail;
using namespace Azure::Data::Tables::_detail;

TableServiceClient::TableServiceClient(
Expand Down
1 change: 0 additions & 1 deletion sdk/tables/azure-data-tables/test/ut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ add_executable (
sas_test.cpp
serializers_test.hpp
serializers_test.cpp
shared_key_lite_policy_test.cpp
table_client_test.cpp
table_client_test.hpp
transactions_test.hpp
Expand Down

This file was deleted.

0 comments on commit 4efb0fc

Please sign in to comment.