diff options
author | David Christiansen <coding@davedoes.net> | 2012-03-15 22:10:55 +0000 |
---|---|---|
committer | David Christiansen <coding@davedoes.net> | 2012-03-15 22:10:55 +0000 |
commit | a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f (patch) | |
tree | a3057157fa3287e0c0c4cc49be1854f9aa63d321 /src/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs | |
parent | 02ce959db12fec57e846e5ebfa662cd0327ce69c (diff) | |
download | DotNetOpenAuth.Samples-a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f.zip DotNetOpenAuth.Samples-a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f.tar.gz DotNetOpenAuth.Samples-a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f.tar.bz2 |
W.I.P.
* Initial migration and reference to DNOA Nuget packages (From teamcity.dotnetopenauth.net)
* Awaiting fix to DotNetOpenAuth.OpenIdOAuth.nuspec in order to complete migration.
Diffstat (limited to 'src/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs')
-rw-r--r-- | src/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs b/src/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs new file mode 100644 index 0000000..be0a650 --- /dev/null +++ b/src/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs @@ -0,0 +1,52 @@ +//----------------------------------------------------------------------- +// <copyright file="WindowsLiveClient.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- + +namespace DotNetOpenAuth.ApplicationBlock { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using DotNetOpenAuth.OAuth2; + + public class WindowsLiveClient : WebServerClient { + private static readonly AuthorizationServerDescription WindowsLiveDescription = new AuthorizationServerDescription { + TokenEndpoint = new Uri("https://oauth.live.com/token"), + AuthorizationEndpoint = new Uri("https://oauth.live.com/authorize"), + }; + + /// <summary> + /// Initializes a new instance of the <see cref="WindowsLiveClient"/> class. + /// </summary> + public WindowsLiveClient() + : base(WindowsLiveDescription) { + this.AuthorizationTracker = new TokenManager(); + } + + /// <summary> + /// Well-known scopes defined by the Windows Live service. + /// </summary> + /// <remarks> + /// This sample includes just a few scopes. For a complete list of scopes please refer to: + /// http://msdn.microsoft.com/en-us/library/hh243646.aspx + /// </remarks> + public static class Scopes { + /// <summary> + /// The ability of an app to read and update a user's info at any time. Without this scope, an app can access the user's info only while the user is signed in to Live Connect and is using your app. + /// </summary> + public const string OfflineAccess = "wl.offline_access"; + + /// <summary> + /// Single sign-in behavior. With single sign-in, users who are already signed in to Live Connect are also signed in to your website. + /// </summary> + public const string SignIn = "wl.signin"; + + /// <summary> + /// Read access to a user's basic profile info. Also enables read access to a user's list of contacts. + /// </summary> + public const string Basic = "wl.basic"; + } + } +} |