Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

[#6563] Expired JWT token exception not being handled#6572

Merged
tracyboehrer merged 2 commits into
mainfrom
southworks/test/SecurityTokenExpiredException
Jan 17, 2023
Merged

[#6563] Expired JWT token exception not being handled#6572
tracyboehrer merged 2 commits into
mainfrom
southworks/test/SecurityTokenExpiredException

Conversation

@erquirogasw
Copy link
Copy Markdown
Contributor

Fixes #6563

Description

This PR catches the SecurityTokenExpiredException when a JWT token is expired.

Specific Changes

  • Added catch block on the ValidateTokenAsync method of the JwtTokenExtractor class.
  • Added unit test for the JwtTokenExtractor class.
  • Added unit test for the CloudAdapter class.

Testing

These images show the new unit tests passing.
image

@erquirogasw erquirogasw requested a review from a team as a code owner December 15, 2022 19:38
@ceciliaavila ceciliaavila added the Automation: Parity with js The PR needs to be ported to JS label Dec 15, 2022
@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 333699

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.07%) to 79.128%

Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/BuiltinFunctions/GetNextViableTime.cs 1 90.91%
/libraries/AdaptiveExpressions/BuiltinFunctions/GetPreviousViableTime.cs 1 90.91%
/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/ServiceCollectionExtensions.cs 1 93.55%
/libraries/Microsoft.Bot.Connector/Authentication/JwtTokenExtractor.cs 4 54.81%
Totals Coverage Status
Change from base Build 332211: 0.07%
Covered Lines: 25742
Relevant Lines: 32532

💛 - Coveralls

@BruceHaley
Copy link
Copy Markdown
Contributor

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

@tracyboehrer tracyboehrer merged commit 397aa48 into main Jan 17, 2023
@tracyboehrer tracyboehrer deleted the southworks/test/SecurityTokenExpiredException branch January 17, 2023 16:13
tracyboehrer pushed a commit that referenced this pull request Jan 17, 2023
* Add UnauthorizedAccessException when the SecurityTokenExpiredException is thrown

* Add CloudAdapter test

Co-authored-by: sw-joelmut <joel.mut@southworks.com>
tracyboehrer added a commit that referenced this pull request Jan 17, 2023
* Fix cast issue in SendHandoffActivity action. (#6575)

* [#6563] Expired JWT token exception not being handled (#6572)

* Add UnauthorizedAccessException when the SecurityTokenExpiredException is thrown

* Add CloudAdapter test

Co-authored-by: sw-joelmut <joel.mut@southworks.com>

Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com>
Co-authored-by: erquirogasw <64815358+erquirogasw@users.noreply.github.com>
Co-authored-by: sw-joelmut <joel.mut@southworks.com>
This was referenced May 14, 2026
This was referenced May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

Expired JWT token exception not being handled

6 participants