summaryrefslogtreecommitdiffstats
path: root/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-08 16:22:58 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-08 16:22:58 -0700
commitd9c0ee017807cc17132e9c760d274afffc9b981c (patch)
tree28a79463a760a10c4d67cbac48f9a6af5cd25b32 /samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
parent1c3247abc8fb37405d0602e5037b3cebbe8e944a (diff)
downloadDotNetOpenAuth-d9c0ee017807cc17132e9c760d274afffc9b981c.zip
DotNetOpenAuth-d9c0ee017807cc17132e9c760d274afffc9b981c.tar.gz
DotNetOpenAuth-d9c0ee017807cc17132e9c760d274afffc9b981c.tar.bz2
Split up ITokenManager into two derived interfaces to better fit Consumer and Service Provider scenarios.
Diffstat (limited to 'samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs26
1 files changed, 1 insertions, 25 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
index c6f2b89..83196db 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
@@ -26,7 +26,7 @@ namespace DotNetOpenAuth.ApplicationBlock {
/// <summary>
/// The Consumer to use for accessing Google data APIs.
/// </summary>
- private static readonly ServiceProviderDescription GoogleDescription = new ServiceProviderDescription {
+ public static readonly ServiceProviderDescription ServiceDescription = new ServiceProviderDescription {
RequestTokenEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthGetRequestToken", HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest),
UserAuthorizationEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthAuthorizeToken", HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest),
AccessTokenEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthGetAccessToken", HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest),
@@ -69,30 +69,6 @@ namespace DotNetOpenAuth.ApplicationBlock {
}
/// <summary>
- /// Initializes a new instance of the <see cref="WebConsumer"/> class that is prepared to communicate with Google.
- /// </summary>
- /// <param name="tokenManager">The token manager.</param>
- /// <param name="consumerKey">The consumer key.</param>
- /// <returns>The newly instantiated <see cref="WebConsumer"/>.</returns>
- public static WebConsumer CreateWebConsumer(ITokenManager tokenManager, string consumerKey) {
- return new WebConsumer(GoogleDescription, tokenManager) {
- ConsumerKey = consumerKey,
- };
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="DesktopConsumer"/> class that is prepared to communicate with Google.
- /// </summary>
- /// <param name="tokenManager">The token manager.</param>
- /// <param name="consumerKey">The consumer key.</param>
- /// <returns>The newly instantiated <see cref="DesktopConsumer"/>.</returns>
- public static DesktopConsumer CreateDesktopConsumer(ITokenManager tokenManager, string consumerKey) {
- return new DesktopConsumer(GoogleDescription, tokenManager) {
- ConsumerKey = consumerKey,
- };
- }
-
- /// <summary>
/// Requests authorization from Google to access data from a set of Google applications.
/// </summary>
/// <param name="consumer">The Google consumer previously constructed using <see cref="CreateWebConsumer"/> or <see cref="CreateDesktopConsumer"/>.</param>