Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .changeset/silent-frogs-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"fingerprint-server-dotnet-sdk": major
---

Rename .NET SDK project and namespaces from `FingerprintPro.ServerSdk.*` to `Fingerprint.ServerSdk.*`.

**Breaking changes**

- Update all `using` directives and fully-qualified type names:
- `FingerprintPro.ServerSdk.*``Fingerprint.ServerSdk.*`
- If you reference solution/project file names or CI paths, update them to the new `Fingerprint.ServerSdk.*` locations.
20 changes: 10 additions & 10 deletions .swagger-codegen-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
git_push.sh

**/packages.config
src/FingerprintPro.ServerSdk.Test/**
src/FingerprintPro.ServerSdk/Model/Model.cs
src/FingerprintPro.ServerSdk/Model/ASN.cs
src/FingerprintPro.ServerSdk/Client/ApiClient.cs
src/FingerprintPro.ServerSdk/Client/ApiResponse.cs
src/FingerprintPro.ServerSdk/Client/IApiAccessor.cs
src/FingerprintPro.ServerSdk/Client/ApiException.cs
src/FingerprintPro.ServerSdk/Client/IReadableConfiguration.cs
src/FingerprintPro.ServerSdk/Client/ExceptionFactory.cs
src/FingerprintPro.ServerSdk/Client/SwaggerDateConverter.cs
src/Fingerprint.ServerSdk.Test/**
src/Fingerprint.ServerSdk/Model/Model.cs
src/Fingerprint.ServerSdk/Model/ASN.cs
src/Fingerprint.ServerSdk/Client/ApiClient.cs
src/Fingerprint.ServerSdk/Client/ApiResponse.cs
src/Fingerprint.ServerSdk/Client/IApiAccessor.cs
src/Fingerprint.ServerSdk/Client/ApiException.cs
src/Fingerprint.ServerSdk/Client/IReadableConfiguration.cs
src/Fingerprint.ServerSdk/Client/ExceptionFactory.cs
src/Fingerprint.ServerSdk/Client/SwaggerDateConverter.cs

**/GlobalConfiguration.cs
.gitignore
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fingerprint Server API Dotnet SDK
# Fingerprint Server Dotnet SDK

## 7.9.0

Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0

# Copy the project file and restore dependencies
COPY ["fingerprint-pro-server-api-dotnet-sdk.sln", "./"]
COPY ["fingerprint-server-dotnet-sdk.sln", "./"]
# LICENSE is required for building the package
COPY ["LICENSE", "./"]
COPY ["res", "res/"]
COPY ["src/FingerprintPro.ServerSdk/FingerprintPro.ServerSdk.csproj", "src/FingerprintPro.ServerSdk/"]
COPY ["src/FingerprintPro.ServerSdk.Examples/FingerprintPro.ServerSdk.Examples.csproj", "src/FingerprintPro.ServerSdk.Examples/"]
COPY ["src/FingerprintPro.ServerSdk.FunctionalTest/FingerprintPro.ServerSdk.FunctionalTest.csproj", "src/FingerprintPro.ServerSdk.FunctionalTest/"]
COPY ["src/FingerprintPro.ServerSdk.SealedResultExample/FingerprintPro.ServerSdk.SealedResultExample.csproj", "src/FingerprintPro.ServerSdk.SealedResultExample/"]
COPY ["src/FingerprintPro.ServerSdk.Test/FingerprintPro.ServerSdk.Test.csproj", "src/FingerprintPro.ServerSdk.Test/"]
COPY ["src/FingerprintPro.ServerSdk.WebhookExample/FingerprintPro.ServerSdk.WebhookExample.csproj", "src/FingerprintPro.ServerSdk.WebhookExample/"]
COPY ["src/Fingerprint.ServerSdk/Fingerprint.ServerSdk.csproj", "src/Fingerprint.ServerSdk/"]
COPY ["src/Fingerprint.ServerSdk.Examples/Fingerprint.ServerSdk.Examples.csproj", "src/Fingerprint.ServerSdk.Examples/"]
COPY ["src/Fingerprint.ServerSdk.FunctionalTest/Fingerprint.ServerSdk.FunctionalTest.csproj", "src/Fingerprint.ServerSdk.FunctionalTest/"]
COPY ["src/Fingerprint.ServerSdk.SealedResultExample/Fingerprint.ServerSdk.SealedResultExample.csproj", "src/Fingerprint.ServerSdk.SealedResultExample/"]
COPY ["src/Fingerprint.ServerSdk.Test/Fingerprint.ServerSdk.Test.csproj", "src/Fingerprint.ServerSdk.Test/"]
COPY ["src/Fingerprint.ServerSdk.WebhookExample/Fingerprint.ServerSdk.WebhookExample.csproj", "src/Fingerprint.ServerSdk.WebhookExample/"]
RUN dotnet restore
COPY ["./src", "src/"]
CMD ["dotnet", "list", "package"]
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c

