Skip to content

Adopt IAuthorizationHeaderProvider2 from Abstractions 12.3.0#3899

Merged
4gust merged 2 commits into
masterfrom
4gust/adopt-iauthorizationheaderprovider2
Jun 30, 2026
Merged

Adopt IAuthorizationHeaderProvider2 from Abstractions 12.3.0#3899
4gust merged 2 commits into
masterfrom
4gust/adopt-iauthorizationheaderprovider2

Conversation

@4gust

@4gust 4gust commented Jun 29, 2026

Copy link
Copy Markdown
Contributor
  • Bump Microsoft.Identity.Abstractions to 12.3.0
  • Implement IAuthorizationHeaderProvider2 on DefaultAuthorizationHeaderProvider and the public BaseAuthorizationHeaderProvider; consolidate all header-creation paths through a single BuildHeaderInformationAsync engine
  • Propagate TokenAcquisitionMetadata and AdditionalResponseParameters from MSAL onto AuthorizationHeaderInformation via the existing AcquireTokenResultFactory
  • DownstreamApi and MicrosoftIdentityMessageHandler prefer IAuthorizationHeaderProvider2 for mTLS PoP, with IBoundAuthorizationHeaderProvider kept as a back-compat fallback
  • Add PublicAPI.Unshipped entries for the new virtuals on BaseAuthorizationHeaderProvider
  • Add DefaultAuthorizationHeaderProviderV2Tests covering bearer/app/user flows, metadata + additional-response-parameter propagation, and token-binding guard

{PR title}

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Description

{Detail}

Fixes #{bug number} (in this specific format)

- Bump Microsoft.Identity.Abstractions to 12.3.0
- Implement IAuthorizationHeaderProvider2 on DefaultAuthorizationHeaderProvider
  and the public BaseAuthorizationHeaderProvider; consolidate all header-creation
  paths through a single BuildHeaderInformationAsync engine
- Propagate TokenAcquisitionMetadata and AdditionalResponseParameters from MSAL
  onto AuthorizationHeaderInformation via the existing AcquireTokenResultFactory
- DownstreamApi and MicrosoftIdentityMessageHandler prefer IAuthorizationHeaderProvider2
  for mTLS PoP, with IBoundAuthorizationHeaderProvider kept as a back-compat fallback
- Add PublicAPI.Unshipped entries for the new virtuals on BaseAuthorizationHeaderProvider
- Add DefaultAuthorizationHeaderProviderV2Tests covering bearer/app/user flows,
  metadata + additional-response-parameter propagation, and token-binding guard

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@4gust
4gust requested a review from a team as a code owner June 29, 2026 17:02
Comment thread src/Microsoft.Identity.Web.DownstreamApi/DownstreamApi.cs Outdated

@gladjohn gladjohn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two minor maintainability nits on the new mTLS-PoP token-binding dispatch (not blocking).

Comment thread src/Microsoft.Identity.Web.DownstreamApi/DownstreamApi.cs Outdated
- DownstreamApi.cs: hoist isTokenBinding once, reuse in both v2 and legacy branches
  for consistent operand order; add '// for backwards compatibility.' comment on
  the legacy IBoundAuthorizationHeaderProvider branch (bgavrilMS, gladjohn).
- MicrosoftIdentityMessageHandler.cs: convert the second legacy 'if' into 'else if'
  of the v2 block and hoist isTokenBinding so mutual exclusivity is structural
  rather than depending on the early return (gladjohn).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@4gust
4gust merged commit ce70914 into master Jun 30, 2026
4 checks passed
@4gust
4gust deleted the 4gust/adopt-iauthorizationheaderprovider2 branch June 30, 2026 15:33
This was referenced Jul 3, 2026
This was referenced Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants