-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRefitClientCredentialsBuilderOptions.cs
39 lines (34 loc) · 1.61 KB
/
RefitClientCredentialsBuilderOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace Fhi.ClientCredentials.Refit;
/// <summary>
/// Options for customizing the default options used when creating Refit clients
/// </summary>
public class RefitClientCredentialsBuilderOptions
{
/// <summary>
/// Adds the default token handler from Fhi.ClientCredentials, HttpAuthHandler.
/// Set to false if you wish to use a custom token handler.
/// </summary>
public bool UseDefaultTokenHandler { get; set; } = true;
/// <summary>
/// Adds propagation and handling of correlation ids to all Refit-Requests.
/// Remember to add "app.UseCorrelationId()" in your startup code.
/// </summary>
public bool UseCorrelationId { get; set; } = true;
/// <summary>
/// Html-encodes all headers starting with the prefix "fhi-".
/// This is usefull when using headers like "fhi-organization-name", which might contain
/// illegal HTTP header characters.
/// </summary>
public bool HtmlEncodeFhiHeaders { get; set; } = true;
/// <summary>
/// Adds logging to all requests using LoggingDelegationHandler.
/// The handler anonymizes all NIN-like requets paths and removes query strings from the log URL.
/// </summary>
public bool UseAnonymizationLogger { get; set; } = true;
/// <summary>
/// The default implementation of HttpClientFactry sets the complete URI in the logging Scope,
/// which might contain sensitive information that we are not able to remove.
/// We therefore remove the default logger. Set to true if you want to preserve the default logger.
/// </summary>
public bool PreserveDefaultLogger { get; set; } = false;
}