Skip to content

Pass the assertion options to MSAL for ROPC call#3217

Merged
neha-bhargava merged 2 commits into
masterfrom
nebharg/passAssertionOptions
Jan 27, 2025
Merged

Pass the assertion options to MSAL for ROPC call#3217
neha-bhargava merged 2 commits into
masterfrom
nebharg/passAssertionOptions

Conversation

@neha-bhargava

Copy link
Copy Markdown
Contributor

#3207

  • 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)
Pass the assertion/ merged options to MSAL for the ROPC flow and make sure if forceRefresh is set the silent flow is skipped

Description

  • Update the TokenAcquisition.cs to pass the ExtraQueryParams, ExtraHttpHeaders etc to MSAL from the mergedOptions and tokenAcquisitionOptions.
  • Skip the silent call in case forceRefresh is set to true

Fixes #3207 (in this specific format)

@neha-bhargava neha-bhargava requested a review from a team as a code owner January 23, 2025 18:05
@github-actions

Copy link
Copy Markdown

Summary

Summary
Generated on: 1/23/2025 - 6:21:31 PM
Coverage date: 1/23/2025 - 6:20:17 PM - 1/23/2025 - 6:21:28 PM
Parser: MultiReport (2x Cobertura)
Assemblies: 0
Classes: 0
Files: 0
Line coverage:
Covered lines: 0
Uncovered lines: 0
Coverable lines: 0
Total lines: 0
Covered branches: 0
Total branches: 0
Method coverage: Feature is only available for sponsors

Coverage

No assemblies have been covered.

@github-actions

Copy link
Copy Markdown

Summary

Summary
Generated on: 1/24/2025 - 5:22:33 PM
Coverage date: 1/24/2025 - 5:21:16 PM - 1/24/2025 - 5:22:19 PM
Parser: MultiReport (2x Cobertura)
Assemblies: 0
Classes: 0
Files: 0
Line coverage:
Covered lines: 0
Uncovered lines: 0
Coverable lines: 0
Total lines: 0
Covered branches: 0
Total branches: 0
Method coverage: Feature is only available for sponsors

Coverage

No assemblies have been covered.

Comment thread src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs

@jmprieur jmprieur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM
Thanks @neha-bhargava

@jmprieur

Copy link
Copy Markdown
Collaborator

quite a bit of copied/pasted code. It would be time to have a based class for the CCA AcquireTokenX builders :)

@neha-bhargava

neha-bhargava commented Jan 27, 2025

Copy link
Copy Markdown
Contributor Author

It would be time to have a based class for the CCA AcquireTokenX builders :)

I was looking to see if I can reuse the code but not everything is valid in this case. I agree that the code can be refactored. Thanks for reviewing.

@neha-bhargava neha-bhargava merged commit 7265f57 into master Jan 27, 2025
@neha-bhargava neha-bhargava deleted the nebharg/passAssertionOptions branch January 27, 2025 22:47
This was referenced Aug 1, 2025
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.

Pass the merged options to MSAL for ROPC flow

3 participants