diff options
Diffstat (limited to 'samples/OAuthServiceProvider/Code/Constants.cs')
-rw-r--r-- | samples/OAuthServiceProvider/Code/Constants.cs | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/samples/OAuthServiceProvider/Code/Constants.cs b/samples/OAuthServiceProvider/Code/Constants.cs index 168b952..3e629f0 100644 --- a/samples/OAuthServiceProvider/Code/Constants.cs +++ b/samples/OAuthServiceProvider/Code/Constants.cs @@ -1,30 +1,32 @@ -using System; -using DotNetOpenAuth.Messaging; -using DotNetOpenAuth.OAuth; -using DotNetOpenAuth.OAuth.ChannelElements; +namespace OAuthServiceProvider.Code { + using System; + using DotNetOpenAuth.Messaging; + using DotNetOpenAuth.OAuth; + using DotNetOpenAuth.OAuth.ChannelElements; -/// <summary> -/// Service Provider definitions. -/// </summary> -public static class Constants { - public static Uri WebRootUrl { get; set; } + /// <summary> + /// Service Provider definitions. + /// </summary> + public static class Constants { + public static Uri WebRootUrl { get; set; } - public static ServiceProviderDescription SelfDescription { - get { - ServiceProviderDescription description = new ServiceProviderDescription { - AccessTokenEndpoint = new MessageReceivingEndpoint(new Uri(WebRootUrl, "/OAuth.ashx"), HttpDeliveryMethods.PostRequest), - RequestTokenEndpoint = new MessageReceivingEndpoint(new Uri(WebRootUrl, "/OAuth.ashx"), HttpDeliveryMethods.PostRequest), - UserAuthorizationEndpoint = new MessageReceivingEndpoint(new Uri(WebRootUrl, "/OAuth.ashx"), HttpDeliveryMethods.PostRequest), - TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { + public static ServiceProviderDescription SelfDescription { + get { + ServiceProviderDescription description = new ServiceProviderDescription { + AccessTokenEndpoint = new MessageReceivingEndpoint(new Uri(WebRootUrl, "/OAuth.ashx"), HttpDeliveryMethods.PostRequest), + RequestTokenEndpoint = new MessageReceivingEndpoint(new Uri(WebRootUrl, "/OAuth.ashx"), HttpDeliveryMethods.PostRequest), + UserAuthorizationEndpoint = new MessageReceivingEndpoint(new Uri(WebRootUrl, "/OAuth.ashx"), HttpDeliveryMethods.PostRequest), + TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { new HmacSha1SigningBindingElement(), }, - }; + }; - return description; + return description; + } } - } - public static ServiceProvider CreateServiceProvider() { - return new ServiceProvider(SelfDescription, Global.TokenManager, Global.NonceStore); + public static ServiceProvider CreateServiceProvider() { + return new ServiceProvider(SelfDescription, Global.TokenManager, Global.NonceStore); + } } -} +}
\ No newline at end of file |