aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranekos2012-02-05 15:01:15 +0900
committeranekos2012-02-05 15:01:15 +0900
commit7cbe2e08ae13ef7fa81ed0a5600a7c5420b67290 (patch)
tree31a6dff674d0a315f251756263856c903410bb3a
parentfe4b2d2157a00e6d32961f771f03a9e729cf2d38 (diff)
downloadvimperator-plugins-7cbe2e08ae13ef7fa81ed0a5600a7c5420b67290.tar.bz2
Add livedoor
-rw-r--r--loginManager.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/loginManager.js b/loginManager.js
index 3e8a80d..dfdc450 100644
--- a/loginManager.js
+++ b/loginManager.js
@@ -175,6 +175,15 @@ var services = {
usernameField: "email",
passwordField: "password",
},
+ livedoor: {
+ NAME: "livedoor",
+ HOST: ["https://member.livedoor.com", "http://api.livedoor.com"],
+ URL: /^https?:\/\/(?:\w+\.)?livedoor\.com\//,
+ LOGIN: "/login/?.sv=top",
+ LOGOUT: "/logout/", /* FIXME not works */
+ usernameField: "livedoor_id",
+ passwordField: "password",
+ },
};
for (let [name, service] in Iterator(services)){
if (!service.NAME)
@@ -243,6 +252,7 @@ function Service(service) //{{{
if (service.extraField && !self.setExtraField(content)) return false;
let loginURL = host+service.LOGIN;
+ liberator.log(loginURL);
let error = function(e) liberator.echo('login failed "'+host+'" as '+username);
let success = function(e) liberator.echo('login "'+host+'" as '+username);
let login = function() request(loginURL, content, success, error);