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

Extend proactive token refresh to client_credentials #6102

Merged
merged 35 commits into from
Aug 22, 2023
Merged

Conversation

Robbie-Microsoft
Copy link
Collaborator

@Robbie-Microsoft Robbie-Microsoft commented Jun 7, 2023

MSAL is expected to refresh the token when the refresh_in value expires. This is already implemented for AcquireTokenSilent but is not implemented for client_credentials. This PR implements refresh_in for client_credentials.

I've implemented the long term solution from the refresh spec.

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2023

Codecov Report

Merging #6102 (21ae216) into dev (81d34b4) will decrease coverage by 1.84%.
Report is 267 commits behind head on dev.
The diff coverage is 67.63%.

Flag Coverage Δ
msal-angular 96.73% <92.78%> (+0.22%) ⬆️
msal-browser 85.53% <ø> (-0.94%) ⬇️
msal-common 83.07% <ø> (-1.48%) ⬇️
msal-core ?
msal-node 79.86% <ø> (-3.53%) ⬇️
msal-node-extensions 68.67% <61.03%> (-6.97%) ⬇️
msal-react 94.24% <ø> (-0.45%) ⬇️
node-token-validation ?
Files Changed Coverage Δ
...ions/msal-node-extensions/src/utils/Environment.ts 20.51% <0.00%> (-22.08%) ⬇️
lib/msal-angular/src/msal.interceptor.ts 100.00% <ø> (ø)
lib/msal-angular/src/msal.module.ts 100.00% <ø> (ø)
lib/msal-angular/src/msal.navigation.client.ts 93.33% <ø> (+0.47%) ⬆️
lib/msal-angular/src/msal.redirect.component.ts 100.00% <ø> (ø)
lib/msal-angular/src/msal.service.ts 100.00% <ø> (ø)
lib/msal-angular/src/packageMetadata.ts 100.00% <ø> (ø)
...b/msal-browser/src/app/IPublicClientApplication.ts 42.42% <ø> (-1.33%) ⬇️
...ib/msal-browser/src/app/PublicClientApplication.ts 67.44% <ø> (-27.89%) ⬇️
...er/src/broker/nativeBroker/NativeMessageHandler.ts 86.29% <ø> (+0.33%) ⬆️
... and 73 more

... and 160 files with indirect coverage changes

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.

Not implemented as availability feature.

@github-actions github-actions bot added the msal-common Related to msal-common package label Jun 10, 2023
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.

RefreshOn is optional, not mandatory.

@Robbie-Microsoft Robbie-Microsoft merged commit 908e97f into dev Aug 22, 2023
42 of 43 checks passed
@Robbie-Microsoft Robbie-Microsoft deleted the refresh branch August 22, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-common Related to msal-common package msal-node Related to msal-node package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend proactive token refresh to client_credentials and OBO
8 participants