delphimvcframework
delphimvcframework copied to clipboard
[feature_filters] Update TMVCSwaggerMiddleware to be a protocol filter
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.
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 ?
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 could you convert it? I was wondering if a filter in charge to do some king of authentication could implement a
IAuthAuthFiltertoo.
Yes, I will do the conversion.