Add tests to guard client-capabilities forwarding #3351
Merged
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.
Add tests to guard client-capabilities forwarding (no functional change)
Summary of the changes
Confirmed that client capabilities are already forwarded by
UpdateConfidentialClientApplicationOptionsFromMergedOptions, which callsWithClientCapabilities(...)when the CCA is built.Tokens issued today already include the expected
xms_ccclaim.Added a comment to
[TokenAcquisition.cs](https://github.com/AzureAD/microsoft-identity-web/compare/gladjohn/cca_capability_idweb?expand=1#diff-3600735102cf2582ea4dc8277f799690b8a8135f4971e0be919fbecd053ae2ca)to clarify thatChanges in this PR
Added test coverage
CrossCloudFicIntegrationTest_WithCp1– decodes the JWT and assertscp1is present in thexms_ccclaim.CrossCloudFicUnitTest_WithCp1– inspects the outbound form data and verifies theclaimspayload carriescp1.Outcome
No functional change; behavior is now safeguarded by extra checks to prevent future regressions.
Fixes #3349