Skip to content

Conversation

@trwalke
Copy link
Member

@trwalke trwalke commented Jul 16, 2025

Fixes #

Changes proposed in this request
This PR adds a new extensibility API WithExtraBodyParameters(Dictionary<string, Func<CancellationToken, Task<string>>> extrabodyparams)

The body params are in the form of Dictionary<string, Func<CancellationToken, Task<string>>> because this will give developers an opportunity to provide a delegate to achieve the dictionary value because it is possible that it may change depending on when it is acquired.

These parameters are added to the body parameters of the outgoing request and they are added to the cache key. This way, the tokens acquired with these parameters will only be retrieved when the same parameters are provided.

Testing
Unit/Manual

Documentation

  • All relevant documentation is updated.

Copy link
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

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

LGTM so far, some minor comments and TODOs are left

@trwalke trwalke marked this pull request as ready for review July 29, 2025 06:30
@trwalke trwalke requested a review from a team as a code owner July 29, 2025 06:30
@bgavrilMS
Copy link
Member

bgavrilMS commented Aug 12, 2025

This has been approved @trwalke . Merge it?

trwalke and others added 3 commits August 13, 2025 03:57
# Conflicts:
#	src/client/Microsoft.Identity.Client/Extensibility/AbstractConfidentialClientAcquireTokenParameterBuilderExtension.cs
#	src/client/Microsoft.Identity.Client/PublicApi/net462/PublicAPI.Unshipped.txt
#	src/client/Microsoft.Identity.Client/PublicApi/net472/PublicAPI.Unshipped.txt
#	src/client/Microsoft.Identity.Client/PublicApi/net8.0-android/PublicAPI.Unshipped.txt
#	src/client/Microsoft.Identity.Client/PublicApi/net8.0-ios/PublicAPI.Unshipped.txt
#	src/client/Microsoft.Identity.Client/PublicApi/net8.0/PublicAPI.Unshipped.txt
#	src/client/Microsoft.Identity.Client/PublicApi/netstandard2.0/PublicAPI.Unshipped.txt
@trwalke trwalke enabled auto-merge (squash) August 13, 2025 21:08
@trwalke trwalke merged commit 4d18f82 into main Aug 13, 2025
11 checks passed
@trwalke trwalke deleted the trwalke/AttTokens branch August 13, 2025 21:45
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.

4 participants