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

Issue with adding Request Cancelation Token to Introspection Request #177

Open
bmendonca21 opened this issue Apr 29, 2023 · 3 comments
Open
Assignees

Comments

@bmendonca21
Copy link

With the lazy introspection call being shared by potentially multiple client requests, adding the request cancellation token to the introspection request is problematic. In effect, if the request that wins the contest to add its introspection call gets canceled by the client, subsequent requests that are reusing that call will have their introspection call get canceled as well which is not a desired behavior. Please consider removing the request cancellation token on the introspection request or stop sharing introspection requests across multiple client requests.

@gao-artur
Copy link

I believe you are talking about this change #173.
If so, that may explain all the TaskCanceledException's we observe after upgrading from 6.0.0 to 6.2.0. The part that made me crazy was that HttpContext.RequestAborted.IsCancellationRequested is false most of the time. With your explanation, all that makes sense now.

gao-artur added a commit to gao-artur/IdentityModel.AspNetCore.OAuth2Introspection that referenced this issue Jul 13, 2023
@leastprivilege
Copy link
Contributor

Hi,

thanks. We will look into it.

@rasmus-s
Copy link

We had also seen this issue (where we got (A task was canceled-exceptions) and the HttpContext.RequestAborted.IsCancellationRequested was false).

We include the IdentityModel.AspNetCore.OAuth2Introspection project as source code from tag: 6.2.0 into our solution and only changes we made was to bump the IdentityModel-nuget package from 6.0.0 -> 6.1.0.

Then it all worked as it should and we stop getting the a task was canceled-exceptions from introspection request.
Hope it helps others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants