From e1701ffdd96ecc0d31ec48399c09e3579d993aae Mon Sep 17 00:00:00 2001 From: aj Date: Mon, 23 Oct 2017 23:13:05 +0000 Subject: [PATCH 1/8] checkout v1.2 to match current branch --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 6990075..00deaaf 100755 --- a/install.sh +++ b/install.sh @@ -9,7 +9,7 @@ if ! [ -d ./assets/oauth3.org ]; then git clone https://git.daplie.com/OAuth3/oauth3.js.git ./assets/oauth3.org fi pushd ./assets/oauth3.org - git checkout v1 + git checkout v1.2 git pull popd From 40bfe2e5349af2ae9e6d862ac91a7e3aae5dc4ec Mon Sep 17 00:00:00 2001 From: John Shaver Date: Tue, 7 Nov 2017 14:23:26 -0700 Subject: [PATCH 2/8] Clicking grant labels now correctly toggles the check mark. --- js/script.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/js/script.js b/js/script.js index 2f567ba..3a39100 100644 --- a/js/script.js +++ b/js/script.js @@ -47,25 +47,28 @@ $('body').on('click', '.js-remember-label', function (ev) { $('body').on('click', '.check', function () { 'use strict'; - var $img = $(this); - if($img.attr("src") === "./img/pressed-check.png") { - $img.attr("src", "./img/unpressed-check.png"); - $img.removeClass("is-checked"); - } else if($img.attr("src") === "./img/unpressed-check.png") { - $img.attr("src", "./img/pressed-check.png"); - $img.addClass("is-checked"); - } }); $('body').on('click', '.js-auth-li-enabled', function (ev) { 'use strict'; ev.preventDefault(); ev.stopPropagation(); + + var $this = $(this); - if ($this.find('.js-auth-checkbox').is(':checked') === true) { - $this.find('.js-auth-checkbox').prop( "checked", false ); + var $hiddenCheckbox = $this.find('.js-auth-checkbox'); + var $img = $this.find('.check'); + var newStatus = $hiddenCheckbox.prop('checked') ? "unchecked" : "checked"; + + if(newStatus === 'checked') { + + $img.attr('src', './img/pressed-check.png'); + $img.addClass("is-checked"); + $hiddenCheckbox.prop( "checked", true ); } else { - $this.find('.js-auth-checkbox').prop( "checked", true ); + $img.attr("src", "./img/unpressed-check.png"); + $img.removeClass("is-checked"); + $hiddenCheckbox.prop( "checked", false ); } }); From ad454ba7b6ec9bc00557518375d2fd7cfb89dd5c Mon Sep 17 00:00:00 2001 From: John Shaver Date: Tue, 7 Nov 2017 14:37:50 -0700 Subject: [PATCH 3/8] The grant checkboxes are now initialing correctly --- js/issuer.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/issuer.js b/js/issuer.js index 08e898d..3fe4572 100644 --- a/js/issuer.js +++ b/js/issuer.js @@ -164,8 +164,13 @@ $(function () { $scope.find('.js-scope-desc').text(grantDescriptions[scope]); } else { - $scope.find('.js-scope-toggle').prop('checked', false); - $scope.find('.js-scope-toggle').prop('disabled', true); + //This disables the check/checkbox when we have an unrecognized grant. + //This is disabled for testing until we can discover grants automatically. + //TODO: Enable this when grants are discoverable + //TODO: Indicate to user that this is disabled, not just unchecked. + //$scope.find('.js-scope-toggle').prop('checked', false); + //$scope.find('.check').attr("src", "./img/unpressed-check.png"); + //$scope.find('.js-scope-toggle').prop('disabled', true); $scope.find('.js-scope-desc').text(scope); } From e4a84ea0b5e9c718b9c5e9e9dcc40dead962b91c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 8 Nov 2017 21:55:04 +0000 Subject: [PATCH 4/8] begin token inspector --- css/daplie-installer-overrides.css | 4 --- index.html | 46 +++++++++++++++++++++++++++++- js/app.js | 2 +- js/issuer.js | 9 +++++- 4 files changed, 54 insertions(+), 7 deletions(-) diff --git a/css/daplie-installer-overrides.css b/css/daplie-installer-overrides.css index a00cb00..c8312a2 100644 --- a/css/daplie-installer-overrides.css +++ b/css/daplie-installer-overrides.css @@ -12,10 +12,6 @@ html, body { background-color: #282828; color: #FFFFFF; } -/*override bootstrap fade*/ -.fade { - opacity: 1; -} input.emailInput::placeholder { font-family : Brown Regular; font-size : 14px; diff --git a/index.html b/index.html index 90de3b5..e4deeb5 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,8 @@ - + +
@@ -139,6 +140,49 @@
+ + +
+
+
+

OAuth3 Playground

