@@ -140,6 +140,8 @@ services.AddHttpClient<MyHttpService>(x=> x.BaseAddress = new Uri("https://MySer
140140 .AddAccessToken (config => config .AudienceResolver = request => request .RequestUri .GetLeftPart (UriPartial .Authority ));
141141```
142142
143+ ## Additional Functionality
144+
143145### Enhanced Resilience
144146
145147The default rate - limit behaviour in Auth0 .NET is suboptimal , as it uses random backoff rather than reading the rate limit headers returned by Auth0 .
@@ -156,6 +158,25 @@ When a retry occurs, you should see a warning log similar to:
156158
157159`Resilience event occurred . EventName : '"OnRetry"' , Source : '"IManagementConnection-RateLimitRetry"/""/"Retry"' , Operation Key : 'null' , Result : '429' `
158160
161+ ### Utility
162+
163+ This library exposes a simple string extension , `ToHttpsUrl ()`, that can be used to format the naked Auth0 domain sitting in your configuration into a proper URL .
164+
165+ This is identical to `https : // {Configuration["Auth0:Domain"]}/` that you usually end up writing _somewhere_ in your `Startup.cs`.
166+
167+ For example , formatting the domain for the JWT Authority :
168+
169+ ```csharp
170+ .AddJwtBearer (options =>
171+ {
172+ // "my-tenant.auth0.com" -> "https://my-tenant.auth0.com/"
173+ options .Authority = builder .Configuration [" Auth0:Domain" ].ToHttpsUrl ();
174+ // ...
175+ });
176+ ```
177+
178+ ## Internals
179+
159180### Client Lifetimes
160181
161182Both the authentication and authorization clients are registered as singletons and are suitable for injection into any other lifetime .
@@ -174,23 +195,6 @@ In some situations you might want to request an access token from Auth0 manually
174195
175196An in -memory -only instance of [FusionCache ](https :// github.com/ZiggyCreatures/FusionCache) is used as the caching implementation. This instance is _named_ and will not impact other usages of FusionCache.
176197
177- ### Utility
178-
179- This library exposes a simple string extension , `ToHttpsUrl ()`, that can be used to format the naked Auth0 domain sitting in your configuration into a proper URL .
180-
181- This is identical to `https : // {Configuration["Auth0:Domain"]}/` that you usually end up writing _somewhere_ in your `Startup.cs`.
182-
183- For example , formatting the domain for the JWT Authority :
184-
185- ```csharp
186- .AddJwtBearer (options =>
187- {
188- // "my-tenant.auth0.com" -> "https://my-tenant.auth0.com/"
189- options .Authority = builder .Configuration [" Auth0:Domain" ].ToHttpsUrl ();
190- // ...
191- });
192- ```
193-
194198## Disclaimer
195199
196200I am not affiliated with nor represent Auth0 . All implementation issues regarding the underlying `ManagementApiClient ` and `AuthenticationApiClient ` should go to the official [Auth0 .NET Respository ](https :// github.com/auth0/auth0.net).
0 commit comments