Skip to content
This repository was archived by the owner on Apr 27, 2023. It is now read-only.
This repository was archived by the owner on Apr 27, 2023. It is now read-only.

Why a MiddleWare and not a Controller? #23

@cwienands1

Description

@cwienands1

I am currently integrating your token provider into my own SPA application. I really like it because it is small enough for me to understand and integrate, unlike all those humongous packages like IdentityServer4 ;-) But I am wondering why you chose to implement the TokenProviderMiddleware class as a middleware and not as a controller? After all, all it does is wait for a POST on e.g. /api/token. That task could easily be accomplished with a controller, and the ASPNetCore pipeline would save one Invoke with each request. I'm still new to ASPNetCore so there might be an obvious reason but I didn't see that. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions