diff options
author | Microsoft <aspnet@microsoft.com> | 2012-05-07 09:49:47 -0700 |
---|---|---|
committer | Microsoft <aspnet@microsoft.com> | 2012-05-07 09:49:47 -0700 |
commit | b6dff7d1a6b5b07450b82688ec4727b3e2617ff5 (patch) | |
tree | 843119d4ad21e63254704b2c075ee773d23c8c8f /src | |
parent | 571fd87d0369953ee16331fdae9b09ae04e0db25 (diff) | |
download | DotNetOpenAuth-b6dff7d1a6b5b07450b82688ec4727b3e2617ff5.zip DotNetOpenAuth-b6dff7d1a6b5b07450b82688ec4727b3e2617ff5.tar.gz DotNetOpenAuth-b6dff7d1a6b5b07450b82688ec4727b3e2617ff5.tar.bz2 |
Add the WindowsLiveClient class back and make it inherit from MicrosoftClient. Also marks it as obsolete.
Diffstat (limited to 'src')
3 files changed, 43 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/MicrosoftClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/MicrosoftClient.cs index add3231..5ac5591 100644 --- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/MicrosoftClient.cs +++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/MicrosoftClient.cs @@ -12,9 +12,9 @@ namespace DotNetOpenAuth.AspNet.Clients { using DotNetOpenAuth.Messaging; /// <summary> - /// The windows live client. + /// The Microsoft account client. /// </summary> - public sealed class MicrosoftClient : OAuth2Client { + public class MicrosoftClient : OAuth2Client { #region Constants and Fields /// <summary> @@ -51,7 +51,17 @@ namespace DotNetOpenAuth.AspNet.Clients { /// The app secret. /// </param> public MicrosoftClient(string appId, string appSecret) - : base("windowslive") { + : this("microsoft", appId, appSecret) { + } + + /// <summary> + /// Initializes a new instance of the <see cref="MicrosoftClient"/> class. + /// </summary> + /// <param name="providerName">The provider name.</param> + /// <param name="appId">The app id.</param> + /// <param name="appSecret">The app secret.</param> + protected MicrosoftClient(string providerName, string appId, string appSecret) + : base(providerName) { Requires.NotNullOrEmpty(appId, "appId"); Requires.NotNullOrEmpty(appSecret, "appSecret"); @@ -163,4 +173,4 @@ namespace DotNetOpenAuth.AspNet.Clients { #endregion } -} +}
\ No newline at end of file diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs new file mode 100644 index 0000000..5441ce5 --- /dev/null +++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs @@ -0,0 +1,28 @@ +//----------------------------------------------------------------------- +// <copyright file="WindowsLiveClient.cs" company="Microsoft"> +// Copyright (c) Microsoft. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- + +namespace DotNetOpenAuth.AspNet.Clients { + using System; + + /// <summary> + /// The WindowsLive client. + /// </summary> + /// <remarks> + /// The WindowsLive brand is being replaced by Microsoft account brand. + /// We keep this class for backward compatibility only. + /// </remarks> + [Obsolete("Use the MicrosoftClient class.")] + public sealed class WindowsLiveClient : MicrosoftClient { + /// <summary> + /// Initializes a new instance of the <see cref="WindowsLiveClient"/> class. + /// </summary> + /// <param name="appId">The app id.</param> + /// <param name="appSecret">The app secret.</param> + public WindowsLiveClient(string appId, string appSecret) : + base("windowslive", appId, appSecret) { + } + } +}
\ No newline at end of file diff --git a/src/DotNetOpenAuth.AspNet/DotNetOpenAuth.AspNet.csproj b/src/DotNetOpenAuth.AspNet/DotNetOpenAuth.AspNet.csproj index 821e63c..8779ddc 100644 --- a/src/DotNetOpenAuth.AspNet/DotNetOpenAuth.AspNet.csproj +++ b/src/DotNetOpenAuth.AspNet/DotNetOpenAuth.AspNet.csproj @@ -42,6 +42,7 @@ <ItemGroup> <Compile Include="AuthenticationResult.cs" /> <Compile Include="Clients\DictionaryExtensions.cs" /> + <Compile Include="Clients\OAuth2\WindowsLiveClient.cs" /> <Compile Include="Clients\OAuth\AuthenticationOnlyCookieOAuthTokenManager.cs"> <SubType>Code</SubType> </Compile> |