I am developing an API with .net 7. My question is, can we mask the parameters coming to all ends in the API in the middleware?
For example
public async Task<ApiOperationResult<Token>> Login(LoginRequestMobile userLogin)
This is the beginning of a login method. When I debug the starting point and examine the userLogin, I can clearly see the entered inputs. For example
PhoneNumber=”+905555555555″
Password = “Taha123..”
But what I want to see
PhoneNumber=”******”
Password = “******”
Of course, since I will be making a query with these parameters, this should only be visible. They must be automatically decrypted when querying.
In short, even the developer should not be able to see some sensitive information in debug. Sorry if the question is a bit strange, but can we do something like this?
I tried encryption at the middleware layer, but I could not access my API.