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_filters] Update TMVCSwaggerMiddleware to be a protocol filter #672

Open
danieleteti opened this issue Jul 16, 2023 · 3 comments
Open
Assignees
Labels
accepted Issue has been accepted and inserted in a future milestone open Some team member is working on this
Milestone

Comments

@danieleteti
Copy link
Owner

danieleteti commented Jul 16, 2023

In 4.0.0-oxygen middlewares will be splittend in "protocol" and "controller" filters (read this for more info)
TMVCSwaggerMiddleware must be converted in a Protocol Filter.

@joaoduarte19 could you convert it? I was wondering if a filter in charge to do some king of authentication could implement a IAuthAuthFilter too.

@danieleteti danieleteti added accepted Issue has been accepted and inserted in a future milestone open Some team member is working on this labels Jul 16, 2023
@danieleteti danieleteti added this to the 4.0.0-oxygen milestone Jul 16, 2023
@fastbike
Copy link
Contributor

What is the thinking behind the change from middleware to filters - as this looks to be quite a breaking change. For instance I have an OIDC filter that handles authentication (by checking the bearer token) and also authorisation (by looking at custom attributes on the controller class and actions.)
Would I be required to split the functions ?

@danieleteti
Copy link
Owner Author

danieleteti commented Jul 16, 2023

It is really important for code symmetricity. Let's say we have 3 Middleware and the 3rd raise an exception in the OnBeforeRouting, by design should be executed only the OnAfterRouting of the first two. It's quite complex to handle and is not robust as the filters approach. There is no functionality loss. It's a breaking change easily manageable from the user POV. If you have custom Middleware and you need help to migrate it to the new architecture write me an email and we can arrange a call.

@joaoduarte19
Copy link
Collaborator

@joaoduarte19 could you convert it? I was wondering if a filter in charge to do some king of authentication could implement a IAuthAuthFilter too.

Yes, I will do the conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Issue has been accepted and inserted in a future milestone open Some team member is working on this
Projects
None yet
Development

No branches or pull requests

3 participants