Closed petrsvihlik closed 2 years ago
FYI - I've responded to the APIView comment in Java, but I need to understand why you don't have fluent setters here instead. Reply via APIView or message me on Teams so we can sync on this.
Arch Board review scheduled for 1/6/22 2-4pm PST
As per the agreement during the review meeting, we implemented a "fractional" backoff mechanism and removed the RefreshIntervalBeforeTokenExpiry
property from the options bag. So we got rid of the public API changes caused by the new property.
The behavior is now the following:
The implementation resides in the following PRs:
We still need a couple of approvals however:
Mono<>
- https://apiview.dev/Assemblies/Review/bf47421b3c324ea8b4851fbcae70123f?diffOnly=True&diffRevisionId=c36c850d9b774dc095361a6925e4fc4a @srnagar @JonathanGiles could you please handle this one?refresh_proactively
and token_refresher
. This change is present for all modalities and is caused by adding the autorefresh logic (it was missing in the python SDK).obsolete -> closing
Contacts and Timeline
About the Service
Note: The changes we are introducing are not related related to any specific service. They reside in the common library (a shared lib used by all ACS modalities). The behavior we are modifying is called "proactive token autorefresh" and it's documented here: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-common#create-a-credential-with-proactive-refreshing
About the client library
Artifacts
.NET
Java
Python
__init__
method, please ignore all the other API changes - they will be mitigated once the PR 1) gets mergedTypeScript
The change
Champion Scenario
The change we're introducing relates to the credential proactive autorefresh logic where, originally, this functionality was being triggered 10 minutes before the expiry of a given token. We are making this time interval configurable as it turned out, the hardcoded value might not be sufficient for all scenarios. To be more specific, here’s a scenario that one of the private preview customers ran into when using autorefresh in combination with the Custom Teams Endpoint:
The developer:
tokenRefresher
callback function/method to get AAD tokens via MSAL and exchange them for Communication Identity tokensDuring the app's runtime:
We want to provide the developer with an option to align the refresh interval with MSAL’s cache times. We're also changing the default refresh interval to 4.5 minutes before token expiry. MSAL's offset is 5 minutes in all languages (JS, .NET, Java, Python) so this value accounts for possible clock skew and to avoid any unnecessary calls.
Considerations:
The time offset values in MSAL and ACS SDKs
acquireTokenSilent
withforceRefresh==true
acquireToken*
methodsforceRefresh
.Default values
Exponential retry
Documentation update
cc @jorgegarchirota