+
+ +
+
+ Login Status: +
+
+ ... +
+
+
+
+ Current Sessions: +
+
+ ... +
+
+
+
+ Approved Devices: +
+
+ ... +
+
+
+
+ Approved Applications: +
+
+ ... +
+
+ +
+
diff --git a/js/app.js b/js/app.js index a4b9139..a069840 100644 --- a/js/app.js +++ b/js/app.js @@ -10,7 +10,7 @@ $(function () { var auth = OAUTH3.create(); auth.init().then(function () { - $('body').addClass('in'); + $('.mock-main').addClass('in'); }); auth.setProvider(providerUri).then(function () { diff --git a/js/issuer.js b/js/issuer.js index 3fe4572..cf669d0 100644 --- a/js/issuer.js +++ b/js/issuer.js @@ -393,6 +393,13 @@ $(function () { $('.js-logout-container').show(); } - $('body').addClass('in'); + if (document.location.hash.slice(1) || document.location.search) { + console.log('[DEBUG] search:', document.location.search); + console.log('[DEBUG] hash:', document.location.search); + $('.mock-main').addClass('in'); + } else { + console.log('[DEBUG] not an auth window'); + $('.mock-bare').addClass('in'); + } }); }); From ff5c13f3fcd3a8a395351941d7cfab59df9952d7 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 10 Nov 2017 12:12:38 -0700 Subject: [PATCH 5/8] add standard files --- CHANGELOG | 5 +++++ LICENSE | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 CHANGELOG create mode 100644 LICENSE diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..1c5e665 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,5 @@ +v1.2.1 - Authorization Dialog for ID Issuer + * Resource Owner Password token exchange + * Public / Private Keypair generation + * Public key (remember device) syncing + * BUG: Remember me is not operational diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6297ea2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,41 @@ +Copyright 2017 Daplie, Inc + +This is open source software; you can redistribute it and/or modify it under the +terms of either: + + a) the "MIT License" + b) the "Apache-2.0 License" + +MIT License + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +Apache-2.0 License Summary + + 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. From 426d6a4cbe1bf20835ec2e9b61c9e4b7dfef5226 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 10 Nov 2017 12:17:36 -0700 Subject: [PATCH 6/8] update paths and urls --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7c072a2..3d8ba7a 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,29 @@ -This is a WALNUT module representing the html package for the oauth3.org popup. +issuer.html +=========== -It must be installed to `/srv/walnut/packages/pages/issuer@oauth3.org` +| [oauth3.js](https://git.oauth3.org/OAuth3/oauth3.js) +| *issuer.html* +| [issuer.rest.walnut.js](https://git.oauth3.org/OAuth3/issuer.rest.walnut.js) +| Sponsored by [Daplie](https://daplie.com) + + +This is a browser application which implements the issuer side of the *authorization_dialog* flow for OAuth3. + +It may be used client-side only (public key or granted scope syncing will be disabled), +or will the *issuer.rest.walnut.js* APIs on the backend for full functionality. + +For use with walnut it must be installed to `/opt/walnut/packages/pages/issuer@oauth3.org` ```bash -git clone git@git.daplie.com:OAuth3/org.oauth3.git /srv/walnut/packages/pages/issuer@oauth3.org -pushd /srv/walnut/packages/pages/issuer@oauth3.org +git clone git@git.oauth3.org:OAuth3/org.oauth3.git /opt/walnut/packages/pages/issuer@oauth3.org +pushd /opt/walnut/packages/pages/issuer@oauth3.org bash ./install.sh popd ``` ```bash -echo "issuer@oauth3.org" >> /srv/walnut/packages/sites/EXAMPLE.COM +echo "issuer@oauth3.org" >> /opt/walnut/var/sites/EXAMPLE.COM ``` This uses the OAuth3 JavaScript SDK `oauth3.js` as a subpackage in -`/srv/walnut/packages/pages/issuer@oauth3.org/assets/oauth3.org`. +`/opt/walnut/packages/pages/issuer@oauth3.org/assets/oauth3.org`. From 8c09dccd2e7bb1ea1f2f014417de05835c88c9b5 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 10 Nov 2017 12:21:40 -0700 Subject: [PATCH 7/8] update urls --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 00deaaf..443a3fa 100755 --- a/install.sh +++ b/install.sh @@ -2,11 +2,12 @@ set -e set -u -# git clone https://git.daplie.com/OAuth3/org.oauth3.git /srv/walnut/packages/pages/azp@oauth3.org +# git clone https://git.oauth3.org/OAuth3/issuer.html.git /srv/walnut/packages/pages/issuer@oauth3.org +# git clone https://git.oauth3.org/OAuth3/azp.html.git /srv/walnut/packages/pages/azp@oauth3.org mkdir -p assets if ! [ -d ./assets/oauth3.org ]; then - git clone https://git.daplie.com/OAuth3/oauth3.js.git ./assets/oauth3.org + git clone https://git.oauth3.org/OAuth3/oauth3.js.git ./assets/oauth3.org fi pushd ./assets/oauth3.org git checkout v1.2 From a2ecd36db405e74b6de136d3a99482d3f1df1b4f Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 13 Nov 2017 11:27:50 -0700 Subject: [PATCH 8/8] update urls --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3d8ba7a..4f2b209 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ issuer.html | [oauth3.js](https://git.oauth3.org/OAuth3/oauth3.js) | *issuer.html* | [issuer.rest.walnut.js](https://git.oauth3.org/OAuth3/issuer.rest.walnut.js) +| [issuer.srv](https://git.oauth3.org/OAuth3/issuer.srv) | Sponsored by [Daplie](https://daplie.com)