KeyInteractive.Common
2.1.0
dotnet add package KeyInteractive.Common --version 2.1.0
NuGet\Install-Package KeyInteractive.Common -Version 2.1.0
<PackageReference Include="KeyInteractive.Common" Version="2.1.0" />
<PackageVersion Include="KeyInteractive.Common" Version="2.1.0" />
<PackageReference Include="KeyInteractive.Common" />
paket add KeyInteractive.Common --version 2.1.0
#r "nuget: KeyInteractive.Common, 2.1.0"
#:package KeyInteractive.Common@2.1.0
#addin nuget:?package=KeyInteractive.Common&version=2.1.0
#tool nuget:?package=KeyInteractive.Common&version=2.1.0
Key Interactive.Common
KeyInteractive.Common is a small, generic, framework-agnostic package of helpers shared across
Key Interactive projects. It has no dependencies on ASP.NET, HTTP, or any particular API — it's the
base of the KeyInteractive.Common.* package chain:
- KeyInteractive.Common (this package) — generic helpers, no API-related concerns.
KeyInteractive.Common.Api— generic plumbing to consume Key Interactive-style APIs (response envelope, retry, JWT handling).KeyInteractive.Common.Api.Users— the official client for the Key Interactive Users API ("Key Interactive Accounts").
What's in it today
State(KeyInteractive.Common.Classes) — a country, with its display name, ISO-3166-1 alpha-2 code, and international dialing prefix.State.StatesList()returns the full, hardcoded list of countries.EState(KeyInteractive.Common.Enums) — the same list of countries as an enum, one member per ISO-3166-1 alpha-2 code, with the English display name attached via[Description].
Note:
StateandEStatedeliberately duplicate the same country data in two different shapes (a class list vs. an enum) — this mirrors how the data was already used across Key Interactive sites before this package existed, and is kept as-is rather than silently merged into one shape.
This package is expected to grow over time as more generic, non-API-specific helpers are identified across projects.
Requirements
Targets .NET 8.0 or later (net8.0, net10.0).
Installation
dotnet add package KeyInteractive.Common
Usage
using KeyInteractive.Common.Classes;
using KeyInteractive.Common.Enums;
// As a flat list of objects:
foreach (var state in State.StatesList())
{
Console.WriteLine($"{state.Name} ({state.Code}) {state.PhonePrefix}");
}
// As an enum, with the display name from [Description]:
var country = EState.IT;
var name = typeof(EState)
.GetMember(country.ToString())[0]
.GetCustomAttributes(typeof(DescriptionAttribute), false)
.Cast<DescriptionAttribute>()
.First()
.Description; // "Italy"
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on KeyInteractive.Common:
| Package | Downloads |
|---|---|
|
KeyInteractive.Common.Api
Generic plumbing to consume Key Interactive-style APIs: response envelope (KiApiResponse), JWT + refresh token handling, retry policy, and an abstract KiApiConsumerBase to build per-API clients from. |
GitHub repositories
This package is not used by any popular GitHub repositories.