Skip to content

Pesomka/client cred silent#68

Merged
SomkaPe merged 8 commits intodevfrom
pesomka/clientCredSilent
Jun 25, 2019
Merged

Pesomka/client cred silent#68
SomkaPe merged 8 commits intodevfrom
pesomka/clientCredSilent

Conversation

@SomkaPe
Copy link
Copy Markdown
Contributor

@SomkaPe SomkaPe commented Jun 22, 2019

  • silent flow for client credential grant
  • use tenant id from request authority if id token not returned
  • use AutoCloseable for cache Aspect application

@SomkaPe SomkaPe requested review from henrik-me and sangonzal June 22, 2019 02:23
.get();

Assert.assertNotNull(result);
Assert.assertNotNull(result.accessToken());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might also be worth writing a test that has multiple tokens in cache for same clientId and tenant but different scopes and check that the right token is returned.

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.

good point - extended to few scopes and found serious bug

TokenRequest(Authority requestAuthority, MsalRequest msalRequest, ServiceBundle serviceBundle)
throws MalformedURLException {
this.requestAuthority = requestAuthority;
this.tokenEndpointUrl = new URL(requestAuthority.tokenEndpoint());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you need both here, Perhaps authority.tokenEndpointUrl could do this instead?

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.

good point, changed

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:

@SomkaPe SomkaPe merged commit 96df50e into dev Jun 25, 2019
@sangonzal sangonzal deleted the pesomka/clientCredSilent branch January 10, 2020 20:02
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