@@ -11,11 +11,6 @@ The package currently supports the following authentication methods:
1111- OAuth2
1212 - Client credentials
1313
14- > Please note: The .NET Standard 2.0 and .NET 6 targeted packages references the LTS version 6 of the dependent
15- NuGet packages. The reason for this is that while it is possible to run .NET 7 NuGet packages on .NET 6, it is known that some
16- of them may introduce unexpected behavior. It is recommended (especially from the ASP.NET Core team) limit usage of .NET 7
17- based NuGet packages on .NET 6 runtime.
18-
1914## USAGE
2015
2116Add the NuGet package ` KISS.HttpClientAuthentication ` to your project and whenever a
@@ -75,16 +70,25 @@ Authentication using OAuth2.
7570
7671##### Client credentials
7772
78- Using OAuth2 client credentials, all settings except ` DisableTokenCache ` and ` Scope ` is required.
73+ Using OAuth2 client credentials, all settings except ` DisableTokenCache ` , ` Scope ` and
74+ ` TokenEndpoint ` 's ` Additional*Parameters ` is required.
7975
8076```
8177"<section name>": {
8278 "AuthenticationProvider": "OAuth2",
8379 "OAuth2": {
84- "AuthorizationEndpoint": "<OAuth2 token endpoint>",
8580 "DisableTokenCache": false,
8681 "GrantType": "ClientCredentials",
8782 "Scope": "<Optional scopes separated by space>",
83+ "TokenEndpoint": {
84+ "Url": "<OAuth2 token endpoint>",
85+ "AdditionalHeaderParameters": {
86+ },
87+ "AdditionalBodyParameters": {
88+ },
89+ "AdditionalQueryParameters": {
90+ }
91+ },
8892 "ClientCredentials": {
8993 "ClientId": "<Unique client id>",
9094 "ClientSecret": "<Secret connected to the client id>"
@@ -93,6 +97,9 @@ Using OAuth2 client credentials, all settings except `DisableTokenCache` and `Sc
9397}
9498```
9599
100+ The ` Additional*Parameters ` configuration is dynamic, any configuration in these will
101+ be added to their respective parts of the request accordingly. Please note that the
102+ ` AdditionalQueryParameters ` will be url encoded.
96103
97104### Examples
98105
0 commit comments