Skip to content
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

use clientinfo endpoint to determine home object id and home tenant i… #177

Merged
merged 6 commits into from
May 27, 2020

Conversation

jennyf19
Copy link
Collaborator

…d for guest scenarios

Fix for #18

src/Microsoft.Identity.Web/ClaimsPrincipalExtensions.cs Outdated Show resolved Hide resolved
src/Microsoft.Identity.Web/ClaimsPrincipalExtensions.cs Outdated Show resolved Hide resolved
Comment on lines +13 to +14
private const string Uid = "Uid";
private const string Utid = "Utid";
Copy link
Contributor

Choose a reason for hiding this comment

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

These two can still use TestConstants. The tests don't depend on the actual value.

@@ -11,33 +11,45 @@ public class ClaimsPrincipalExtensionsTests
{
private const string Name = "name-value";
private const string NameV1 = "name_V1-value";
private const string ObjectId = "objectId-value";
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 for moving stuff into constants.

@@ -265,25 +277,25 @@ public void GetLoginHint_NoNameClaims_ReturnsNull()
[Fact]
public void GetMsalAccountId_WithNeededClaims_ReturnsFormattedMsalId()
{
var b2cPattern = $"{Utid}.{Tid}";
var aadPattern = $"{Oid}.{Tid}";
var b2cPattern = $"{TestConstants.Uid}-{TestConstants.B2CSignUpSignInUserFlow}.{TestConstants.Utid}";
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 good update.

Copy link
Collaborator

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @jennyf19

@jennyf19 jennyf19 merged commit 448ce07 into master May 27, 2020
@jennyf19 jennyf19 deleted the jennyf/userInfo branch May 27, 2020 22:18
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.

3 participants