Skip to content

Commit 573caf0

Browse files
authored
Merge pull request Azure#580 from Azure/dev
huangpf PR: dev <- Azure:dev
2 parents 20fb3d8 + 632b427 commit 573caf0

File tree

373 files changed

+298801
-179963
lines changed

Some content is hidden

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

373 files changed

+298801
-179963
lines changed

ChangeLog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
* Azure Redis Cache
1+
##2016.08.03 version 2.0.0
2+
* Azure Redis Cache
23
* New cmdlet added for New-AzureRmRedisCacheScheduleEntry
34
* New cmdlet added for New-AzureRmRedisCachePatchSchedule
45
* New cmdlet added for Get-AzureRmRedisCachePatchSchedule
56
* New cmdlet added for Remove-AzureRmRedisCachePatchSchedule
7+
68
##2016.07.11 version 1.6.0
79
* **Behavioral change for -Force, –Confirm and $ConfirmPreference parameters for all cmdlets. We are changing this implementation to be in line with PowerShell guidelines. For most cmdlets, this means removing the Force parameter and to skip the ShouldProcess prompt, users will need to include the parameter: ‘-Confirm:$false’ in their PowerShell scripts.** This changes are addressing following issues:
810
* Correct implementation of –WhatIf functionality, allowing a user to determine the effects of a cmdlet or script without making any actual changes

src/Common/Commands.Common.Authentication.Test/Commands.Common.Authentication.Test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@
6868
<Private>True</Private>
6969
</Reference>
7070
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\portable-net45+win+wpa81\Microsoft.Rest.ClientRuntime.dll</HintPath>
71+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.2\lib\portable-net45+win+wpa81\Microsoft.Rest.ClientRuntime.dll</HintPath>
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
75+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.2\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
7676
<Private>True</Private>
7777
</Reference>
7878
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.5-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
79+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
8080
<Private>True</Private>
8181
</Reference>
8282
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -187,4 +187,4 @@
187187
</ItemGroup>
188188
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
189189
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
190-
</Project>
190+
</Project>

src/Common/Commands.Common.Authentication.Test/packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
99
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.0" targetFramework="net45" />
1010
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
11-
<package id="Microsoft.Rest.ClientRuntime" version="2.1.0" targetFramework="net45" />
12-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.1.0" targetFramework="net45" />
13-
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.5-preview" targetFramework="net45" />
11+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.2" targetFramework="net45" />
12+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.2" targetFramework="net45" />
13+
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.6-preview" targetFramework="net45" />
1414
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
1515
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
1616
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
@@ -21,4 +21,4 @@
2121
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net45" />
2222
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net45" />
2323
<package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net45" />
24-
</packages>
24+
</packages>

