Skip to content

Conversation

@chlowell
Copy link
Member

Two reasons "authorization" is better than "credential" here:

  1. the policy authorizes requests with bearer tokens by setting the "Authorization" header
  2. a TokenCredential could provide other types of token in addition to or instead of bearer tokens

@chlowell chlowell self-assigned this Oct 23, 2025
@github-actions github-actions bot added Azure.Core The azure_core crate KeyVault Key Vault Storage Storage Service (Queues, Blobs, Files) labels Oct 23, 2025
@chlowell chlowell marked this pull request as ready for review October 24, 2025 00:29
@chlowell chlowell requested a review from heaths as a code owner October 24, 2025 00:29
Copilot AI review requested due to automatic review settings October 24, 2025 00:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames BearerTokenCredentialPolicy to BearerTokenAuthorizationPolicy to better reflect the policy's purpose of authorizing requests via the Authorization header, rather than focusing on the credential aspect. This clarifies that the policy handles authorization specifically for bearer tokens.

Key Changes

  • Renamed the struct and all its references from BearerTokenCredentialPolicy to BearerTokenAuthorizationPolicy across the codebase
  • Updated the CHANGELOG.md to document this breaking change

Reviewed Changes

Copilot reviewed 9 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/core/azure_core/src/http/policies/bearer_token_policy.rs Renamed struct and impl blocks from BearerTokenCredentialPolicy to BearerTokenAuthorizationPolicy
sdk/core/azure_core/src/http/policies/mod.rs Updated public export to use new policy name
sdk/storage/azure_storage_blob/src/clients/page_blob_client.rs Updated import to use renamed policy
sdk/storage/azure_storage_blob/src/clients/block_blob_client.rs Updated import to use renamed policy
sdk/storage/azure_storage_blob/src/clients/blob_service_client.rs Updated import to use renamed policy
sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs Updated import to use renamed policy
sdk/storage/azure_storage_blob/src/clients/blob_client.rs Updated import to use renamed policy
sdk/storage/azure_storage_blob/src/clients/append_blob_client.rs Updated import to use renamed policy
sdk/core/azure_core/CHANGELOG.md Added breaking change entry for the rename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core The azure_core crate KeyVault Key Vault Storage Storage Service (Queues, Blobs, Files)

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

5 participants