Skip to content

Commit 4de41fc

Browse files
authored
Log "WWW-Authenticate" header in HttpLoggingPolicy (Azure#22990)
* Log "WWW-Authenticate" header in `HttpLoggingPolicy` * Update CHANGELOG.md
1 parent ac13d9d commit 4de41fc

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

sdk/core/azure-core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
- Log "WWW-Authenticate" header in `HttpLoggingPolicy` #22990
14+
1315
## 1.22.1 (2022-02-09)
1416

1517
### Bugs Fixed

sdk/core/azure-core/azure/core/pipeline/policies/_universal.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ class HttpLoggingPolicy(SansIOHTTPPolicy):
381381
"Server",
382382
"Transfer-Encoding",
383383
"User-Agent",
384+
"WWW-Authenticate", # OAuth Challenge header.
384385
])
385386
REDACTED_PLACEHOLDER = "REDACTED"
386387
MULTI_RECORD_LOG = "AZURE_SDK_LOGGING_MULTIRECORD"

sdk/core/azure-core/tests/test_pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def test_default_http_logging_policy(http_request):
6464
pipeline = pipeline_client._build_pipeline(config)
6565
http_logging_policy = pipeline._impl_policies[-1]._policy
6666
assert http_logging_policy.allowed_header_names == HttpLoggingPolicy.DEFAULT_HEADERS_WHITELIST
67+
assert "WWW-Authenticate" in http_logging_policy.allowed_header_names
6768

6869
@pytest.mark.parametrize("http_request", HTTP_REQUESTS)
6970
def test_pass_in_http_logging_policy(http_request):

0 commit comments

Comments
 (0)