Ver Fonte

Disable authentication for now

Ryan McCue há 12 anos atrás
pai
commit
ab077a9fe2
1 ficheiros alterados com 17 adições e 1 exclusões
  1. 17 1
      js/app.js

+ 17 - 1
js/app.js

@@ -17,10 +17,26 @@
     }
     var c = config;
 
+    // var signRequest = function (opts) {
+    //   var auth = {
+    //     "client_key": config.client_key,
+    //     "client_secret": config.client_secret,
+    //     "token_key": opts.token_key || null,
+    //     "token_secret": options.token_secret || null,
+    //   };
+
+    //   var params = opts.data;
+    //   if ( )
+    // };
+
     $( '#auth a' ).click( function(e) {
       e.preventDefault();
 
-      window.location = "https://public-api.wordpress.com/oauth2/authorize/?client_id=" + config.client_id + '&redirect_uri=' + encodeURIComponent ( config.redirect_uri ) + '&response_type=token';
+      // $.ajax(signRequest({
+        // "url": config.api_url + "/oauth1/request",
+      // }));
+
+      // window.location = "https://public-api.wordpress.com/oauth1/authorize/?client_id=" + config.client_id + '&redirect_uri=' + encodeURIComponent ( config.redirect_uri ) + '&response_type=token';
     } );
 
     if ( wpConsole.access_token && wpConsole.site_id ) {