summaryrefslogtreecommitdiffstats
path: root/samples/Consumer/App_Code/Constants.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-10-02 09:52:17 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-02 09:52:17 -0700
commite414945b440325d6616c57e3baa5c818821f558a (patch)
tree28def1e31840bb66a9047daacb1bc51b0a8b6ef3 /samples/Consumer/App_Code/Constants.cs
parentdf5629e0149a262dcda8dfdb7652b67df77d6845 (diff)
downloadDotNetOpenAuth-e414945b440325d6616c57e3baa5c818821f558a.zip
DotNetOpenAuth-e414945b440325d6616c57e3baa5c818821f558a.tar.gz
DotNetOpenAuth-e414945b440325d6616c57e3baa5c818821f558a.tar.bz2
Added Consumer WPF and ASP.NET WebForms samples.
Diffstat (limited to 'samples/Consumer/App_Code/Constants.cs')
-rw-r--r--samples/Consumer/App_Code/Constants.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/samples/Consumer/App_Code/Constants.cs b/samples/Consumer/App_Code/Constants.cs
new file mode 100644
index 0000000..ecf76a8
--- /dev/null
+++ b/samples/Consumer/App_Code/Constants.cs
@@ -0,0 +1,40 @@
+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);
+ }
+}