Add IAuthorizationHeaderProvider2 with metadata-returning header-creation methods#257
Merged
Merged
Conversation
…tion methods Adds an additive numeric-suffix extension to IAuthorizationHeaderProvider that returns the rich AuthorizationHeaderInformation (header value, binding certificate, and token-acquisition metadata) as an OperationResult instead of a bare header string. Provides a rich counterpart for each of the three base methods, each taking the SAME input parameters as its base method: - CreateAuthorizationHeaderInformationForUserAsync (mirrors CreateAuthorizationHeaderForUserAsync) - CreateAuthorizationHeaderInformationForAppAsync (mirrors CreateAuthorizationHeaderForAppAsync) - CreateAuthorizationHeaderInformationAsync (mirrors CreateAuthorizationHeaderAsync) A single implementation can serve both interfaces and existing string-returning callers are unaffected. Public API entries added across all target frameworks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4514e8e to
0dfce51
Compare
bgavrilMS
approved these changes
Jun 25, 2026
bgavrilMS
approved these changes
Jun 25, 2026
4gust
added a commit
that referenced
this pull request
Jun 29, 2026
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
IAuthorizationHeaderProvider2 : IAuthorizationHeaderProviderwith a metadata-returning rich counterpart for each of the three base header-creation methods. Each returnsOperationResult<AuthorizationHeaderInformation, AuthorizationHeaderError>(header value, binding certificate, and token-acquisition metadata) instead of a barestring:IAuthorizationHeaderProvider)IAuthorizationHeaderProvider2)CreateAuthorizationHeaderForUserAsyncCreateAuthorizationHeaderInformationForUserAsyncCreateAuthorizationHeaderForAppAsyncCreateAuthorizationHeaderInformationForAppAsyncCreateAuthorizationHeaderAsyncCreateAuthorizationHeaderInformationAsyncEach rich method takes the same input parameters (names, types, defaults) as the base method it mirrors — only the return type differs.
Why
The token-acquisition metadata surface (#253) added the rich POCOs (
AuthorizationHeaderInformationwithMetadata/BindingCertificate,AuthorizationHeaderErrorwithMetadata/FailureDetails) and aDownstreamApiOptions-based rich provider (IBoundAuthorizationHeaderProvider). What remained was a rich (metadata-returning) counterpart for the scopes/string-based user, app, and unified entry points on the core provider. This interface fills that gap.Design
...InformationAsyncmethod mirrors the inputs of its base...Asynccounterpart exactly.IBoundAuthorizationHeaderProvider(OperationResult<AuthorizationHeaderInformation, AuthorizationHeaderError>).Scope
New interface
.cs+PublicAPI.Unshipped.txtentries across all 6 target frameworks. No behavioral code (pure abstraction), mirroring the footprint of #255. Build + public-API analyzer green.