| 248 | } |
| 249 | |
| 250 | bool AzureOptions::Equals(const AzureOptions& other) const { |
| 251 | const bool equals = |
| 252 | account_name == other.account_name && |
| 253 | blob_storage_authority == other.blob_storage_authority && |
| 254 | dfs_storage_authority == other.dfs_storage_authority && |
| 255 | blob_storage_scheme == other.blob_storage_scheme && |
| 256 | dfs_storage_scheme == other.dfs_storage_scheme && |
| 257 | default_metadata == other.default_metadata && |
| 258 | background_writes == other.background_writes && |
| 259 | credential_kind_ == other.credential_kind_ && account_key_ == other.account_key_ && |
| 260 | sas_token_ == other.sas_token_ && tenant_id_ == other.tenant_id_ && |
| 261 | client_id_ == other.client_id_ && client_secret_ == other.client_secret_; |
| 262 | if (!equals) { |
| 263 | return false; |
| 264 | } |
| 265 | switch (credential_kind_) { |
| 266 | case CredentialKind::kDefault: |
| 267 | case CredentialKind::kAnonymous: |
| 268 | return true; |
| 269 | case CredentialKind::kStorageSharedKey: |
| 270 | return storage_shared_key_credential_->AccountName == |
| 271 | other.storage_shared_key_credential_->AccountName; |
| 272 | case CredentialKind::kSASToken: |
| 273 | return sas_token_ == other.sas_token_; |
| 274 | case CredentialKind::kClientSecret: |
| 275 | case CredentialKind::kCLI: |
| 276 | case CredentialKind::kManagedIdentity: |
| 277 | case CredentialKind::kWorkloadIdentity: |
| 278 | case CredentialKind::kEnvironment: |
| 279 | return token_credential_->GetCredentialName() == |
| 280 | other.token_credential_->GetCredentialName(); |
| 281 | } |
| 282 | DCHECK(false); |
| 283 | return false; |
| 284 | } |
| 285 | |
| 286 | namespace { |
| 287 | std::string BuildBaseUrl(const std::string& scheme, const std::string& authority, |