src/Common/Commands.Common.Authentication/Authentication/UserTokenProvider.cs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Hyak.Common;
1616
using Microsoft.Azure.Commands.Common.Authentication.Models;
1717
using Microsoft.Azure.Commands.Common.Authentication.Properties;
18+
using Microsoft.Azure.Commands.Common.Authentication.Utilities;
1819
using Microsoft.IdentityModel.Clients.ActiveDirectory;
1920
using System;
2021
using System.Runtime.InteropServices;
@@ -228,7 +229,7 @@ private AuthenticationResult DoAcquireToken(
228229
{
229230
if (promptBehavior != PromptBehavior.Never)
230231
{
231-
ClearCookies();
232+
AdalTokenCache.ClearCookies();
232233
}
233234

234235
result = context.AcquireToken(
@@ -311,20 +312,6 @@ public LoginType LoginType
311312
}
312313
}
313314

314-
private void ClearCookies()
315-
{
316-
NativeMethods.InternetSetOption(IntPtr.Zero, NativeMethods.INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);
317-
}
318-
319-
private static class NativeMethods
320-
{
321-
internal const int INTERNET_OPTION_END_BROWSER_SESSION = 42;
322-
323-
[DllImport("wininet.dll", SetLastError = true)]
324-
internal static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer,
325-
int lpdwBufferLength);
326-
}
327-
328315
public IAccessToken GetAccessTokenWithCertificate(
329316
AdalConfiguration config,
330317
string clientId,

src/Common/Commands.Common.Authentication/Commands.Common.Authentication.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
75+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
7676
<Private>True</Private>
7777
</Reference>
7878
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
79+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.2\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
8080
<Private>True</Private>
8181
</Reference>
8282
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
83-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.5-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
83+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
8484
<Private>True</Private>
8585
</Reference>
8686
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -172,6 +172,7 @@
172172
<DesignTime>True</DesignTime>
173173
<DependentUpon>Resources.resx</DependentUpon>
174174
</Compile>
175+
<Compile Include="Utilities\AdalTokenCache.cs" />
175176
<Compile Include="Utilities\DictionaryExtensions.cs" />
176177
<Compile Include="Utilities\FileUtilities.cs" />
177178
<Compile Include="Utilities\JsonUtilities.cs" />
@@ -187,4 +188,4 @@
187188
<None Include="packages.config" />
188189
</ItemGroup>
189190
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
190-
</Project>
191+
</Project>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System;
16+
using System.Collections.Generic;
17+
using System.Linq;
18+
using System.Runtime.InteropServices;
19+
using System.Text;
20+
using System.Threading.Tasks;
21+
22+
namespace Microsoft.Azure.Commands.Common.Authentication.Utilities
23+
{
24+
public class AdalTokenCache
25+
{
26+
public static void ClearCookies()
27+
{
28+
NativeMethods.InternetSetOption(IntPtr.Zero, NativeMethods.INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);
29+
}
30+
31+
private static class NativeMethods
32+
{
33+
internal const int INTERNET_OPTION_END_BROWSER_SESSION = 42;
34+
35+
[DllImport("wininet.dll", SetLastError = true)]
36+
internal static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer,
37+
int lpdwBufferLength);
38+
}
39+
}
40+
}

src/Common/Commands.Common.Authentication/packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
99
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.0" targetFramework="net45" />
1010
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
11-
<package id="Microsoft.Rest.ClientRuntime" version="2.1.0" targetFramework="net45" />
12-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.1.0" targetFramework="net45" />
13-
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.5-preview" targetFramework="net45" />
11+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.2" targetFramework="net45" />
12+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.2" targetFramework="net45" />
13+
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.6-preview" targetFramework="net45" />
1414
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
15-
</packages>
15+
</packages>

src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@
8383
<SpecificVersion>False</SpecificVersion>
8484
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
8585
</Reference>
86-
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms">
86+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.28.0.725, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8787
<SpecificVersion>False</SpecificVersion>
8888
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
8989
</Reference>
9090
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
91-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
91+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
9292
<Private>True</Private>
9393
</Reference>
9494
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
95-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.5-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
95+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
9696
<Private>True</Private>
9797
</Reference>
9898
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -196,4 +196,4 @@
196196
</ProjectReference>
197197
</ItemGroup>
198198
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
199-
</Project>
199+
</Project>

src/Common/Commands.Common.Storage/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net45" />
1515
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.0" targetFramework="net45" />
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
17-
<package id="Microsoft.Rest.ClientRuntime" version="2.1.0" targetFramework="net45" />
18-
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.5-preview" targetFramework="net45" />
17+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.2" targetFramework="net45" />
18+
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.6-preview" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.0" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management.Storage" version="6.0.0" targetFramework="net45" />
2222
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
2323
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
2424
<package id="WindowsAzure.Storage" version="6.1.0" targetFramework="net45" />
25-
</packages>
25+
</packages>

src/Common/Commands.Common/Commands.Common.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@
7070
<SpecificVersion>False</SpecificVersion>
7171
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
7272
</Reference>
73-
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms">
73+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.28.0.725, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7474
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
7575
</Reference>
7676
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
77+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
7878
<Private>True</Private>
7979
</Reference>
8080
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.5-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
81+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
8282
<Private>True</Private>
8383
</Reference>
8484
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -183,4 +183,4 @@
183183
</ProjectReference>
184184
</ItemGroup>
185185
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
186-
</Project>
186+
</Project>

src/Common/Commands.Common/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1111
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.0" targetFramework="net45" />
1212
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
13-
<package id="Microsoft.Rest.ClientRuntime" version="2.1.0" targetFramework="net45" />
14-
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.5-preview" targetFramework="net45" />
13+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.2" targetFramework="net45" />
14+
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.6-preview" targetFramework="net45" />
1515
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
1616
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
17-
</packages>
17+
</packages>

0 commit comments

Comments
 (0)