Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #149 from AzureAD/servicing
Browse files Browse the repository at this point in the history
Servicing release 2.14.201151115
  • Loading branch information
Afshin Sepehri committed Jan 15, 2015
2 parents 328bb3d + 503a0c7 commit 223a3ff
Show file tree
Hide file tree
Showing 46 changed files with 1,585 additions and 57 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ src/ADAL.WinPhone/obj/
tests/Test.ADAL.WinPhone.Dashboard/obj/
src/ADAL.WinPhone/Microsoft.IdentityModel.Clients.ActiveDirectory.XML
tests/Test.ADAL.WinPhone.Unit/obj/
src/ADAL.WinPhoneSL/obj/
tests/Test.ADAL.WinPhoneSL.Dashboard/obj/
62 changes: 61 additions & 1 deletion ADAL.NET.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{34FFBC9F-C270-4B10-98C8-F6882606DDFE}"
EndProject
Expand Down Expand Up @@ -40,6 +40,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.ADAL.WinPhone.Dashboar
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.ADAL.WinPhone.Unit", "tests\Test.ADAL.WinPhone.Unit\Test.ADAL.WinPhone.Unit.csproj", "{95450CC4-3EF4-48A0-9589-01D16AF03BE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADAL.WinPhoneSL", "src\ADAL.WinPhoneSL\ADAL.WinPhoneSL.csproj", "{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.ADAL.WinPhoneSL.Dashboard", "tests\Test.ADAL.WinPhoneSL.Dashboard\Test.ADAL.WinPhoneSL.Dashboard.csproj", "{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -280,6 +284,60 @@ Global
{95450CC4-3EF4-48A0-9589-01D16AF03BE7}.Release|Win32.ActiveCfg = Release|Any CPU
{95450CC4-3EF4-48A0-9589-01D16AF03BE7}.Release|x64.ActiveCfg = Release|Any CPU
{95450CC4-3EF4-48A0-9589-01D16AF03BE7}.Release|x86.ActiveCfg = Release|Any CPU
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|ARM.ActiveCfg = Debug|ARM
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|ARM.Build.0 = Debug|ARM
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|Mixed Platforms.Build.0 = Debug|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|Win32.ActiveCfg = Debug|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|Win32.Build.0 = Debug|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|x64.ActiveCfg = Debug|Any CPU
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|x86.ActiveCfg = Debug|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Debug|x86.Build.0 = Debug|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|Any CPU.Build.0 = Release|Any CPU
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|ARM.ActiveCfg = Release|ARM
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|ARM.Build.0 = Release|ARM
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|Mixed Platforms.ActiveCfg = Release|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|Mixed Platforms.Build.0 = Release|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|Win32.ActiveCfg = Release|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|Win32.Build.0 = Release|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|x64.ActiveCfg = Release|Any CPU
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|x86.ActiveCfg = Release|x86
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB}.Release|x86.Build.0 = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|ARM.ActiveCfg = Debug|ARM
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|ARM.Build.0 = Debug|ARM
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|ARM.Deploy.0 = Debug|ARM
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Mixed Platforms.Build.0 = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Win32.ActiveCfg = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Win32.Build.0 = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|Win32.Deploy.0 = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|x64.ActiveCfg = Debug|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|x86.ActiveCfg = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|x86.Build.0 = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Debug|x86.Deploy.0 = Debug|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Any CPU.Build.0 = Release|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Any CPU.Deploy.0 = Release|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|ARM.ActiveCfg = Release|ARM
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|ARM.Build.0 = Release|ARM
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|ARM.Deploy.0 = Release|ARM
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Mixed Platforms.ActiveCfg = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Mixed Platforms.Build.0 = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Mixed Platforms.Deploy.0 = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Win32.ActiveCfg = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Win32.Build.0 = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|Win32.Deploy.0 = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|x64.ActiveCfg = Release|Any CPU
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|x86.ActiveCfg = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|x86.Build.0 = Release|x86
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -298,5 +356,7 @@ Global
{BDFC3241-0B81-47E2-94C1-A2D54F066E48} = {34FFBC9F-C270-4B10-98C8-F6882606DDFE}
{75653A95-6AD8-41B6-BB9A-073AC0189575} = {0A180C16-51EB-44E1-A9DF-6BC742E49C24}
{95450CC4-3EF4-48A0-9589-01D16AF03BE7} = {0A180C16-51EB-44E1-A9DF-6BC742E49C24}
{A74E3018-C5DD-48C8-A9E6-F0C65A82DBDB} = {34FFBC9F-C270-4B10-98C8-F6882606DDFE}
{DDF4E5E7-50A6-4932-BF6E-A9CCA394A29A} = {0A180C16-51EB-44E1-A9DF-6BC742E49C24}
EndGlobalSection
EndGlobal
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Active Directory Authentication Library (ADAL) for .NET, Windows Store and Windows Phone 8.1
# Active Directory Authentication Library (ADAL) for .NET, Windows Store, Windows Phone 8.1 and Windows Phone 8.1 Silverlight

Active Directory Authentication Library (ADAL) provides easy to use authentication functionality for your .NET client and Windows Store apps by taking advantage of Windows Server Active Directory and Windows Azure Active Directory.
Here you can find the source code for the library. You can find the corresponding releases (both stable and prerelease) on the NuGet gallery at [http://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/](http://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/).

- The latest stable release is [2.12.111071459](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/).
- The latest stable release is [2.14.201151115](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/).
-
- The next version of the library in prerelease form is also avialable on the NuGet gallery.
-
Expand Down Expand Up @@ -123,6 +123,17 @@ There is also a default event listener which writes logs to a local file named *
AdalTrace.Level = AdalTraceLevel.Informational;
```

#### Windows Phone Silverlight Applications

Since Silverlight does not support EventSource/EventListener, we use ```LoggingChannel/#Session``` for logging. There is a ```LoggingChannel``` in ```AdalTrace``` which you can connect your own ```LoggingSession/FileLoggingSession``` to it and also control trace level using it. Here is an example:

```
LoggingSession loggingSession = new LoggingSession("ADAL Logging Session");
loggingSession.AddLoggingChannel(AdalTrace.AdalLoggingChannel, LoggingLevel.Verbose);
```

and then use ```loggingSession.SaveToFileAsync(...)``` to copy the logs to a file. If you use emulator, you can then use ```ISETool.exe``` and ```tracerpt.exe``` tools to copy log file and convert it to text format.

### Network Traces

You can use various tools to capture the HTTP traffic that ADAL generates. This is most useful if you are familiar with the OAuth protocol or if you need to provide diagnostic information to Microsoft or other support channels.
Expand Down Expand Up @@ -160,6 +171,10 @@ All code is licensed under the Apache 2.0 license and we triage actively on GitH

* This project contains the source of ADAL for Windows Phone. ADAL for Windows Phone is packaged as a Windows Runtime Component (.winmd).

### ADAL.WinPhoneSL

* This project contains the source of ADAL for Windows Phone Silverlight.

### Test.ADAL.NET

* End to end tests for ADAL .NET.
Expand Down Expand Up @@ -188,6 +203,10 @@ All code is licensed under the Apache 2.0 license and we triage actively on GitH

* The Windows Phone application used for running ADAL for Windows Phone tests.

### Test.ADAL.WinPhoneSL.Dashboard

* The Windows Phone Silverlight application used for running ADAL for Windows Phone Silverlight tests.

### Test.ADAL.WinRT.Unit

* Unit tests for various components in ADAL for Windows Store as well as mock based tests for ADAL for Windows Store.
Expand Down
18 changes: 0 additions & 18 deletions build/Microsoft.IdentityModel.Clients.ActiveDirectory.nuspec

This file was deleted.

2 changes: 1 addition & 1 deletion src/ADAL.Common/AuthenticatorTemplateList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal class AuthenticatorTemplateList : List<AuthenticatorTemplate>
{
public AuthenticatorTemplateList()
{
string[] trustedHostList = { "login.windows.net", "login.chinacloudapi.cn", "login.cloudgovapi.us" };
string[] trustedHostList = { "login.windows.net", "login.chinacloudapi.cn", "login.cloudgovapi.us", "login.microsoftonline.com" };

string customAuthorityHost = PlatformSpecificHelper.GetEnvironmentVariable("customTrustedHost");
if (string.IsNullOrWhiteSpace(customAuthorityHost))
Expand Down
4 changes: 2 additions & 2 deletions src/ADAL.Common/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
[assembly: AssemblyCopyright("Copyright (c) Microsoft Open Technologies. All rights reserved.")]
[assembly: AssemblyTrademark("")]

[assembly: AssemblyVersion("2.13.0.0")]
[assembly: AssemblyVersion("2.14.0.0")]

// Keep major and minor versions in AssemblyFileVersion in sync with AssemblyVersion.
// Build and revision numbers are replaced on build machine for official builds.
[assembly: AssemblyFileVersion("2.13.00000.0000")]
[assembly: AssemblyFileVersion("2.14.00000.0000")]
// On official build, attribute AssemblyInformationalVersionAttribute is added as well
// with its value equal to the hash of the last commit to the git branch.
// e.g.: [assembly: AssemblyInformationalVersionAttribute("4392c9835a38c27516fc0cd7bad7bccdcaeab161")]
Expand Down
2 changes: 2 additions & 0 deletions src/ADAL.Common/RequestCreationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public void AddAdalIdParameters(IDictionary<string, string> parameters)
parameters[AdalIdParameter.OS] = Environment.OSVersion.ToString();

// Since ADAL .NET may be used on servers, for security reasons, we do not emit device type.
#elif SILVERLIGHT
parameters[AdalIdParameter.OS] = Environment.OSVersion.ToString();
#else
// In WinRT, there is no way to reliably get OS version. All can be done reliably is to check
// for existence of specific features which does not help in this case, so we do not emit OS in WinRT.
Expand Down
2 changes: 2 additions & 0 deletions src/ADAL.Common/TokenCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
//----------------------------------------------------------------------

using System;
#if !SILVERLIGHT
using System.Collections.Concurrent;
#endif
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Collections.Generic;
Expand Down
2 changes: 1 addition & 1 deletion src/ADAL.CommonWinRT/AdalTrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace Microsoft.IdentityModel.Clients.ActiveDirectory
{
/// <summary>
/// This class enables/disables tracing. To enable tracing, set TraceLevel to any level other than None which is the default
/// This class manages tracing in ADAL.
/// </summary>
public static class AdalTrace
{
Expand Down
32 changes: 1 addition & 31 deletions src/ADAL.CommonWinRT/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,42 +52,12 @@ internal static void SetListenerLevel(AdalTraceLevel level)
}
}

internal static void Verbose(CallState callState, string arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Verbose(callState, callerFilePath, "{0}", new object[] { arg });
}

internal static void Information(CallState callState, string arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Information(callState, callerFilePath, "{0}", new object[] { arg });
}

internal static void Information(CallState callState, string format, object arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Information(callState, callerFilePath, format, new [] { arg });
}

internal static void Information(CallState callState, string format, object arg, object arg2, object arg3, object arg4, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Information(callState, callerFilePath, format, new [] { arg, arg2, arg3, arg4 });
}

internal static void Warning(CallState callState, string arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Warning(callState, callerFilePath, "{0}", new object[] { arg });
}

internal static void Warning(CallState callState, string format, object arg, object arg2, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Warning(callState, callerFilePath, format, new[] { arg, arg2 });
}

internal static void Error(CallState callState, Exception ex, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
AdalEventSource.Error(PrepareLogMessage(callState, GetCallerFilename(callerFilePath), "{0}", ex));
}

private static void Verbose(CallState callState, string format, string callerFilePath, params object[] args)
private static void Verbose(CallState callState, string callerFilePath, string format, params object[] args)
{
AdalEventSource.Verbose(PrepareLogMessage(callState, GetCallerFilename(callerFilePath), format, args));
}
Expand Down
56 changes: 56 additions & 0 deletions src/ADAL.CommonWinStore/Logger.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//----------------------------------------------------------------------
// Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved
// Apache License 2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//----------------------------------------------------------------------

using System;

namespace Microsoft.IdentityModel.Clients.ActiveDirectory
{
internal partial class Logger
{
internal static void Verbose(CallState callState, string arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Verbose(callState, callerFilePath, "{0}", new object[] { arg });
}

internal static void Information(CallState callState, string arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Information(callState, callerFilePath, "{0}", new object[] { arg });
}

internal static void Information(CallState callState, string format, object arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Information(callState, callerFilePath, format, new [] { arg });
}

internal static void Information(CallState callState, string format, object arg, object arg2, object arg3, object arg4, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Information(callState, callerFilePath, format, new [] { arg, arg2, arg3, arg4 });
}

internal static void Warning(CallState callState, string arg, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Warning(callState, callerFilePath, "{0}", new object[] { arg });
}

internal static void Warning(CallState callState, string format, object arg, object arg2, [System.Runtime.CompilerServices.CallerFilePath] string callerFilePath = "")
{
Warning(callState, callerFilePath, format, new[] { arg, arg2 });
}

}
}
2 changes: 1 addition & 1 deletion src/ADAL.NET/AdalTrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Microsoft.IdentityModel.Clients.ActiveDirectory
{
/// <summary>
/// The class which contains trace related properties
/// This class manages tracing in ADAL.
/// </summary>
public static class AdalTrace
{
Expand Down
4 changes: 4 additions & 0 deletions src/ADAL.WinPhone/ADAL.WinPhone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
<Compile Include="..\ADAL.CommonWinRT\TokenCache.cs">
<Link>CommonWinRT\TokenCache.cs</Link>
</Compile>
<Compile Include="..\ADAL.CommonWinStore\Logger.cs">
<Link>CommonWinStore\Logger.cs</Link>
</Compile>
<Compile Include="..\ADAL.Common\AdalSilentTokenAcquisitionException.cs">
<Link>Common\AdalSilentTokenAcquisitionException.cs</Link>
</Compile>
Expand Down Expand Up @@ -230,6 +233,7 @@
<Compile Include="WebUI.cs" />
<Compile Include="WebUIFactory.cs" />
</ItemGroup>
<ItemGroup />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
Expand Down
Loading

0 comments on commit 223a3ff

Please # to comment.