-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathIOAuthClient.cs
50 lines (44 loc) · 1.43 KB
/
IOAuthClient.cs
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Text;
namespace RenRen.Plurk
{
/// <summary>
/// Defines methods to perform basic 3-step OAuth authentication process.
/// </summary>
public interface IOAuthClient
{
/// <summary>
/// Retrieves a temporary token from server and stores it in the client.
/// </summary>
void GetRequestToken();
/// <summary>
/// Retrieves authorization URL after a request token has been obtained.
/// </summary>
/// <returns>An URL pointing to the authorization page.</returns>
string GetAuthorizationUrl();
/// <summary>
/// Exchanges a temporary token for a permanent token using the specified verifier.
/// </summary>
/// <param name="verifier">The verifier provided by server after user granted access.</param>
void GetAccessToken(string verifier);
/// <summary>
/// Gets or sets the token container the client uses.
/// </summary>
IOAuthToken Token { get; set; }
}
/// <summary>
/// Defines properties to access OAuth token.
/// </summary>
public interface IOAuthToken
{
/// <summary>
/// Gets or sets the token.
/// </summary>
string Content { get; set; }
/// <summary>
/// Gets or sets the token secret.
/// </summary>
string Secret { get; set; }
}
}