You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add Orgs support to token cache
* WIP
* WIP
* Rebase + tests
* Remove .NET 8 restriction
* Update docs
* Test fix
* nit
* Add tests for org config
* Guard against scope nesting
* More doc fixes
* Include the org in the cache key.
* Doc tweaks
---------
Co-authored-by: JT <Hawxy@users.noreply.github.com>
If you're simply using the `AuthenticationApiClient` and nothing else, you can call `AddAuth0AuthenticationClientCore` and pass in your Auth0 Domain. This integration is lightweight and does not support any other features of this library.
37
+
If you're simply using the `AuthenticationApiClient` and nothing else, you can call `AddAuth0AuthenticationClient` and pass in your Auth0 Domain. This integration is lightweight and does not support any other features of this library.
Add the `ManagementApiClient` with `AddAuth0ManagementClient()` and add the `DelegatingHandler` with `AddManagementAccessToken()` that will attach the Access Token automatically:
73
+
Add the `ManagementApiClient` with `AddAuth0ManagementClient()`. The client will attach the Access Token automatically:
Ensure your Machine-to-Machine application is authorized to request tokens from the Managment API and it has the correct scopes for the features you wish to use.
80
80
81
81
You can then request the `IManagementApiClient` (or `IAuthenticationApiClient`) within your services:
@@ -93,23 +92,23 @@ public class MyAuth0Service : IAuth0Service
93
92
```
94
93
95
94
96
-
#### Handling Custom Domains
95
+
#### Handling Custom Domains
97
96
98
-
Ifyou're using a custom domain with your Auth0 tenant, you may run into a problem whereby the `audience` of the Management API is being incorrectly set. You can override this via the `Audience` property:
97
+
Ifyou're using a custom domain with your Auth0 tenant, and it'sbeingspecifiedwhencalling `AddAuth0AuthenticationClient`, youwillrunintoaproblemwherebythe `audience` oftheManagementAPIisbeingincorrectlyset. Youcanoverridethisviathe `Audience` property:
99
98
100
99
```cs
101
-
services.AddAuth0ManagementClient()
102
-
.AddManagementAccessToken(c=>
100
+
services.AddAuth0ManagementClient(c=>
103
101
{
102
+
// Set the audience to your default Auth0 domain.
104
103
c.Audience="my-tenant.au.auth0.com";
105
104
});
106
105
```
107
106
108
-
### With HttpClient and/or Grpc Services (Machine-To-Machine tokens)
Thislibraryincludessupportfor [Machine-to-Machine (M2M) AccessforOrganizations](https://auth0.com/docs/manage-users/organizations/organizations-for-m2m-applications), including static and dynamic scenarios.
Anin-memory-onlyinstanceof [FusionCache](https://github.com/ZiggyCreatures/FusionCache) is used as the caching implementation. This instance is _named_ and will not impact other usages of FusionCache.
251
+
Anin-memory-onlyinstanceof [FusionCache](https://github.com/ZiggyCreatures/FusionCache) is used as the caching implementation. This instance is _named_ and will not impact other usages of FusionCache.
// Adds the AuthenticationApiClient client and provides configuration to be consumed by the management client, token cache, and IHttpClientBuilder integrations
0 commit comments