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

Feature Request: HttpContext #39

Closed
OpenSpacesAndPlaces opened this issue Jan 21, 2019 · 2 comments
Closed

Feature Request: HttpContext #39

OpenSpacesAndPlaces opened this issue Jan 21, 2019 · 2 comments

Comments

@OpenSpacesAndPlaces
Copy link

I'm working in .Net Framework without Identity.

I'm calling "HttpContext.Current" from my "IAuthorizationRequirement" class, which works, but is a bad practice/pattern to follow.

The request would be to include in HttpContext "(AuthorizationContext context)" passed down through from the originally Web API context.

@OpenSpacesAndPlaces
Copy link
Author

As a follow-up - I ended up used "_.UserContext" to pass "HttpContext".

@joemcbride
Copy link
Member

That would be the suggested way to solve it. This solution is transport independent, so it won't ever have a direct reference to HttpContext.

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

No branches or pull requests

2 participants