~mardy/account-plugins/lp1180297

« back to all changes in this revision

Viewing changes to src/sina.vala

  • Committer: Tarmac
  • Author(s): Alberto Mardegan
  • Date: 2013-03-19 08:26:40 UTC
  • mfrom: (89.2.6 no-hardcoded-data)
  • Revision ID: tarmac-20130319082640-i78kr22tgbn2vl52
Move most of the authentication settings to the .provider files.

Approved by PS Jenkins bot, David King.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    construct
28
28
    {
29
29
        var oauth_params = new HashTable<string, GLib.Value?> (str_hash, null);
30
 
        oauth_params.insert ("RequestEndpoint",
31
 
                             "http://api.t.sina.com.cn/oauth/request_token");
32
 
        oauth_params.insert ("TokenEndpoint",
33
 
                             "http://api.t.sina.com.cn/oauth/access_token");
34
 
        oauth_params.insert ("AuthorizationEndpoint",
35
 
                             "http://api.t.sina.com.cn/oauth/authorize");
36
30
        oauth_params.insert ("ConsumerKey", Config.SINA_CONSUMER_KEY);
37
31
        oauth_params.insert ("ConsumerSecret", Config.SINA_CONSUMER_SECRET);
38
 
        oauth_params.insert ("Callback", "http://www.ubuntu.com/");
39
 
        string[] schemes = {
40
 
            "https",
41
 
            "http"
42
 
        };
43
 
        oauth_params.insert ("AllowedSchemes", schemes);
44
32
        set_oauth_parameters (oauth_params);
45
33
 
46
34
        set_mechanism (Ap.OAuthMechanism.HMAC_SHA1);