Skip to content
Merged
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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<metadata>

<id>Microsoft.CommonDataModel.ObjectModel.Adapter.Adls.All</id>
<version>1.2.3</version>
<version>1.3.0</version>
<description>The ADLS adapter implementation for the Microsoft Common Data Model Object Model.</description>

<authors>Microsoft</authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net462</TargetFrameworks>
<version>1.2.3</version>
<version>1.3.0</version>
<Description>The ADLS adapter implementation for the Microsoft Common Data Model Object Model.</Description>

<Authors>Microsoft</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<metadata>

<id>Microsoft.CommonDataModel.ObjectModel.Adapter.Adls</id>
<version>1.2.3</version>
<version>1.3.0</version>
<description>The ADLS adapter implementation for the Microsoft Common Data Model Object Model.</description>

<authors>Microsoft</authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ public string SasToken {
/// </summary>
public TokenProvider TokenProvider { get; set; }

/// <summary>
/// The user-defined token provider ( Async ).
/// </summary>
public TokenProviderAsync TokenProviderAsync { get; set; }

/// <summary>
/// Maximum number of items to be returned by the directory list API.
/// If omitted or greater than 5,000, the response will include up to 5,000 items.
Expand Down Expand Up @@ -214,6 +219,15 @@ public ADLSAdapter(string hostname, string root, TokenProvider tokenProvider) :
this.TokenProvider = tokenProvider;
}

/// <summary>
/// The ADLS constructor for user-defined token provider (Async)).
/// </summary>
public ADLSAdapter(string hostname, TokenProviderAsync tokenProviderAsync) : this()
{
this.Hostname = hostname;
this.TokenProviderAsync = tokenProviderAsync;
}

/// <summary>
/// The ADLS constructor without auth info - the auth configuration is set after the construction.
/// <param name="hostname">Host name</param>
Expand Down Expand Up @@ -624,6 +638,10 @@ private async Task<CdmHttpRequest> BuildRequest(string url, HttpMethod method, s
{
request = this.SetUpCdmRequest(url, new Dictionary<string, string> { { "authorization", $"{this.TokenProvider.GetToken()}" } }, method);
}
else if (this.TokenProviderAsync != null)
{
request = this.SetUpCdmRequest(url, new Dictionary<string, string> { { "authorization", $"{await this.TokenProviderAsync.GetTokenAsync()}" } }, method);
}
else if (this.ClientId != null && this.Tenant != null && this.Secret != null)
{
var token = await this.GenerateBearerToken();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net462</TargetFrameworks>
<version>1.3.0-preview1</version>
<Description>The Syms adapter implementation for the Microsoft Common Data Model Object Model.</Description>

<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<RepositoryUrl>https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel</RepositoryUrl>
<PackageProjectUrl>https://commondatamodel.visualstudio.com/CDM</PackageProjectUrl>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.29.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.CSharp" Version="4.6.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.CommonDataModel.ObjectModel\Microsoft.CommonDataModel.ObjectModel.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net462</TargetFrameworks>
<version>1.3.0-preview1</version>
<Description>The Syms adapter implementation for the Microsoft Common Data Model Object Model.</Description>

<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<RepositoryUrl>https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel</RepositoryUrl>
<PackageProjectUrl>https://commondatamodel.visualstudio.com/CDM</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>INTERNAL_VSTS</DefineConstants>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<KeyFile>$(MSBuildThisFileDirectory)..\StrongNameKey\35MSSharedLib1024.snk</KeyFile>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\StrongNameKey\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.29.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.CSharp" Version="4.6.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.CommonDataModel.ObjectModel\Microsoft.CommonDataModel.ObjectModel.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>

<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">

<metadata>

<id>Microsoft.CommonDataModel.ObjectModel.Adapter.Syms</id>
<version>1.3.0-preview1</version>
<description>The Syms adapter implementation for the Microsoft Common Data Model Object Model.</description>

<authors>Microsoft</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MS-PL AND MS-RL AND Apache-2.0</license>
<projectUrl>https://commondatamodel.visualstudio.com/CDM</projectUrl>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<repository url="https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel" />
<tags>CommonDataModel CDM</tags>
<language>en-US</language>

<dependencies>
<group targetFramework=".NETFramework4.5">
<dependency id="Microsoft.CSharp" version="4.5.0" />
<dependency id="Microsoft.Identity.Client" version="4.29.0" />
<dependency id="Newtonsoft.Json" version="12.0.2" />
</group>
<group targetFramework=".NETFramework4.6.2">
<dependency id="Microsoft.CSharp" version="4.5.0" />
<dependency id="Microsoft.Identity.Client" version="4.29.0" />
<dependency id="Newtonsoft.Json" version="12.0.2" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.CSharp" version="4.5.0" />
<dependency id="Microsoft.Identity.Client" version="4.29.0" />
<dependency id="Newtonsoft.Json" version="12.0.2" />
</group>
</dependencies>

</metadata>

<files>
<file src="..\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms\bin\Release\net45\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms.dll" target="lib\net45\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms.dll" />

<file src="..\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms\bin\Release\net462\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms.dll" target="lib\net462\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms.dll" />

<file src="..\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms\bin\Release\netstandard2.0\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms.dll" target="lib\netstandard2.0\Microsoft.CommonDataModel.ObjectModel.Adapter.Syms.dll" />
</files>

</package>
Loading