Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

AuthenticationMiddleware and dependency injection #1134

Closed
kampilan opened this issue Mar 4, 2017 · 4 comments
Closed

AuthenticationMiddleware and dependency injection #1134

kampilan opened this issue Mar 4, 2017 · 4 comments

Comments

@kampilan
Copy link

kampilan commented Mar 4, 2017

Why does AuthenticationMiddleware take it's dependencies on the constructor and not on Invoke? Very hard to build handler with dependencies. Why would TearDownAsync be internal!?!? This prevents me from writing my own AuthentionMiddleware and using proper DI pattern for Middleware.

@HaoK
Copy link
Member

HaoK commented Mar 4, 2017

Yeah we are aware of the issues with the current design, we working on addressing these in the next version, you should be able implement a handler with normal dependencies on the new stack, see #1113

@Eilon
Copy link
Member

Eilon commented Mar 16, 2017

Closing because this is a key part of the Great Auth Redesign of 2017.

@Eilon Eilon closed this as completed Mar 16, 2017
@epot
Copy link

epot commented Jul 31, 2017

Is there a way to inject IOptions that is parsing the application settings into an AuthenticationHandler (instanciated by an AuthenticationMiddleware) in asp.net core 1.x? Or at least a workaround?

@HaoK
Copy link
Member

HaoK commented Jul 31, 2017

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

No branches or pull requests

4 participants