summaryrefslogtreecommitdiffstats
path: root/samples/ConsumerWpf/Constants.cs
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ConsumerWpf/Constants.cs')
-rw-r--r--samples/ConsumerWpf/Constants.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/samples/ConsumerWpf/Constants.cs b/samples/ConsumerWpf/Constants.cs
new file mode 100644
index 0000000..ecb3fec
--- /dev/null
+++ b/samples/ConsumerWpf/Constants.cs
@@ -0,0 +1,48 @@
+//-----------------------------------------------------------------------
+// <copyright file="Constants.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth.Samples.ConsumerWpf {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Web;
+ using DotNetOAuth;
+ using DotNetOAuth.ChannelElements;
+ using DotNetOAuth.Messaging;
+
+ /// <summary>
+ /// Service Provider definitions.
+ /// </summary>
+ public static class Constants {
+ /// <summary>
+ /// The Consumer to use for accessing Google data APIs.
+ /// </summary>
+ public static readonly ServiceProviderDescription GoogleDescription = new ServiceProviderDescription {
+ RequestTokenEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthGetRequestToken", HttpDeliveryMethod.AuthorizationHeaderRequest),
+ UserAuthorizationEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthAuthorizeToken", HttpDeliveryMethod.AuthorizationHeaderRequest),
+ AccessTokenEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthGetAccessToken", HttpDeliveryMethod.AuthorizationHeaderRequest),
+ TamperProtectionElements = new ITamperProtectionChannelBindingElement[] {
+ new HmacSha1SigningBindingElement(),
+ },
+ };
+
+ /// <summary>
+ /// Values of the "scope" parameter that indicates what data streams the Consumer
+ /// wants access to.
+ /// </summary>
+ public static class GoogleScopes {
+ /// <summary>
+ /// Access to the Gmail address book.
+ /// </summary>
+ public const string Contacts = "http://www.google.com/m8/feeds/";
+
+ /// <summary>
+ /// The URI to get contacts once authorization is granted.
+ /// </summary>
+ public static readonly MessageReceivingEndpoint GetContacts = new MessageReceivingEndpoint("http://www.google.com/m8/feeds/contacts/default/full/", HttpDeliveryMethod.GetRequest);
+ }
+ }
+} \ No newline at end of file