Permalink
Browse files

Add Twitter-style xAuth in a wrapper for the main OAuth library

  • Loading branch information...
1 parent f0b8f20 commit 12426e0546fce5f74100f97dbe3c2c7d9c9d2e02 @novemberborn novemberborn committed Jan 7, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 lib/oauth+xauth.js
View
@@ -0,0 +1,13 @@
+var oauth = require("./oauth");
+
+for(var p in oauth){
+ exports[p] = oauth[p];
+}
+
+exports.xauth = function(client, username, password, mode){
+ return client.obtainTokenCredentials("", "", "", {
+ x_auth_username: username,
+ x_auth_password: password,
+ x_auth_mode: mode
+ });
+};

0 comments on commit 12426e0

Please sign in to comment.