API-V2 C#_SDK Configuration

Introduction

The API is configured via .NET dependency injection. Depending on the Openld client configuration and desired authentication method, the configuration can look different.

Basic options

ApiBaseUri

The URL under which the API can be reached, Example: https://localhost:8000/apiv2/latest

ExplodeFlatChainProperties

Default: true

Defines wether property chains are returned as nested objects or simple objects.

Example: /servicedmcore/CoreIdentity/2/?fields=Id,Nachname,CoreIdentityType.Id

ExplodeFlatChainProperties = true

ExplodeFlatChainProperties = false

ExplodeFlatChainProperties = true

ExplodeFlatChainProperties = false

{ "ci_family_name": { "was_access_denied": false, "value": "Testikus" }, "id": 20, "core_identity_type": { "id": { "was_access_denied": false, "value": 1 } } }
{ "ci_family_name": { "was_access_denied": false, "value": "Testikus" }, "core_identity_type.id": { "was_access_denied": false, "value": 1 }, "id": 20 }

AccessDeniedReplacementString

Defines wether the AccessDeniedHandler objects should be replaced. If the option is used, only the value of the value property is returned instead of the AcessDeniedHandler objects. If there is a denial access, the ReplacementString is returned instead of the value.

This option is not type-safe, since a string is always returned in the event of an access denial, regardless of the original type of the property.

Example: /servicedmcore/CoreIdentity/2/?fields=Id,Nachname,Language

 

AccessDeniedReplacementString=">Denied<"

 

AccessDeniedReplacementString=">Denied<"

{ "ci_family_name": { "was_access_denied": true, "value": null }, "id": 20, "core_identity_type": { "id": { "was_access_denied": false, "value": 1 } } }

 

.NET Core configuration

Required assemblies

  • iTsense.Moving.Common.NetStandard

  • iTsense.Moving.Common.ApiV2

  • iTsense.Moving.Common.ApiV2.Client

  • iTsense.Moving.Common.ApiV2.Client.NetCore

Optional assemblies

  • iTsense.Moving.Common.ApiV2.Client.DataContracts

    • Standard Datacontracts

Example configuration with authentication via HTTP user context

Example configuration with authentication via static API user

.NET Full Framework configuration (Castle Windsor)

Required Assemblies

  • iTsense.Moving.Common.NetStandard

  • iTsense.Moving.Common.ApiV2

  • iTsense.Moving.Common.ApiV2.Client

  • iTsense.Moving.Common.ApiV2.Client.CastleWindsor

Optional assemblies

  • iTsense.Moving.Common.ApiV2.Client.DataContracts

    • Standard Datacontracts

Example configuration with authentication via static API user

Multiple clients with different coigurations

Multiple clients with different configuratins can be registered. To do this, one interface must be declared for each configuration. These can then be consumed via dependency injection.

The new interfaces must not contain any additional members!

Example configuration

© ITSENSE AG. Alle Rechte vorbehalten. ITSENSE und CoreOne sind eingetragene Marken der ITSENSE AG.