CivicSIP.NET 1.0.2

.NET Framework 4.7
There is a newer version of this package available.
See the version list below for details.
dotnet add package CivicSIP.NET --version 1.0.2
NuGet\Install-Package CivicSIP.NET -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CivicSIP.NET" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CivicSIP.NET --version 1.0.2
#r "nuget: CivicSIP.NET, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CivicSIP.NET as a Cake Addin
#addin nuget:?package=CivicSIP.NET&version=1.0.2

// Install CivicSIP.NET as a Cake Tool
#tool nuget:?package=CivicSIP.NET&version=1.0.2


.NET implementation for the Civic hosted SIP API.

See for a more details.

Public interface

For public use the code exposes one class CivicSip with only one method ExchangeToken. This method takes a jwt token in string representation as an input parameter and returns a user data structure as an output which describes the user details. For operation CivicSip class needs configuration which is passed to the class constructor.


All required configuration resides in CivicConfig class. This class keeps user-specific configuration as well as common unchangable constants. User-specific details include following:

  • ApplicationId
  • ApplicationSecret
  • ClientSigning credentials
  • Encryption credentials (currently unused)

Common constants include:

  • Base URL
  • Authentication path
  • Environment (always equal to prod)
  • ServerSigning credentials (needed to validate the provided data from the server)

Currently, to create an instance of configuration class it only necessary to povide only three parameters as shown below.

CivicConfig config = new CivicConfig(
                        applicationId: "8uh0jHpDA",
                        applicationSecret: "c395719a...",
                        privateSigningKey: "b86451c3bbeaad4141..."

User data model

User data is provided in the form of records collection where each record specifies following properties:

  • Label - user data property label (e.g. email, phone, ...)
  • Value - user data value itself corresponding to the Label
  • IsValid - boolean property
  • IsOwner - boolean property


  • Register your application on Civic Partner Portal.
  • In your code init CivicConfig object with your Application ID, Application Secret, Private Signing Key.
  • Create new instance of CivicSip object with provided configuration.
  • Exchange JWT token for user data:
CivicSip sip = new CivicSip(config);
UserData data = await sip.ExchangeToken(token);

Operation details

The library uses the provided jwtToken to exchange it for real user data.

An Http request to Civic server is done to make the token exchange. This Http request contains a JSON content with the requested jwtToken, and specifies an authentication header which follows Civic authentication scheme. Authentication header contains a new jwt token with client signature, and Civic extention which signs the http request body.

In the response Civic server returns its own new jwt token with encrypted user data. The library validates the token, decrypts the data and parses into UserData model.

The approach uses ECDSA elliptic curve cryptography for signing JWT tokens, HMACSHA256 for Civic extension in authentication header, and AES for user data encryption.

Product Compatible and additional computed target framework versions.
.NET Framework net47 is compatible.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 635 6/11/2019
1.0.5 711 12/14/2018
1.0.4 682 11/8/2018
1.0.3 687 10/18/2018
1.0.2 692 9/27/2018