microsoft-authentication-library-for-java icon indicating copy to clipboard operation
microsoft-authentication-library-for-java copied to clipboard

[Feature Request] Properly asynchronous client assertions

Open q-benwillis opened this issue 1 year ago • 0 comments

MSAL client type

Confidential

Problem Statement

We use a client assertion as our client credential when building our confidential client application. This assertion comes from a file stored locally and gets refreshed every hour. At the moment the credential can only be created before the confidential client application is created, even when using the createFromCallback method meaning we need to create a whole new confidential client application everytime the token is refreshed.

Proposed solution

Ideally we would like to build one confidential client application that refreshes this client credential on every acquire token request.

I can see that we can create a client credential from a callback using createFromCallback but this still gets executed when the confidential client is created. Ideally this callback should be executed when the acquireToken method is called.

Alternatives

At the moment we need to either create a new confidential client for every request or somehow build a new confidential client every time the token is updated.

q-benwillis avatar Nov 21 '24 12:11 q-benwillis