From 3b5d7a49d40421017511e865e518e8543022637f Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 17 Mar 2017 14:18:54 -0600 Subject: [PATCH] security and ui updates --- admin/public/index.html | 23 +++++++++++++++++++++-- admin/public/js/app.js | 11 +++++++++++ packages/assets/org.oauth3 | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/admin/public/index.html b/admin/public/index.html index 24b8ead..9f4d02b 100644 --- a/admin/public/index.html +++ b/admin/public/index.html @@ -148,6 +148,17 @@
+

Server Name:

+ + +

Addresses:

@@ -160,8 +171,16 @@ - - + + diff --git a/admin/public/js/app.js b/admin/public/js/app.js index ddb28fd..7aea7b1 100644 --- a/admin/public/js/app.js +++ b/admin/public/js/app.js @@ -1,7 +1,18 @@ angular.module('com.daplie.cloud', [ 'org.oauth3' ]) .service('oauth3', [ 'Oauth3', function (Oauth3) { + // for security this app should not store the refresh token + // (the localhost.* domains should never store them) + Oauth3.hooks.session._store = {}; + Oauth3.hooks.session._get = function (providerUri) { + return Oauth3.PromiseA.resolve(Oauth3.hooks.session._store[providerUri]); + }; + Oauth3.hooks.session._set = function (providerUri, session) { + Oauth3.hooks.session._store[providerUri] = session; + return Oauth3.PromiseA.resolve(session); + }; var auth = Oauth3.create(); auth.setProvider('oauth3.org'); + window.oauth3 = auth; // debug return auth; } ]) .controller('LoginController', [ '$scope', '$timeout', 'oauth3', function ($scope, $timeout, oauth3) { diff --git a/packages/assets/org.oauth3 b/packages/assets/org.oauth3 index 64393a5..b2a992d 160000 --- a/packages/assets/org.oauth3 +++ b/packages/assets/org.oauth3 @@ -1 +1 @@ -Subproject commit 64393a540d7cc60821aa1c541ef71101be418008 +Subproject commit b2a992d2d5d7ebef7ea0123127a2395ab89e01a2
InternetInternet +
OAuth3 Tunnel