Skip to content

Commit b82f28b

Browse files
authored
Merge pull request Azure#4879 from twitchax/netcore
Netcore + KeyVault
2 parents b8868f3 + 4277d2c commit b82f28b

File tree

80 files changed

+1372
-923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1372
-923
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Exclude all.
2+
**/*
3+
4+
# Include the build.
5+
!src/Package/Release/ResourceManager/**/*
6+
!src/Package/Debug/ResourceManager/**/*

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ app.config
2020
# User-specific files
2121
*.suo
2222
*.user
23+
*.userprefs
2324
*.sln.docstates
25+
.vscode
2426

2527
# Build results
2628
[Dd]ebug/

.travis.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
sudo: required
2+
language: csharp
3+
mono: none
4+
dotnet: 2.0.0
5+
dist: trusty
6+
7+
env:
8+
- NAME="azure-powershell-core" CONFIG="Release"
9+
10+
services:
11+
- docker
12+
13+
before_install:
14+
- sudo apt-get update
15+
- sudo apt-get install docker-ce
16+
17+
script:
18+
- dotnet msbuild build.proj /t:BuildNetcore /p:Configuration=$CONFIG
19+
20+
after_success:
21+
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
22+
docker build . -t $DOCKER_USER/$NAME:$TRAVIS_COMMIT --build-arg CONFIG=$CONFIG;
23+
docker tag $DOCKER_USER/$NAME:$TRAVIS_COMMIT $DOCKER_USER/$NAME:$TRAVIS_BRANCH;
24+
25+
docker login -u $DOCKER_USER -p $DOCKER_PASS;
26+
27+
docker push $DOCKER_USER/$NAME:$TRAVIS_COMMIT;
28+
docker push $DOCKER_USER/$NAME:$TRAVIS_BRANCH;
29+
30+
if [ "$TRAVIS_BRANCH" == "master" ]; then
31+
docker tag $DOCKER_USER/$NAME:$TRAVIS_COMMIT $DOCKER_USER/$NAME:latest;
32+
docker push $DOCKER_USER/$NAME:latest;
33+
fi;
34+
fi