We recommend installing the package from [NuGet](https://docs.nuget.org/consume/installing-nuget):
```shell
dotnet add package FingerprintPro.ServerSdk
dotnet add package Fingerprint.ServerSdk
```

<a name="getting-started"></a>
Expand All @@ -45,8 +45,8 @@ dotnet add package FingerprintPro.ServerSdk
// Example usage of our SDK

// Import namespaces
using FingerprintPro.ServerSdk.Api;
using FingerprintPro.ServerSdk.Client;
using Fingerprint.ServerSdk.Api;
using Fingerprint.ServerSdk.Client;

// Initialize configuration and add your api key
var configuration = new Configuration(Environment.GetEnvironmentVariable("SECRET_API_KEY")!);
Expand Down Expand Up @@ -86,8 +86,8 @@ You can also access the raw HTTP response by using the `WithHttpInfo` methods:
// Example usage of our SDK

// Import namespaces
using FingerprintPro.ServerSdk.Api;
using FingerprintPro.ServerSdk.Client;
using Fingerprint.ServerSdk.Api;
using Fingerprint.ServerSdk.Client;

// Initialize configuration and add your api key
var configuration = new Configuration(Environment.GetEnvironmentVariable("SECRET_API_KEY")!);
Expand All @@ -108,14 +108,14 @@ Console.WriteLine(visits.Response);
Console.WriteLine(visits.Data);
```

You can view more examples in [src/FingerprintPro.ServerSdk.Examples/Program.cs](src/FingerprintPro.ServerSdk.Examples/Program.cs).
You can view more examples in [src/Fingerprint.ServerSdk.Examples/Program.cs](src/Fingerprint.ServerSdk.Examples/Program.cs).

### Region

If your subscription is in region other than US, you need to change the region in the configuration:

```csharp
using FingerprintPro.ServerSdk.Client;
using Fingerprint.ServerSdk.Client;

var configuration = new Configuration(Environment.GetEnvironmentVariable("SECRET_API_KEY")!)
{
Expand All @@ -127,7 +127,7 @@ var configuration = new Configuration(Environment.GetEnvironmentVariable("SECRET

This SDK provides utility methods for decoding [sealed results](https://dev.fingerprint.com/docs/sealed-client-results).
```csharp
using FingerprintPro.ServerSdk;
using Fingerprint.ServerSdk;

var sealedResult = Environment.GetEnvironmentVariable("BASE64_SEALED_RESULT")!;
var sealedKey = Environment.GetEnvironmentVariable("BASE64_KEY")!;
Expand All @@ -139,15 +139,15 @@ var events = Sealed.UnsealEventResponse(Convert.FromBase64String(sealedResult),

Console.WriteLine(events.ToJson());
```
To learn more, refer to example located in [src/FingerprintPro.ServerSdk.SealedResultExample/Program.cs](src/FingerprintPro.ServerSdk.SealedResultExample/Program.cs).
To learn more, refer to example located in [src/Fingerprint.ServerSdk.SealedResultExample/Program.cs](src/Fingerprint.ServerSdk.SealedResultExample/Program.cs).

## Webhook signature validation

This SDK provides utility method for verifying the HMAC signature of the incoming webhook request.
```csharp
namespace FingerprintAspNetCore.Areas.Identity.Pages;

using FingerprintPro.ServerSdk;
using Fingerprint.ServerSdk;
using Microsoft.AspNetCore.Mvc;
using System;
using System.IO;
Expand Down Expand Up @@ -200,7 +200,7 @@ public class WebhookController : ControllerBase
}

```
To learn more, refer to example located in [src/FingerprintPro.ServerSdk.WebhookExample/Program.cs](src/FingerprintPro.ServerSdk.WebhookExample/Program.cs).
To learn more, refer to example located in [src/Fingerprint.ServerSdk.WebhookExample/Program.cs](src/Fingerprint.ServerSdk.WebhookExample/Program.cs).

<a name="documentation-for-api-endpoints"></a>
## Documentation for API Endpoints
Expand Down
2 changes: 1 addition & 1 deletion bumpConfig.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ console.info('dirname', dirname);

const paths = {
config: path.resolve(dirname, './config.json'),
csproj: path.resolve(dirname, './src/FingerprintPro.ServerSdk/FingerprintPro.ServerSdk.csproj'),
csproj: path.resolve(dirname, './src/Fingerprint.ServerSdk/Fingerprint.ServerSdk.csproj'),
}

console.info('paths', paths);
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageName": "FingerprintPro.ServerSdk",
"packageName": "Fingerprint.ServerSdk",
"packageVersion": "7.9.0",
"packageUrl": "https://github.com/fingerprintjs/fingerprint-pro-server-api-dotnet-sdk",
"gitUserId": "fingerprintjs",
Expand Down
10 changes: 5 additions & 5 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Contributing to Fingerprint Server API SDK
# Contributing to Fingerprint Server Dotnet SDK

## Structure

Most files in the project are autogenerated by [swagger-codegen](https://swagger.io/tools/swagger-codegen/).

- [template](./template) - folder contains redefined templates of `swagger-codegen`. Original templates you can find in [swagger-codegen repo](https://github.com/swagger-api/swagger-codegen-generators/tree/master/src/main/resources/handlebars/csharp).
- [docs](./docs) - generated documentation for models and [API Client](./docs/FingerprintApi.md).
- [src/FingerprintPro.ServerSdk](./src/FingerprintPro.ServerSdk) - API Client code is generated automatically.
- [src/Fingerprint.ServerSdk](./src/Fingerprint.ServerSdk) - API Client code is generated automatically.

## Code generation

Expand All @@ -28,8 +28,8 @@ java -jar ./bin/swagger-codegen-cli.jar config-help -l csharp
### Running tests

We have two type of tests:
- Unit tests, located in [src/FingerprintPro.ServerSdk.Test](src/FingerprintPro.ServerSdk.Test)
- Functional tests, that use real API located in [src/FingerprintPro.ServerSdk.FunctionalTest](src/FingerprintPro.ServerSdk.FunctionalTest)
- Unit tests, located in [src/Fingerprint.ServerSdk.Test](src/Fingerprint.ServerSdk.Test)
- Functional tests, that use real API located in [src/Fingerprint.ServerSdk.FunctionalTest](src/Fingerprint.ServerSdk.FunctionalTest)

To run tests you can use IDE instruments or just run:

Expand All @@ -41,7 +41,7 @@ dotnet test

We recommend using our [docker-compose.yml](docker-compose.yml) file for running the project locally. To do that:

1. Build the image used for running the project: `docker build --tag fingerprint-pro-server-api-dotnet:latest ./`
1. Build the image used for running the project: `docker build --tag fingerprint-server-dotnet-sdk:latest ./`
2. Prepare env file based on the [.env.example](.env.example).
3. Run the example project: `docker compose run --rm example`. The `--rm` flag ensures the service is removed once the command completes execution.

Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Hint: run `docker build --tag fingerprint-pro-server-api-dotnet:latest ./` to prepare image required for these service
# Hint: run `docker build --tag fingerprint-server-dotnet-sdk:latest ./` to prepare image required for these service
services:
# Generic service for running arbitrary dotnet commands
# Example usage: `docker compose run --rm dotnet "dotnet list package"`
dotnet:
image: fingerprint-pro-server-api-dotnet:latest
image: fingerprint-server-dotnet-sdk:latest
env_file: &env
- .env
volumes: &volumes
- ./src:/src
- ./fingerprint-pro-server-api-dotnet-sdk.sln:/fingerprint-pro-server-api-dotnet-sdk.sln
- ./fingerprint-server-dotnet-sdk.sln:/fingerprint-server-dotnet-sdk.sln

# Service for running example project.
# To run, use: `docker compose run --rm example`
example:
image: fingerprint-pro-server-api-dotnet:latest
command: ["dotnet", "run", "--project", "src/FingerprintPro.ServerSdk.Examples"]
image: fingerprint-server-dotnet-sdk:latest
command: ["dotnet", "run", "--project", "src/Fingerprint.ServerSdk.Examples"]
env_file: *env
volumes: *volumes

# Service for running tests.
# To run, use: `docker compose run --rm test`
test:
image: fingerprint-pro-server-api-dotnet:latest
image: fingerprint-server-dotnet-sdk:latest
command: ["dotnet", "test"]
env_file: *env
volumes: *volumes
2 changes: 1 addition & 1 deletion docs/Botd.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.Botd
# Fingerprint.ServerSdk.Model.Botd
Contains all the information from Bot Detection product

## Properties
Expand Down
2 changes: 1 addition & 1 deletion docs/BotdBot.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.BotdBot
# Fingerprint.ServerSdk.Model.BotdBot
Stores bot detection result

## Properties
Expand Down
2 changes: 1 addition & 1 deletion docs/BotdBotResult.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.BotdBotResult
# Fingerprint.ServerSdk.Model.BotdBotResult
Bot detection result:
* `notDetected` - the visitor is not a bot
* `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on
Expand Down
2 changes: 1 addition & 1 deletion docs/BrowserDetails.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.BrowserDetails
# Fingerprint.ServerSdk.Model.BrowserDetails
## Properties

Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/ClonedApp.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.ClonedApp
# Fingerprint.ServerSdk.Model.ClonedApp
## Properties

Name | Type | Description | Notes
Expand Down
10 changes: 5 additions & 5 deletions docs/DecryptionKey.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# FingerprintPro.ServerSdk.Sealed.DecryptionKey
# Fingerprint.ServerSdk.Sealed.DecryptionKey

## Properties

| Name | Type | Description | Notes |
|---------------|---------------------------------------------------------|------------------------------------------------------------------------------------|-------|
| **Key** | **byte[]** | Key generated in dashboard that will be used to decrypt sealed result | |
| **Algorithm** | **FingerprintPro.ServerSdk.Sealed.DecryptionAlgorithm** | Algorithm to use for decryption. Currently only "Aes256Gcm" value is supported. | |
| Name | Type | Description | Notes |
|---------------|------------------------------------------------------|------------------------------------------------------------------------------------|-------|
| **Key** | **byte[]** | Key generated in dashboard that will be used to decrypt sealed result | |
| **Algorithm** | **Fingerprint.ServerSdk.Sealed.DecryptionAlgorithm** | Algorithm to use for decryption. Currently only "Aes256Gcm" value is supported. | |


2 changes: 1 addition & 1 deletion docs/DeprecatedGeolocation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.DeprecatedGeolocation
# Fingerprint.ServerSdk.Model.DeprecatedGeolocation
This field is **deprecated** and will not return a result for **applications created after January 23rd, 2024**. Please use the [IP Geolocation Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.

## Properties
Expand Down
2 changes: 1 addition & 1 deletion docs/DeveloperTools.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.DeveloperTools
# Fingerprint.ServerSdk.Model.DeveloperTools
## Properties

Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/Emulator.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.Emulator
# Fingerprint.ServerSdk.Model.Emulator
## Properties

Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/Error.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.Error
# Fingerprint.ServerSdk.Model.Error
## Properties

Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/ErrorCode.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.ErrorCode
# Fingerprint.ServerSdk.Model.ErrorCode
Error code:
* `RequestCannotBeParsed` - the query parameters or JSON payload contains some errors
that prevented us from parsing it (wrong type/surpassed limits).
Expand Down
2 changes: 1 addition & 1 deletion docs/ErrorPlainResponse.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.ErrorPlainResponse
# Fingerprint.ServerSdk.Model.ErrorPlainResponse
## Properties

Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/ErrorResponse.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.ErrorResponse
# Fingerprint.ServerSdk.Model.ErrorResponse
## Properties

Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/EventsGetResponse.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.EventsGetResponse
# Fingerprint.ServerSdk.Model.EventsGetResponse
Contains results from all activated products - Fingerprint Pro, Bot Detection, and others.

## Properties
Expand Down
2 changes: 1 addition & 1 deletion docs/EventsUpdateRequest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.EventsUpdateRequest
# Fingerprint.ServerSdk.Model.EventsUpdateRequest
## Properties

Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/FactoryReset.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FingerprintPro.ServerSdk.Model.FactoryReset
# Fingerprint.ServerSdk.Model.FactoryReset
## Properties

Name | Type | Description | Notes
Expand Down
Loading
Loading