Skip to content

Sagonzal/add client assertion#117

Merged
sangonzal merged 5 commits intodevfrom
sagonzal/addClientAssertion
Oct 31, 2019
Merged

Sagonzal/add client assertion#117
sangonzal merged 5 commits intodevfrom
sagonzal/addClientAssertion

Conversation

@sangonzal
Copy link
Copy Markdown
Contributor

@sangonzal sangonzal commented Oct 30, 2019

  • Add ClientAssertion API to ClientCredentialFactory
  • Update ClientCredentialFactory.create() to ClientCredentialFactory.createFromSecret(), ClientCredentialFactory.createFromCertificate(), ClientCredentialFactory.createFromClientAssertion()
  • Make AsymmetricKeyCredential, ClientSecret, ClientAssertion constructors package private, forcing object creation through ClientCredentialFactory

@Test
private void acquireTokenSilent_usingCommonAuthority_returnCachedAt() throws Exception {
acquireTokenSilent_returnCachedTokens(TestConstants.ORGANIZATIONS_AUTHORITY);
@Test(expectedExceptions = ExecutionException.class)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will be updated to MsalException once we start unwrapping exceptions


Assert.assertNotNull(result);
Assert.assertNotNull(result.accessToken());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an acquireTokenSilent test, so moved to AcquireTokenSilentIT.java

@sangonzal sangonzal requested a review from henrik-me October 30, 2019 18:27
@henrik-me
Copy link
Copy Markdown
Contributor

I'm assuming that a number of samples will also have to be updates as a consequence of this?

Copy link
Copy Markdown
Contributor

@henrik-me henrik-me left a comment

Choose a reason for hiding this comment

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

:shipit:

@sangonzal sangonzal merged commit b93bf63 into dev Oct 31, 2019
@sangonzal sangonzal deleted the sagonzal/addClientAssertion branch November 22, 2019 23:54
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.

2 participants