Closed raghumirajkar closed 5 years ago
Yes - this looks like an omission.
You should be able to create a class that derives from OAuth2IntrospectionEvents
and set that type as the EventsType
on the OAuth2IntrospectionOptions
.
Then put this class into DI (transient). In the ctor of your class you can add a dependency on the IHttpContextAccessor - which in turn gives you access to the HttpContext.
Let me know if that works for you.
Hi,
Thank you for the response. We were able to do it the other way; we're using IAuthorizationHandler for some other purpose, which has AuthorizationHandlerContext as a parameter in HandleRequirementAsync. Since this is executed after IdentityModel's event execution, this gives me the HttpContext
Thank you
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue.
Hi, Currently we're using IdentityModel's OAuth introspection middleware v3.5.0 and want to access the IP Address from HttpContext for some logging purposes. In the event properties (failure or success), we don't see access to HttpContext neither is it possible to access it in the Custom Http Handler. Is it possible to access HttpContext in any other way during the introspection flow?