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

Enable MSAL settings to save access token in cache #6706

Merged
merged 4 commits into from
Nov 22, 2023

Conversation

JhontSouth
Copy link
Collaborator

#minor

Description

This PR adds the necessary MSAL settings to manage the cached access token value and not request a new value on each request.

Specific Changes

  • Added SetCacheOptions to the AppTokenCache of the ClientApplication in MsalAppCredentials class.

Testing

The following images show the interaction with the bot and the token values in every message.
image
image

@JhontSouth JhontSouth requested a review from a team as a code owner November 21, 2023 13:38
@JhontSouth JhontSouth added the Automation: No parity PR does not need to be applied to other languages. label Nov 21, 2023
@tracyboehrer
Copy link
Member

@JhontSouth Appears to be failing in the Connector unit tests.

@tracyboehrer tracyboehrer added Automation: Parity with js The PR needs to be ported to JS and removed Automation: No parity PR does not need to be applied to other languages. labels Nov 21, 2023
@tracyboehrer
Copy link
Member

@JhontSouth We should check this in Node JS SDK too.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 378018

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 45 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.007%) to 78.443%

Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/LRUCache.cs 4 87.18%
/libraries/Microsoft.Bot.Connector/Authentication/MsalAppCredentials.cs 41 13.04%
Totals Coverage Status
Change from base Build 378011: -0.007%
Covered Lines: 26130
Relevant Lines: 33311

💛 - Coveralls

@BruceHaley
Copy link
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Connector.dll

@tracyboehrer tracyboehrer merged commit 979413c into main Nov 22, 2023
13 of 14 checks passed
@tracyboehrer tracyboehrer deleted the southworks/fix/access-token-in-cache branch November 22, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation: Parity with js The PR needs to be ported to JS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants