blob: 3e629f001f4464de9831adb7736c4f7beb9d5b87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
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; }
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;
}
}
public static ServiceProvider CreateServiceProvider() {
return new ServiceProvider(SelfDescription, Global.TokenManager, Global.NonceStore);
}
}
}
|