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

Implementing sendX5C on silent client credential call #1169

Merged
merged 4 commits into from
May 24, 2019

Conversation

trwalke
Copy link
Member

@trwalke trwalke commented May 22, 2019

adding withsendX5C() on acquire token silent for the confidential client application
#1149

@trwalke trwalke self-assigned this May 22, 2019
@trwalke trwalke requested a review from henrik-me May 22, 2019 16:17



_tokenCacheHelper.PopulateCache(app.UserTokenCacheInternal.Accessor);
Copy link
Member

Choose a reason for hiding this comment

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

Would be better to mock an actual call instead of populating the token cache artificially.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure I understand the reason why? The functionality that is being testing is whether or not the x5c claim is present in the header of the acquire token silent request. How the user token made its way to the cache is irrelevant. Also, there are other acquire token silent tests that do the same thing.

Copy link
Member

Choose a reason for hiding this comment

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

Not blocking the fix on this, but the arguments would be:

  • artificially populating the cache makes it difficult to the test reader to understand what's in the cache
  • cache population logic is quite likely to become different than how MSAL populates the cache (e.g. pretty sure this won't add AppMetadata which is a FOCI concept).
  • overall test logic is cleaner because it's closer to what the user would do, i.e. fetch a token, fetch smth silent. The user does not "populate the cache".

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.

Looks good, minor improvements in test needed.

Copy link
Contributor

@MarkZuber MarkZuber left a comment

Choose a reason for hiding this comment

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

Reviewed code and Bogdan already commented on areas I had feedback. I'll take a look again once that round of changes is done.

@trwalke trwalke requested review from jennyf19 and jmprieur May 22, 2019 17:19
trwalke added 2 commits May 22, 2019 11:58
Copy link
Contributor

@MarkZuber MarkZuber left a comment

Choose a reason for hiding this comment

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

🕐

@henrik-me
Copy link
Contributor

ok, from me. however still open comments

refactoring for PR comments.
@trwalke trwalke merged commit 7bec7a4 into master May 24, 2019
@trwalke trwalke deleted the trwalke/x5cOnSilentCall branch May 24, 2019 18:28
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.

None yet

5 participants