I have created a method that implements IOperationProcessor looking for to hide operations depending of the permissions of a user.
In my implementation with Nswag , the IOperationProcessor method is been only called at compilation time, when i refresh the swagger page ../swagger/index.html the code does not pass in this method. I would like to know if there is a configuration to get the IOperationProcessor method to be called in every new request to the swagger page.
To be more precise I am trying to implement the solution described in this comment:
The way I have done this -> I have one Login View (requires password and email) and after successful login, you are given a token. In one of the claims of the token I have information what Controllers (or if you want to go further actions) can the current user see. After the login the user is redirected to Swagger page and the token is sent as a cookie. So in my HideSwaggerEndpointsDocumentFilter I have access to the token and which controllers the user can and can't see. If someone goes directly to Swagger, he has no cookie, so no controllers are shown. (ASP.NET Web API - Swagger , create multiple views)
Probably that solution was implemented with swashbuckle.