This is my request :
public class GenerateTokenRequest
{
[AliasAs("code")]
public string Code { get; set; } = string.Empty;
[AliasAs("secret")]
public string Secret { get; set; } = string.Empty;
}
This is my Refit Interface :
public interface IAuthServiceRefitApi
{
[Post("/token")]
Task<GenerateTokenResponse> GenerateTokenAsync(
[Query] GenerateTokenRequest command,
CancellationToken cancellationToken = default);
}
This method gets called and then it creates a URL like this :
https://some-url.com/oauth/token?code=SOME_CODE&secret=SOME_SECRET
I want to mask secret values and code with *** in my logs.
For properties that are part of the body, I have used the PiiString concept and then added a custom delegating handler.
But for properties that become part of the URL as query params, I am unable to do it.
Any suggestions on how I should achieve that?