You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.9 KiB
2.9 KiB
LINGYUN.Abp.OpenIddict.Dapr.Client
Introduction
LINGYUN.Abp.OpenIddict.Dapr.Client is a Dapr-based OpenIddict client module that provides functionality to call OpenIddict remote services using the Dapr service invocation building block.
Features
-
Dapr Service Invocation Integration
- Automatic registration of Dapr client proxies for OpenIddict application contracts
- Support accessing OpenIddict remote services via Dapr service invocation
- Support service-to-service communication in distributed systems
-
Remote Service Support
- Support all services defined in OpenIddict application contracts
- Support application management
- Support authorization management
- Support scope management
- Support token management
Installation
dotnet add package LINGYUN.Abp.OpenIddict.Dapr.Client
Usage
-
Add
[DependsOn(typeof(AbpOpenIddictDaprClientModule))]to your module class. -
Configure Dapr service invocation:
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpDaprClientOptions>(options =>
{
options.ApplicationServices.Configure(config =>
{
// Configure the AppId for OpenIddict service
config.AppId = "openiddict-service";
});
});
}
- Usage example:
public class MyService
{
private readonly IOpenIddictApplicationAppService _applicationAppService;
public MyService(IOpenIddictApplicationAppService applicationAppService)
{
_applicationAppService = applicationAppService;
}
public async Task DoSomethingAsync()
{
// Access OpenIddict application service via Dapr service invocation
var applications = await _applicationAppService.GetListAsync(
new GetApplicationsInput());
}
}
Configuration
-
AppId
- Application identifier for the OpenIddict service
- Must match the app ID in Dapr component configuration
-
RemoteServiceName
- Name of the OpenIddict remote service
- Default value is "OpenIddict"
Notes
- Ensure Dapr Sidecar is properly configured and running
- Ensure OpenIddict service is registered in Dapr
- Recommended to configure service-to-service authentication in production
- Recommended to configure retry policies for service invocation
- Recommended to configure service discovery mechanism