Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing old login files

  • Loading branch information...
commit bd9f36f6a80f34ae8037a6ed9673a4032cd3896b 1 parent fa0046c
@brianking brianking authored
View
111 chrome/content/login.js
@@ -1,111 +0,0 @@
-/**
- *
- * The source code included in this file is licensed to you by Facebook under
- * the Apache License, Version 2.0. Accordingly, the following notice
- * applies to the source code included in this file:
- *
- * Copyright © 2012 Facebook, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License. You may obtain
- * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- */
-
-
-function debug(s) { dump('** login.js: [' + s + ']\n'); }
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-// load FacebookLoginClient code
-Cc['@mozilla.org/moz/jssubscript-loader;1']
- .getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript('chrome://facebook/content/facebook.js');
-
-var client = new FacebookLoginClient();
-var fbns = new Namespace( "http://api.facebook.com/1.0/" );
-
-var onPageLoad = function(event)
-{
- var doc = event.originalTarget; // doc is document that triggered "onload" event
-
- if (doc.location.href.indexOf("access_token") > 0)
- {
- accessToken = doc.location.hash.substring(1);
-
- alert(accessToken);
- }
-}
-
-function startup() {
- var browser = document.getElementById('facebook-login-body');
- browser.addEventListener("DOMContentLoaded", onPageLoad, true);
-
- if (client.fbSvc.loggedIn) {
- debug('already logged in!');
- window.close();
- } else if (!client.authToken) {
- debug('requesting token');
- try {
- client.callMethod('facebook.auth.createToken', [], function(req) {
- debug('received token response:');
- debug( req.responseText);
- client.authToken = req.xmldata;
- debug('token is: '+client.authToken);
- startup();
- });
- } catch (e) {
- debug('exception: ' + e);
- }
- } else {
-
-var login_base = 'https://www.facebook.com/dialog/oauth?client_id=117949738281674&redirect_uri=http://www.facebook.com/&scope=user_photos,&response_type=token';
-browser.setAttribute('src', login_base);
-
- /*
- var login_base = 'http://www.facebook.com/login.php?popup&v=1.0&api_key=';
- browser.setAttribute('src', login_base +
- client.fbSvc.apiKey + '&auth_token=' + client.authToken);
- */
-
- browser.style.display = '';
- document.getElementById('throbber-box').style.display = 'none';
- debug('loading login page');
- }
-}
-window.addEventListener('load', startup, false);
-
-function done() {
- debug('done()');
- if (!client.authToken) {
- window.close();
- return false;
- }
- debug(client.authToken);
- client.callMethod('facebook.auth.getSession', ['auth_token='+client.authToken], function(req) {
- debug('received session response:');
- debug(req.xmldata);
- var data = req.xmldata;
- var sessionKey = data.fbns::session_key;
- var sessionSecret = data.fbns::secret;
- var uid = data.fbns::uid;
- if (sessionKey && sessionSecret && uid) {
- client.fbSvc.sessionStart(sessionKey, sessionSecret, uid);
- client.authToken = null;
- debug('session: ' + sessionKey + ', uid: ' + uid + ', secret: ' + sessionSecret);
- }
- window.setTimeout('window.close()', 1);
- });
- // in case the request fails, let's just force a 4 second timeout
- window.setTimeout('window.close()', 4000);
- return false;
-}
-
-dump('loaded login.js');
View
36 chrome/content/login.xul
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
-
-<!DOCTYPE window SYSTEM "chrome://facebook/locale/login.dtd">
-
-<window id="facebook-login-window"
- title="&login.window.title;"
- onclose="return done();"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script src="chrome://facebook/content/login.js"/>
-
- <vbox id="throbber-box" flex="1000">
- <spacer flex="1"/>
- <toolbaritem align="center" pack="center">
- <button id="navigator-throbber" busy="true"/>
- <label value="&login.wait;"/>
- </toolbaritem>
- <spacer flex="1"/>
- </vbox>
- <browser id="facebook-login-body"
- style="display: none;"
- src=""
- type="content-primary"
- flex="1" />
- <hbox>
- <spacer flex="1" />
- <button id="facebook-login-done"
- class="dialog"
- label="&login.close;"
- oncommand="done()"/>
- <spacer flex="1" />
- </hbox>
-
-</window>
View
5 idl/facebook.idl
@@ -42,10 +42,7 @@ interface fbIFacebookService : nsISupports
readonly attribute AString secret;
readonly attribute AString accessToken;
- // login.xul is responsible for performing the login sequence. Once that
- // is finished, it should call sessionStart, which initiates the polling
- // process. If the session ever ends, the polling will stop until
- // sessionStart is called again. Aside from the facebook.auth methods,
+ // Aside from the facebook.auth methods,
// all other Facebook API calls should be done inside this service.
void sessionStartOAuth(in AString accessToken);
void sessionStart(in AString sessionKey, in AString sessionSecret, in AString uid);
View
4 install.rdf
@@ -5,7 +5,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>firefox@facebook.com</em:id>
- <em:version>1.7.3.4</em:version>
+ <em:version>1.8b1</em:version>
<em:type>2</em:type>
<!-- Front End MetaData -->
@@ -30,7 +30,7 @@
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.6</em:minVersion>
- <em:maxVersion>12.0a1</em:maxVersion>
+ <em:maxVersion>13.0a1</em:maxVersion>
</Description>
</em:targetApplication>
Please sign in to comment.
Something went wrong with that request. Please try again.