From ef25e736d55a322f27a37c557540ea0930cd83f2 Mon Sep 17 00:00:00 2001
From: Matthew Arbesfeld
Date: Thu, 28 Aug 2014 17:24:58 -0700
Subject: [PATCH] wip towards oauth
---
packages/oauth/end_of_popup_response.html | 12 +++-
packages/oauth/oauth_browser.js | 62 +++++++++++++++++++++
packages/oauth/oauth_client.js | 68 ++---------------------
packages/oauth/oauth_cordova.js | 44 +++++++++++++++
packages/oauth/oauth_server.js | 6 +-
packages/oauth/package.js | 8 ++-
packages/standard-app-packages/package.js | 4 ++
7 files changed, 135 insertions(+), 69 deletions(-)
create mode 100644 packages/oauth/oauth_browser.js
create mode 100644 packages/oauth/oauth_cordova.js
diff --git a/packages/oauth/end_of_popup_response.html b/packages/oauth/end_of_popup_response.html
index f4480867d3..e497038e7f 100644
--- a/packages/oauth/end_of_popup_response.html
+++ b/packages/oauth/end_of_popup_response.html
@@ -4,6 +4,14 @@
if (##SET_CREDENTIAL_TOKEN##) {
var credentialToken = ##TOKEN##;
var credentialSecret = ##SECRET##;
+
+ var credentialString = JSON.stringify({
+ credentialToken: credentialToken,
+ credentialSecret: credentialSecret
+ });
+
+ window.location.hash = credentialString;
+
if (window.opener && window.opener.Package &&
window.opener.Package.oauth) {
window.opener.Package.oauth.OAuth._handleCredentialSecret(
@@ -17,7 +25,7 @@
}
}
}
- window.close();
+ //window.close();
@@ -25,7 +33,5 @@
Login completed.
Click here to close this window.
-