IdentityModel / IdentityModel.AspNetCore.OAuth2Introspection

ASP.NET Core authentication handler for OAuth 2.0 token introspection
Apache License 2.0
146 stars 67 forks source link

Revert #173 + add unit tests #184

Open gao-artur opened 1 year ago

gao-artur commented 1 year ago

Revert PR #173, which introduced bug #177. I also added 2 unit tests: one to verify the introspection result sharing with concurrent calls. The second reproduces bug #177.

Note the cancellation test will behave differently with IdentityModel v6.1.0 because of this PR. It will still fail on the second request, but because of TaskCancelledException instead of invalid StatusCode.

gao-artur commented 1 year ago

@leastprivilege, @bmendonca21 please review. @renagaev you may be also interested to review as you contributed the #173.