Table of Contents

Class S2SEndpointAuthenticationAddIn

Namespace
Dynamicweb.DataIntegration.EndpointManagement.AuthenticationAddIns
Assembly
Dynamicweb.DataIntegration.dll
[AddInUseParameterSectioning(true)]
[AddInName("S2S")]
[AddInLabel("OAuth 2.0 - Service-to-service")]
[AddInDescription("OAuth 2.0 - Service-to-service")]
public class S2SEndpointAuthenticationAddIn : BaseEndpointAuthenticationAddIn
Inheritance
S2SEndpointAuthenticationAddIn
Inherited Members

Properties

ClientId

[AddInParameter("Application (client) Id")]
[AddInParameterEditor(typeof(TextParameterEditor), "")]
public string? ClientId { get; set; }

Property Value

string

ClientSecret

[SensitiveData]
[AddInParameter("Client Secret")]
[AddInParameterEditor(typeof(TextParameterEditor), "password=true")]
public string? ClientSecret { get; set; }

Property Value

string

TenantId

[AddInParameter("Directory (tenant) Id")]
[AddInParameterEditor(typeof(TextParameterEditor), "")]
public string? TenantId { get; set; }

Property Value

string

Url

[AddInParameter("URL (only for On-Premise server connection or custom scope)")]
[AddInParameterEditor(typeof(TextParameterEditor), InfoText = "Example: For Microsoft Dynamics 365 Business Central use url: https://api.businesscentral.dynamics.com For Microsoft Dynamics 365 Finance and Operations use url: https://myname.cloudax.dynamics.com For Microsoft Dynamics CRM use url: https://myname.crm4.dynamics.com")]
public string? Url { get; set; }

Property Value

string

Methods

Delete(EndpointAuthentication)

Deletes the cached token for the given authentication when the authentication is deleted.

public override void Delete(EndpointAuthentication authentication)

Parameters

authentication EndpointAuthentication

The authentication for which to delete the cached token.

GetSecretExpirationDate()

public SecretExpirationDate? GetSecretExpirationDate()

Returns

SecretExpirationDate

GetToken(Endpoint)

Gets the access token for the given endpoint using the client credentials flow.

public string? GetToken(Endpoint endpoint)

Parameters

endpoint Endpoint

The endpoint for which to acquire the token.

Returns

string

The access token for the given endpoint.

IsOAuthTokenBased()

public override bool IsOAuthTokenBased()

Returns

bool

PrepareClient(Uri, HttpClient, HttpClientHandler, Endpoint)

public override void PrepareClient(Uri uri, HttpClient client, HttpClientHandler clientHandler, Endpoint endpoint)

Parameters

uri Uri
client HttpClient
clientHandler HttpClientHandler
endpoint Endpoint

ValidateParameters()

public override string? ValidateParameters()

Returns

string
To top