Azure.PowerShell.NetCore.sln renamed to Azure.PowerShell.Netcore.sln

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,49 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26507.0
4+
VisualStudioVersion = 15.0.27019.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.NetCore", "src\Common\Commands.Common.Authentication\Authentication.NetCore.csproj", "{D12674F6-CB92-438F-A68D-21CE12F8611B}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Authentication.Netcore", "src\Common\Commands.Common.Authentication\Common.Authentication.Netcore.csproj", "{D12674F6-CB92-438F-A68D-21CE12F8611B}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Netcore", "src\Common\Commands.Common\Common.Netcore.csproj", "{998E17F1-A0D4-48CE-8EE5-3B60E7841D8D}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Netcore", "src\Common\Commands.Common\Common.Netcore.csproj", "{998E17F1-A0D4-48CE-8EE5-3B60E7841D8D}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ResourceManager.Netcore", "src\ResourceManager\Common\Commands.ResourceManager.Common\Common.ResourceManager.Netcore.csproj", "{35A7AFAB-9F76-4CC8-AD83-6BE14DAEE597}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.ResourceManager.Netcore", "src\ResourceManager\Common\Commands.ResourceManager.Common\Common.ResourceManager.Netcore.csproj", "{35A7AFAB-9F76-4CC8-AD83-6BE14DAEE597}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Profile.Netcore", "src\ResourceManager\Profile\Commands.Profile\Commands.Profile.Netcore.csproj", "{31044C50-5F29-4CB4-9E7C-8E0123FA6B77}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile.Netcore", "src\ResourceManager\Profile\Commands.Profile\Commands.Profile.Netcore.csproj", "{31044C50-5F29-4CB4-9E7C-8E0123FA6B77}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Tags.Netcore", "src\ResourceManager\Tags\Commands.Tags\Commands.Tags.Netcore.csproj", "{4D14DBA3-26A1-4102-8012-196CF2C31C56}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags.Netcore", "src\ResourceManager\Tags\Commands.Tags\Commands.Tags.Netcore.csproj", "{4D14DBA3-26A1-4102-8012-196CF2C31C56}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Resources.Rest.Netcore", "src\ResourceManager\Resources\Commands.ResourceManager\Cmdlets\Commands.Resources.Rest.Netcore.csproj", "{0E33B20F-5AC6-43BE-B91F-203DDB5981DC}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest.Netcore", "src\ResourceManager\Resources\Commands.ResourceManager\Cmdlets\Commands.Resources.Rest.Netcore.csproj", "{0E33B20F-5AC6-43BE-B91F-203DDB5981DC}"
1717
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Resources.Netcore", "src\ResourceManager\Resources\Commands.Resources\Commands.Resources.Netcore.csproj", "{B270ACDB-0E27-42CD-BB84-B9A6E47543B0}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Netcore", "src\ResourceManager\Resources\Commands.Resources\Commands.Resources.Netcore.csproj", "{B270ACDB-0E27-42CD-BB84-B9A6E47543B0}"
1919
EndProject
20-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Storage.Netcore", "src\Common\Commands.Common.Storage\Storage.Netcore.csproj", "{6B91BCDC-5031-4A7A-A566-83308FF997C6}"
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Storage.Netcore", "src\Common\Commands.Common.Storage\Common.Storage.Netcore.csproj", "{6B91BCDC-5031-4A7A-A566-83308FF997C6}"
2121
EndProject
22-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Storage.Netcore", "src\ResourceManager\Storage\Commands.Management.Storage\Commands.Storage.Netcore.csproj", "{6878D60B-AD5B-4D37-8B84-5D529090FBAC}"
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.Netcore", "src\ResourceManager\Storage\Commands.Management.Storage\Commands.Storage.Netcore.csproj", "{6878D60B-AD5B-4D37-8B84-5D529090FBAC}"
2323
EndProject
24-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Websites.Netcore", "src\ResourceManager\Websites\Commands.Websites\Commands.Websites.Netcore.csproj", "{59581DCA-1726-4EE2-A665-0112E681C35C}"
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Websites.Netcore", "src\ResourceManager\Websites\Commands.Websites\Commands.Websites.Netcore.csproj", "{59581DCA-1726-4EE2-A665-0112E681C35C}"
2525
EndProject
26-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.Abstractions.NetCore", "src\Common\Commands.Common.Authentication.Abstractions\Authentication.Abstractions.NetCore.csproj", "{7290FAB3-878F-4960-A02D-70E5DC88622D}"
26+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Authentication.Abstractions.Netcore", "src\Common\Commands.Common.Authentication.Abstractions\Common.Authentication.Abstractions.Netcore.csproj", "{7290FAB3-878F-4960-A02D-70E5DC88622D}"
2727
EndProject
28-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ResourceManager.Authentication.Netcore", "src\ResourceManager\Common\Commands.Common.Authentication.ResourceManager\Common.ResourceManager.Authentication.Netcore.csproj", "{AF50ACE6-9A6A-4A18-8140-B6C5BDD0EFD6}"
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.ResourceManager.Authentication.Netcore", "src\ResourceManager\Common\Commands.Common.Authentication.ResourceManager\Common.ResourceManager.Authentication.Netcore.csproj", "{AF50ACE6-9A6A-4A18-8140-B6C5BDD0EFD6}"
2929
EndProject
30-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Compute.Netcore", "src\ResourceManager\Compute\Commands.Compute\Commands.Compute.Netcore.csproj", "{7B61AB3B-9F62-4B96-BCED-13920B56CD3C}"
30+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Compute.Netcore", "src\ResourceManager\Compute\Commands.Compute\Commands.Compute.Netcore.csproj", "{7B61AB3B-9F62-4B96-BCED-13920B56CD3C}"
3131
EndProject
32-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Network.Netcore", "src\ResourceManager\Network\Commands.Network\Commands.Network.Netcore.csproj", "{40ACDC82-5A87-4D52-83B5-ED21274363A5}"
32+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Network.Netcore", "src\ResourceManager\Network\Commands.Network\Commands.Network.Netcore.csproj", "{40ACDC82-5A87-4D52-83B5-ED21274363A5}"
3333
EndProject
3434
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{4B187BE1-F8C4-4658-AD17-98AA087482AA}"
3535
EndProject
36-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Profile.Test.Netcore", "src\ResourceManager\Profile\Commands.Profile.Test\Commands.Profile.Test.Netcore.csproj", "{87246108-B555-4F5F-B916-A9C6FABB1971}"
36+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile.Test.Netcore", "src\ResourceManager\Profile\Commands.Profile.Test\Commands.Profile.Test.Netcore.csproj", "{87246108-B555-4F5F-B916-A9C6FABB1971}"
3737
EndProject
38-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ResourceManager.ScenarioTests.Netcore", "src\ResourceManager\Common\Commands.ScenarioTests.ResourceManager.Common\Common.ResourceManager.ScenarioTests.Netcore.csproj", "{624FE5CE-0F46-4A0A-9A1B-54D5724B7F96}"
38+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.ResourceManager.ScenarioTests.Netcore", "src\ResourceManager\Common\Commands.ScenarioTests.ResourceManager.Common\Common.ResourceManager.ScenarioTests.Netcore.csproj", "{624FE5CE-0F46-4A0A-9A1B-54D5724B7F96}"
39+
EndProject
40+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Rbac.Netcore", "src\Common\Commands.Common.Graph.RBAC\Common.Rbac.Netcore.csproj", "{32BB23AC-A900-4EB8-ABBE-D8AABEB90E31}"
41+
EndProject
42+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Authorization.Netcore", "src\Common\Commands.Common.Authorization\Common.Authorization.Netcore.csproj", "{826C77AA-C038-46F1-86AE-9A9F2E564D41}"
43+
EndProject
44+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Network.Netcore", "src\Common\Commands.Common.Network\Common.Network.Netcore.csproj", "{EBFE7C29-7BF6-4E32-8844-09A38A597E05}"
45+
EndProject
46+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.KeyVault.Netcore", "src\ResourceManager\KeyVault\Commands.KeyVault\Commands.KeyVault.Netcore.csproj", "{814E7BBB-3D69-410A-81CF-374C29CC5C6B}"
3947
EndProject
4048
Global
4149
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -107,6 +115,22 @@ Global
107115
{624FE5CE-0F46-4A0A-9A1B-54D5724B7F96}.Debug|Any CPU.Build.0 = Debug|Any CPU
108116
{624FE5CE-0F46-4A0A-9A1B-54D5724B7F96}.Release|Any CPU.ActiveCfg = Release|Any CPU
109117
{624FE5CE-0F46-4A0A-9A1B-54D5724B7F96}.Release|Any CPU.Build.0 = Release|Any CPU
118+
{32BB23AC-A900-4EB8-ABBE-D8AABEB90E31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
119+
{32BB23AC-A900-4EB8-ABBE-D8AABEB90E31}.Debug|Any CPU.Build.0 = Debug|Any CPU
120+
{32BB23AC-A900-4EB8-ABBE-D8AABEB90E31}.Release|Any CPU.ActiveCfg = Release|Any CPU
121+
{32BB23AC-A900-4EB8-ABBE-D8AABEB90E31}.Release|Any CPU.Build.0 = Release|Any CPU
122+
{826C77AA-C038-46F1-86AE-9A9F2E564D41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
123+
{826C77AA-C038-46F1-86AE-9A9F2E564D41}.Debug|Any CPU.Build.0 = Debug|Any CPU
124+
{826C77AA-C038-46F1-86AE-9A9F2E564D41}.Release|Any CPU.ActiveCfg = Release|Any CPU
125+
{826C77AA-C038-46F1-86AE-9A9F2E564D41}.Release|Any CPU.Build.0 = Release|Any CPU
126+
{EBFE7C29-7BF6-4E32-8844-09A38A597E05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
127+
{EBFE7C29-7BF6-4E32-8844-09A38A597E05}.Debug|Any CPU.Build.0 = Debug|Any CPU
128+
{EBFE7C29-7BF6-4E32-8844-09A38A597E05}.Release|Any CPU.ActiveCfg = Release|Any CPU
129+
{EBFE7C29-7BF6-4E32-8844-09A38A597E05}.Release|Any CPU.Build.0 = Release|Any CPU
130+
{814E7BBB-3D69-410A-81CF-374C29CC5C6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
131+
{814E7BBB-3D69-410A-81CF-374C29CC5C6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
132+
{814E7BBB-3D69-410A-81CF-374C29CC5C6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
133+
{814E7BBB-3D69-410A-81CF-374C29CC5C6B}.Release|Any CPU.Build.0 = Release|Any CPU
110134
EndGlobalSection
111135
GlobalSection(SolutionProperties) = preSolution
112136
HideSolutionNode = FALSE
@@ -115,4 +139,7 @@ Global
115139
{87246108-B555-4F5F-B916-A9C6FABB1971} = {4B187BE1-F8C4-4658-AD17-98AA087482AA}
116140
{624FE5CE-0F46-4A0A-9A1B-54D5724B7F96} = {4B187BE1-F8C4-4658-AD17-98AA087482AA}
117141
EndGlobalSection
142+
GlobalSection(ExtensibilityGlobals) = postSolution
143+
SolutionGuid = {0A9808F3-5476-4731-BD44-617A8BA3DD65}
144+
EndGlobalSection
118145
EndGlobal

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM microsoft/powershell
2+
3+
ARG CONFIG=Release
4+
5+
COPY src/Package/${CONFIG}/ResourceManager /usr/local/share/powershell/Modules

NuGet.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@
88
</packageSources>
99
<disabledPackageSources>
1010
<add key="dotnet-core" value="true" />
11-
<add key="powershell-core" value="true" />
1211
</disabledPackageSources>
1312
</configuration>

build.proj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,14 @@
260260
</Target>
261261

262262
<!-- Build .Net Core Cmdlets -->
263-
<Target Name="BuildNetCore">
263+
<Target Name="BuildNetcore">
264264
<Message Importance="high" Text="Building Cmdlets..." />
265265

266266
<!-- Build and create package content -->
267267
<Exec Command="dotnet --version"/>
268-
<Exec Command="dotnet restore Azure.PowerShell.NetCore.sln"/>
269-
<Exec Command="dotnet build Azure.PowerShell.NetCore.sln -c $(Configuration)"/>
270-
<Exec Command="dotnet publish Azure.PowerShell.NetCore.sln -c $(Configuration)"/>
268+
<Exec Command="dotnet restore Azure.PowerShell.Netcore.sln"/>
269+
<Exec Command="dotnet build Azure.PowerShell.Netcore.sln -c $(Configuration)"/>
270+
<Exec Command="dotnet publish Azure.PowerShell.Netcore.sln -c $(Configuration)"/>
271271

272272
<!-- Delete powershell runtime files -->
273273
<ItemGroup>
@@ -526,7 +526,7 @@
526526
</PropertyGroup>
527527

528528
<!-- Note: all testing related target should go to 'AzurePowershell.test.targets' file except the one used by CI run -->
529-
<Import Project="$(MSBuildThisFileDirectory)AzurePowershell.test.targets"/>
529+
<Import Project="$(MSBuildThisFileDirectory)AzurePowershell.Test.targets"/>
530530

531531
<!-- Run checkin tests for each pull request -->
532532
<Target Name="Test" DependsOnTargets="BeforeRunTests">

src/Common/Commands.Common.Authentication.Abstractions/Authentication.Abstractions.NetCore.csproj renamed to src/Common/Commands.Common.Authentication.Abstractions/Common.Authentication.Abstractions.Netcore.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3+
<Import Project="..\..\..\tools\Common.Netcore.Dependencies.targets" />
4+
35
<PropertyGroup>
46
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
<AssemblyName>Authentication.Abstractions</AssemblyName>
7+
<AssemblyName>Microsoft.Azure.Commands.Common.Authentication.Abstractions</AssemblyName>
68
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
79
<RootNamespace>Microsoft.Azure.Commands.Common.Authentication.Abstractions</RootNamespace>
810
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -17,20 +19,17 @@
1719

1820
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
1921
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
22+
<DelaySign>false</DelaySign>
2023
</PropertyGroup>
2124

2225
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
23-
<PackageReference Include="Hyak.Common" Version="1.1.3" />
24-
<PackageReference Include="Microsoft.Azure.Common" Version="2.1.4" />
2526
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="2.2.12" />
2627
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2728
<PackageReference Include="System.Reflection" Version="4.3.0" />
2829
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />
2930
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.4.0-preview1-25305-02" />
3031
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
3132
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
32-
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
33-
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.0.0-beta.3" />
3433
</ItemGroup>
3534

3635
<ItemGroup>

src/Common/Commands.Common.Authentication/Authentication/KeyStoreApplicationCredentialProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
using Microsoft.IdentityModel.Clients.ActiveDirectory;
1616
using Microsoft.Rest.Azure.Authentication;
17+
#if NETSTANDARD
18+
using Microsoft.WindowsAzure.Commands.Common;
19+
#endif
1720
using System.Security;
1821
using System.Threading.Tasks;
1922

src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalTokenProvider.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
1717
using Microsoft.IdentityModel.Clients.ActiveDirectory;
1818
using Microsoft.Rest.Azure.Authentication;
19+
#if NETSTANDARD
20+
using Microsoft.WindowsAzure.Commands.Common;
21+
#endif
1922
using System;
2023
using System.Collections.Generic;
2124
using System.Security;
@@ -79,10 +82,9 @@ private AuthenticationResult AcquireTokenWithSecret(AdalConfiguration config, st
7982
return context.AcquireToken(config.ResourceClientUri, credential);
8083
#else
8184
var credential = new ClientCredential(appId, ConversionUtilities.SecureStringToString(appKey));
82-
return context.AcquireTokenAsync(context.Authority, credential)
83-
.ConfigureAwait(false).GetAwaiter().GetResult();
84-
#endif
85-
}
85+
return context.AcquireTokenAsync(config.ResourceClientUri, credential).ConfigureAwait(false).GetAwaiter().GetResult();
86+
#endif
87+
}
8688

8789
private AuthenticationResult AcquireTokenWithCertificate(
8890
AdalConfiguration config,

src/Common/Commands.Common.Authentication/AzureSessionInitializer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ public AdalSession()
182182
{
183183
}
184184

185-
public override TraceLevel AuthenticationLegacyTraceLevel
185+
public override System.Diagnostics.TraceLevel AuthenticationLegacyTraceLevel
186186
{
187187
get
188188
{
189-
return TraceLevel.Off;
189+
return System.Diagnostics.TraceLevel.Off;
190190
}
191191
set
192192
{
193-
193+
194194
}
195195
}
196196

src/Common/Commands.Common.Authentication/Authentication.NetCore.csproj renamed to src/Common/Commands.Common.Authentication/Common.Authentication.Netcore.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3+
<Import Project="..\..\..\tools\Common.Netcore.Dependencies.targets" />
4+
35
<PropertyGroup>
46
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
<AssemblyName>Authentication</AssemblyName>
7+
<AssemblyName>Microsoft.Azure.Commands.Common.Authentication</AssemblyName>
68
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
79
<RootNamespace>Microsoft.Azure.Commands.Common.Authentication</RootNamespace>
810
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -17,19 +19,15 @@
1719

1820
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
1921
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
22+
<DelaySign>false</DelaySign>
2023
</PropertyGroup>
2124

2225
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
23-
<PackageReference Include="Hyak.Common" Version="1.1.3" />
24-
<PackageReference Include="Microsoft.Azure.Common" Version="2.1.4" />
25-
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="2.2.12" />
2626
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2727
<PackageReference Include="System.Reflection" Version="4.3.0" />
2828
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />
2929
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
3030
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
31-
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
32-
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.0.0-beta.3" />
3331
</ItemGroup>
3432

3533
<ItemGroup>
@@ -41,7 +39,7 @@
4139
</ItemGroup>
4240

4341
<ItemGroup>
44-
<ProjectReference Include="..\Commands.Common.Authentication.Abstractions\Authentication.Abstractions.NetCore.csproj" />
42+
<ProjectReference Include="..\Commands.Common.Authentication.Abstractions\Common.Authentication.Abstractions.Netcore.csproj" />
4543
<ProjectReference Include="..\Commands.Common\Common.Netcore.csproj" />
4644
</ItemGroup>
4745

0 commit comments

Comments
 (0)