diff --git a/index.html b/index.html
index c06650f..55404dd 100644
--- a/index.html
+++ b/index.html
@@ -1,5 +1,5 @@
-
+
diff --git a/js/controllers/login-controller.js b/js/controllers/login-controller.js
index 56f294e..6e32e47 100644
--- a/js/controllers/login-controller.js
+++ b/js/controllers/login-controller.js
@@ -4,6 +4,7 @@ app.controller('loginCtrl', [
var vm = this;
+ vm.currentPath = $location.url().substr(1);
vm.independentIssuer = false;
vm.oauth3 = Oauth3.oauth3 = Oauth3.oauth3 || Oauth3.create(location);
vm.timers = {};
@@ -122,6 +123,10 @@ app.controller('loginCtrl', [
vm.newIssuer = vm.defaultIssuer;
vm.setIssuer(vm.defaultIssuer);
+ vm.initGetSession = function() {
+ return Auth.select(Auth.session);
+ }
+
vm.initListLoggedInProfiles = function () {
vm.activeProfiles = Auth.getActiveSessions();
};
@@ -136,6 +141,7 @@ app.controller('loginCtrl', [
};
vm.signOut = function () {
+
// TODO the sign-out url for each account should be fixed.
return Auth.signOut().then(function () {
if (Auth.sessions.length === 0) {
diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js
index 3911950..eeea18a 100644
--- a/js/controllers/website-controller.js
+++ b/js/controllers/website-controller.js
@@ -32,7 +32,7 @@ app.controller('websiteCtrl', [
return $q.all(Auth.sessions.map(function (session) {
return Auth.select(session).then(function (oauth3) {
-
+ console.log('asdf');
return oauth3.api(apiname, {}).then(function (collection) {
if (collection.error) {
diff --git a/js/services/auth-service.js b/js/services/auth-service.js
index 4c4b4c4..6979c6a 100644
--- a/js/services/auth-service.js
+++ b/js/services/auth-service.js
@@ -64,12 +64,11 @@ app.factory('Auth', [
Auth.sessions.push(session);
});
-
return Auth.session;
}
, select: function (session) {
if (!session.issuer) {
- throw new Error("session doesn't have an issuer");;
+ throw new Error("session doesn't have an issuer");
}
var name = session.token.sub + '@' + session.token.iss;
@@ -105,7 +104,6 @@ app.factory('Auth', [
, signOut: function () {
var session = Auth.session;
var dapName = 'dap-' + session.subject + '|' + session.issuer;
-
// TODO logout url should be created upon login and remain fixed throughout the duration of the session (or on session restoration)
return Auth.oauth3.logout().then(function () {
var obj = JSON.parse(localStorage.getItem(dapSessions) || '{}');
diff --git a/js/www@daplie.com.js b/js/www@daplie.com.js
index 061c87c..59f87e6 100644
--- a/js/www@daplie.com.js
+++ b/js/www@daplie.com.js
@@ -7,7 +7,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
add: function (opts) {
var providerUri = opts.audience;
var session = opts.session;
-
+ debugger;
return OAUTH3.request({
method: 'POST'
, url: OAUTH3.url.normalize(providerUri)
diff --git a/templates/account-settings.html b/templates/account-settings.html
index d6fe426..1e0510c 100644
--- a/templates/account-settings.html
+++ b/templates/account-settings.html
@@ -60,7 +60,7 @@
Use Account