-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API and make ROPC call #3103
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few suggestions
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Outdated
Show resolved
Hide resolved
string username = user.FindFirst(ClaimConstants.Username)?.Value ?? string.Empty; | ||
string password = user.FindFirst(ClaimConstants.Password)?.Value ?? string.Empty; | ||
|
||
var accounts = await application.GetAccountsAsync().ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this exists in confidential client applications? does it?
or does it only contain the ROPC accounts?
We need to be very careful here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It exists in confidential client applications. It is currently obsolete but we still use in MSAL tests. I have created this PR in MSAL.Net to remove the obsolete attribute from this method as suggested by @bgavrilMS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. I need explanations here.
- which account will they return be in a web app that signs-in users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that this seems to be going backwards.
SummarySummary
CoverageMicrosoft.Identity.Web - 63.4%
Microsoft.Identity.Web.Certificate - 41.4%
Microsoft.Identity.Web.Certificateless - 40.1%
Microsoft.Identity.Web.Diagnostics - 10.2%
Microsoft.Identity.Web.DownstreamApi - 14.5%
Microsoft.Identity.Web.MicrosoftGraph - 42%
Microsoft.Identity.Web.Test.Common - 69.3%
Microsoft.Identity.Web.TokenAcquisition - 52.2%
Microsoft.Identity.Web.TokenCache - 80.8%
|
SummarySummary
CoverageMicrosoft.Identity.Web - 63.4%
Microsoft.Identity.Web.Certificate - 41.4%
Microsoft.Identity.Web.Certificateless - 40.1%
Microsoft.Identity.Web.Diagnostics - 10.2%
Microsoft.Identity.Web.DownstreamApi - 14.5%
Microsoft.Identity.Web.MicrosoftGraph - 42%
Microsoft.Identity.Web.Test.Common - 69.3%
Microsoft.Identity.Web.TokenAcquisition - 52.2%
Microsoft.Identity.Web.TokenCache - 80.8%
|
/// <summary> | ||
/// Username claims for ROPC flow. | ||
/// </summary> | ||
public const string Username = "xms-username"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve the warnings in the GitHub Actions. You can see them in the UI via GitHub, or in the IDE In VS.
Implement ROPC flow
Summary of the changes (Less than 80 chars)
Add ROPC flow to use username and password and call MSAL using the credentials
Description
{Detail}
Fixes #3091