Skip to content

Commit f0b4b94

Browse files
authored
Storage/STG91 Renamed PublicAudience to DefaultAudience (Azure#5022)
* Change Audience * change PublicAudience to DefaultAudience
1 parent 504d9f2 commit f0b4b94

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace Azure { namespace Storage { namespace Blobs {
4646
* @brief Default Audience. Use to acquire a token for authorizing requests to any Azure
4747
* Storage account.
4848
*/
49-
AZ_STORAGE_BLOBS_DLLEXPORT const static BlobAudience PublicAudience;
49+
AZ_STORAGE_BLOBS_DLLEXPORT const static BlobAudience DefaultAudience;
5050
};
5151
} // namespace Models
5252

@@ -198,7 +198,7 @@ namespace Azure { namespace Storage { namespace Blobs {
198198

199199
/**
200200
* The Audience to use for authentication with Azure Active Directory (AAD).
201-
* #Azure::Storage::Blobs::Models::BlobAudience::PublicAudience will be assumed if Audience is
201+
* #Azure::Storage::Blobs::Models::BlobAudience::DefaultAudience will be assumed if Audience is
202202
* not set.
203203
*/
204204
Azure::Nullable<Models::BlobAudience> Audience;

sdk/storage/azure-storage-blobs/src/blob_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Azure { namespace Storage { namespace Blobs {
77

88
namespace Models {
9-
const BlobAudience BlobAudience::PublicAudience(_internal::StoragePublicAudience);
9+
const BlobAudience BlobAudience::DefaultAudience(_internal::StorageDefaultAudience);
1010
} // namespace Models
1111

1212
BlobQueryInputTextOptions BlobQueryInputTextOptions::CreateCsvTextOptions(

sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,13 +2035,13 @@ namespace Azure { namespace Storage { namespace Test {
20352035
InitStorageClientOptions<Azure::Identity::ClientSecretCredentialOptions>());
20362036
auto clientOptions = InitStorageClientOptions<Blobs::BlobClientOptions>();
20372037

2038-
// default audience
2038+
// audience by default
20392039
auto blockBlobClient
20402040
= Blobs::BlockBlobClient(m_blockBlobClient->GetUrl(), credential, clientOptions);
20412041
EXPECT_NO_THROW(blockBlobClient.GetProperties());
20422042

2043-
// public audience
2044-
clientOptions.Audience = Blobs::Models::BlobAudience::PublicAudience;
2043+
// default audience
2044+
clientOptions.Audience = Blobs::Models::BlobAudience::DefaultAudience;
20452045
blockBlobClient
20462046
= Blobs::BlockBlobClient(m_blockBlobClient->GetUrl(), credential, clientOptions);
20472047
EXPECT_NO_THROW(blockBlobClient.GetProperties());

sdk/storage/azure-storage-common/inc/azure/storage/common/internal/constants.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Azure { namespace Storage { namespace _internal {
1111
constexpr static const char* HttpQuerySnapshot = "snapshot";
1212
constexpr static const char* HttpQueryVersionId = "versionid";
1313
constexpr static const char* StorageScope = "https://storage.azure.com/.default";
14-
constexpr static const char* StoragePublicAudience = "https://storage.azure.com";
14+
constexpr static const char* StorageDefaultAudience = "https://storage.azure.com";
1515
constexpr static const char* HttpHeaderDate = "date";
1616
constexpr static const char* HttpHeaderXMsVersion = "x-ms-version";
1717
constexpr static const char* HttpHeaderRequestId = "x-ms-request-id";

sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
103103
* @brief Default Audience. Use to acquire a token for authorizing requests to any Azure
104104
* Storage account.
105105
*/
106-
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static DataLakeAudience PublicAudience;
106+
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static DataLakeAudience DefaultAudience;
107107
};
108108
} // namespace Models
109109

@@ -173,8 +173,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
173173

174174
/**
175175
* The Audience to use for authentication with Azure Active Directory (AAD).
176-
* #Azure::Storage::Files::DataLake::Models::DataLakeAudience::PublicAudience will be assumed if
177-
* Audience is not set.
176+
* #Azure::Storage::Files::DataLake::Models::DataLakeAudience::DefaultAudience will be assumed
177+
* if Audience is not set.
178178
*/
179179
Azure::Nullable<Models::DataLakeAudience> Audience;
180180
};

sdk/storage/azure-storage-files-datalake/src/datalake_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
namespace Azure { namespace Storage { namespace Files { namespace DataLake { namespace Models {
77

8-
const DataLakeAudience DataLakeAudience::PublicAudience(_internal::StoragePublicAudience);
8+
const DataLakeAudience DataLakeAudience::DefaultAudience(_internal::StorageDefaultAudience);
99

1010
}}}}} // namespace Azure::Storage::Files::DataLake::Models

sdk/storage/azure-storage-files-datalake/test/ut/datalake_path_client_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,13 +489,13 @@ namespace Azure { namespace Storage { namespace Test {
489489
InitStorageClientOptions<Azure::Identity::ClientSecretCredentialOptions>());
490490
auto clientOptions = InitStorageClientOptions<Files::DataLake::DataLakeClientOptions>();
491491

492-
// default audience
492+
// audience by default
493493
auto pathClient
494494
= Files::DataLake::DataLakePathClient(m_pathClient->GetUrl(), credential, clientOptions);
495495
EXPECT_NO_THROW(pathClient.GetProperties());
496496

497-
// public audience
498-
clientOptions.Audience = Files::DataLake::Models::DataLakeAudience::PublicAudience;
497+
// default audience
498+
clientOptions.Audience = Files::DataLake::Models::DataLakeAudience::DefaultAudience;
499499
pathClient
500500
= Files::DataLake::DataLakePathClient(m_pathClient->GetUrl(), credential, clientOptions);
501501
EXPECT_NO_THROW(pathClient.GetProperties());

sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_options.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
4444
* @brief Default Audience. Use to acquire a token for authorizing requests to any Azure
4545
* Storage account.
4646
*/
47-
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareAudience PublicAudience;
47+
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareAudience DefaultAudience;
4848
};
4949
} // namespace Models
5050

@@ -80,7 +80,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
8080

8181
/**
8282
* The Audience to use for authentication with Azure Active Directory (AAD).
83-
* #Azure::Storage::Files::Shares::Models::ShareAudience::PublicAudience will be assumed if
83+
* #Azure::Storage::Files::Shares::Models::ShareAudience::DefaultAudience will be assumed if
8484
* Audience is not set.
8585
*/
8686
Azure::Nullable<Models::ShareAudience> Audience;

sdk/storage/azure-storage-files-shares/src/share_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
namespace Azure { namespace Storage { namespace Files { namespace Shares { namespace Models {
77

8-
const ShareAudience ShareAudience::PublicAudience(_internal::StoragePublicAudience);
8+
const ShareAudience ShareAudience::DefaultAudience(_internal::StorageDefaultAudience);
99

1010
}}}}} // namespace Azure::Storage::Files::Shares::Models

sdk/storage/azure-storage-files-shares/test/ut/share_file_client_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,13 +1702,13 @@ namespace Azure { namespace Storage { namespace Test {
17021702
auto clientOptions = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
17031703
clientOptions.ShareTokenIntent = Files::Shares::Models::ShareTokenIntent::Backup;
17041704

1705-
// default audience
1705+
// audience by default
17061706
auto fileClient
17071707
= Files::Shares::ShareFileClient(m_fileClient->GetUrl(), credential, clientOptions);
17081708
EXPECT_NO_THROW(fileClient.GetProperties());
17091709

1710-
// public audience
1711-
clientOptions.Audience = Files::Shares::Models::ShareAudience::PublicAudience;
1710+
// default audience
1711+
clientOptions.Audience = Files::Shares::Models::ShareAudience::DefaultAudience;
17121712
fileClient = Files::Shares::ShareFileClient(m_fileClient->GetUrl(), credential, clientOptions);
17131713
EXPECT_NO_THROW(fileClient.GetProperties());
17141714

0 commit comments

Comments
 (0)