summaryrefslogtreecommitdiffstats
path: root/samples/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs
diff options
context:
space:
mode:
authorAndrás Fuchs <andras.fuchs@gmail.com>2013-05-26 07:54:53 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2013-05-26 07:54:53 -0700
commit2a4da5e544a22d30d5b54a2696194d814d9a442f (patch)
treeed76c7421e9669bbf263381139a29afb8eb23433 /samples/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs
parent85c21ae12f04cc50a0478cf69c82d441da23d002 (diff)
downloadDotNetOpenAuth-2a4da5e544a22d30d5b54a2696194d814d9a442f.zip
DotNetOpenAuth-2a4da5e544a22d30d5b54a2696194d814d9a442f.tar.gz
DotNetOpenAuth-2a4da5e544a22d30d5b54a2696194d814d9a442f.tar.bz2
Samples improvements
The part which I needed to improve is the ApplicationBlock where I changed the OAuth2 classes' structure a little and extended them with a lot of useful functionality, like adding many Facebook and WindowsLive scopes, fields, structures including the asked-by-many easy to use birthdate and avatar url getters. I have also implemented the Google OAuth2 authentication and created one common interface for all 3 Graphs in the code (which has the common properties like Id, FirstName, LastName, etc.), so the authentication code became really simple if you use my version of your ApplicationBlock.
Diffstat (limited to 'samples/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs51
1 files changed, 0 insertions, 51 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs b/samples/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs
deleted file mode 100644
index a2e1058..0000000
--- a/samples/DotNetOpenAuth.ApplicationBlock/WindowsLiveClient.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-//-----------------------------------------------------------------------
-// <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) {
- }
-
- /// <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";
- }
- }
-}