Clerk.Net
0.1.0
See the version list below for details.
dotnet add package Clerk.Net --version 0.1.0
NuGet\Install-Package Clerk.Net -Version 0.1.0
<PackageReference Include="Clerk.Net" Version="0.1.0" />
paket add Clerk.Net --version 0.1.0
#r "nuget: Clerk.Net, 0.1.0"
// Install Clerk.Net as a Cake Addin #addin nuget:?package=Clerk.Net&version=0.1.0 // Install Clerk.Net as a Cake Tool #tool nuget:?package=Clerk.Net&version=0.1.0
Clerk API Client for .NET
Note: This project is currently in alpha. Breaking changes may occur before release.
Packages
Clerk.Net
: Provides the standalone API Client as a Kiota-generated wrapper over Clerk's OpenAPI spec.
Clerk.Net.DependencyInjection
: Dependency Injection extensions to register the ClerkApiClient
into your container.
Getting Started
Make sure to add your SecretKey
to your application configuration, ideally via the dotnet secrets manager.
DI Container Configuration (ASP.NET Core & Worker Services)
- Install
Clerk.Net.DependencyInjection
from Nuget. - Add the following code to your service configuration:
builder.Services.AddClerkApiClient(config =>
{
config.SecretKey = builder.Configuration["Clerk:SecretKey"]!
});
- Request the
ClerkApiClient
in your services
public class MyBackgroundWorker : BackgroundService
{
private readonly ClerkApiClient _clerkApiClient;
public MyBackgroundWorker(ClerkApiClient clerkApiClient)
{
_clerkApiClient = clerkApiClient;
}
protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
// Do work with the client
}
}
Standalone Client
If you want to use the client by itself, install Clerk.Net
and call ClerkApiClientFactory.Create
, passing in your secret key.
The returned client should be treated as a singleton and created once for the lifetime of your application.
Testing
(To be written)
Disclaimer
I am not affiliated with nor represent Clerk. All support queries regarding the underlying service should go to Clerk Support.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Kiota.Abstractions (>= 1.5.0)
- Microsoft.Kiota.Http.HttpClientLibrary (>= 1.2.0)
- Microsoft.Kiota.Serialization.Form (>= 1.1.0)
- Microsoft.Kiota.Serialization.Json (>= 1.1.1)
- Microsoft.Kiota.Serialization.Multipart (>= 1.1.0)
- Microsoft.Kiota.Serialization.Text (>= 1.1.0)
-
net8.0
- Microsoft.Kiota.Abstractions (>= 1.5.0)
- Microsoft.Kiota.Http.HttpClientLibrary (>= 1.2.0)
- Microsoft.Kiota.Serialization.Form (>= 1.1.0)
- Microsoft.Kiota.Serialization.Json (>= 1.1.1)
- Microsoft.Kiota.Serialization.Multipart (>= 1.1.0)
- Microsoft.Kiota.Serialization.Text (>= 1.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Clerk.Net:
Package | Downloads |
---|---|
Clerk.Net.DependencyInjection
Clerk Backend API Wrapper for .NET. This package includes dependency injection extensions. |
GitHub repositories
This package is not used by any popular GitHub repositories.