From cdf6107b25c23cddcfad674e701605da3e832643 Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Tue, 12 May 2015 20:09:31 -0400 Subject: [PATCH] reverted changes related to UMA server --- .../src/main/resources/db/clients.sql | 14 +-- .../src/main/resources/db/scopes.sql | 4 +- .../webapp/WEB-INF/application-context.xml | 20 +--- .../main/webapp/WEB-INF/tags/actionmenu.tag | 1 - .../src/main/webapp/WEB-INF/tags/footer.tag | 1 - .../src/main/webapp/WEB-INF/user-context.xml | 97 +------------------ .../src/main/webapp/resources/js/admin.js | 59 +---------- .../resources/js/locale/en/messages.json | 29 +----- pom.xml | 7 +- 9 files changed, 13 insertions(+), 219 deletions(-) diff --git a/openid-connect-server-webapp/src/main/resources/db/clients.sql b/openid-connect-server-webapp/src/main/resources/db/clients.sql index cb8a6c236..7e7a8a53d 100644 --- a/openid-connect-server-webapp/src/main/resources/db/clients.sql +++ b/openid-connect-server-webapp/src/main/resources/db/clients.sql @@ -11,9 +11,7 @@ START TRANSACTION; -- INSERT INTO client_details_TEMP (client_id, client_secret, client_name, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds, allow_introspection) VALUES - ('client', 'secret', 'Test Client', false, null, 3600, 600, true), - ('rs', 'secret', 'Test UMA RS', false, null, null, 600, false), - ('c', 'secret', 'Test UMA Client', false, null, null, 600, false); + ('client', 'secret', 'Test Client', false, null, 3600, 600, true); INSERT INTO client_scope_TEMP (owner_id, scope) VALUES ('client', 'openid'), @@ -21,9 +19,7 @@ INSERT INTO client_scope_TEMP (owner_id, scope) VALUES ('client', 'email'), ('client', 'address'), ('client', 'phone'), - ('client', 'offline_access'), - ('rs', 'uma_protection'), - ('c', 'uma_authorization'); + ('client', 'offline_access'); INSERT INTO client_redirect_uri_TEMP (owner_id, redirect_uri) VALUES ('client', 'http://localhost/'), @@ -33,11 +29,7 @@ INSERT INTO client_grant_type_TEMP (owner_id, grant_type) VALUES ('client', 'authorization_code'), ('client', 'urn:ietf:params:oauth:grant_type:redelegate'), ('client', 'implicit'), - ('client', 'refresh_token'), - ('rs', 'authorization_code'), - ('rs', 'implicit'), - ('c', 'authorization_code'), - ('c', 'implicit'); + ('client', 'refresh_token'); -- -- Merge the temporary clients safely into the database. This is a two-step process to keep clients from being created on every startup with a persistent store. diff --git a/openid-connect-server-webapp/src/main/resources/db/scopes.sql b/openid-connect-server-webapp/src/main/resources/db/scopes.sql index e0345dce0..27792880f 100644 --- a/openid-connect-server-webapp/src/main/resources/db/scopes.sql +++ b/openid-connect-server-webapp/src/main/resources/db/scopes.sql @@ -16,9 +16,7 @@ INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_sco ('email', 'email address', 'envelope', false, true, false, null), ('address', 'physical address', 'home', false, true, false, null), ('phone', 'telephone number', 'bell', false, true, false, null), - ('offline_access', 'offline access', 'time', false, false, false, null), - ('uma_protection', 'manage protected resources', 'briefcase', false, false, false, null), - ('uma_authorization', 'request access to protected resources', 'share', false, false, false, null); + ('offline_access', 'offline access', 'time', false, false, false, null); -- -- Merge the temporary scopes safely into the database. This is a two-step process to keep scopes from being created on every startup with a persistent store. diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml b/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml index 836ec75d6..ea1cf3fc8 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml @@ -119,24 +119,6 @@ - - - - - - - - - - - - - - - - - - @@ -154,7 +136,7 @@ create-session="stateless" authentication-manager-ref="clientAuthenticationManager"> - + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag index 47df4a361..d391a30ad 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag @@ -14,7 +14,6 @@
  • -
  • diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag index d5888ef7c..a089cc2bb 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag @@ -30,7 +30,6 @@ - diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml b/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml index edddd37cf..54b8b5a9b 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml @@ -29,97 +29,6 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - openid - profile - email - phone - address - - - - - - #{configBean.issuer + "openid_connect_login"} - - - - - - - - - - - - - - - @@ -127,16 +36,14 @@ - - + - + - diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js b/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js index 98be97a2a..7bf63180a 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js +++ b/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js @@ -503,8 +503,6 @@ var AppRouter = Backbone.Router.extend({ "user/approved":"approvedSites", "user/tokens":"tokens", "user/profile":"profile", - "user/policy":"policy", - "user/policy/:rsid":"editPolicy", "dev/dynreg":"dynReg", "dev/dynreg/new":"newDynReg", @@ -536,7 +534,6 @@ var AppRouter = Backbone.Router.extend({ this.clientStats = new StatsModel(); this.accessTokensList = new AccessTokenCollection(); this.refreshTokensList = new RefreshTokenCollection(); - this.resourceSetList = new ResourceSetCollection(); this.breadCrumbView = new BreadCrumbView({ collection:new Backbone.Collection() @@ -1071,62 +1068,13 @@ var AppRouter = Backbone.Router.extend({ this.updateSidebar('user/profile'); - var view = new UserProfileView({model: getUserInfo()}); - $('#content').html(view.render().el); + this.userProfileView = new UserProfileView({model: getUserInfo()}); + $('#content').html(this.userProfileView.render().el); setPageTitle($.t('admin.user-profile.show')); }, - policy:function() { - this.breadCrumbView.collection.reset(); - this.breadCrumbView.collection.add([ - {text:$.t('admin.home'), href:""}, - {text:$.t('policy.resource-sets'), href:"manage/#user/policy"} - ]); - - this.updateSidebar('user/policy'); - - var view = new ResourceSetListView({model: this.resourceSetList, clientList: this.clientList, systemScopeList: this.systemScopeList}); - - view.load(function() { - $('#content').html(view.render().el); - setPageTitle($.t('policy.resource-sets')); - }); - - }, - - editPolicy:function(rsid) { - this.breadCrumbView.collection.reset(); - this.breadCrumbView.collection.add([ - {text:$.t('admin.home'), href:""}, - {text:$.t('policy.resource-sets'), href:"manage/#user/policy"}, - {text:$.t('policy.edit-policy'), href:"manage/#user/policy/" + rsid} - ]); - - this.updateSidebar('user/policy'); - - var rs = this.resourceSetList.get(rsid); - if (rs == null) { - // need to load it directly - var claims = new ClaimCollection(); - } else { - // the resource set is loaded, preload the claims - var claims = new ClaimCollection(rs.get('claimsRequired')); - claims.isFetched = true; - } - // set the URL for the collection - claims.url = 'api/claims/' + rsid; - - var view = new ClaimListView({model: claims, rs: rs}); - - view.load(function() { - $('#content').html(view.render().el); - setPageTitle($.t('policy.edit-policy')); - }); - - }, - updateSidebar:function(item) { $('.sidebar-nav li.active').removeClass('active'); @@ -1154,8 +1102,7 @@ $(function () { $.get('resources/template/whitelist.html', _load), $.get('resources/template/dynreg.html', _load), $.get('resources/template/rsreg.html', _load), - $.get('resources/template/token.html', _load), - $.get('resources/template/policy.html', _load) + $.get('resources/template/token.html', _load) ).done(function() { $.ajaxSetup({cache:false}); app = new AppRouter(); diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json b/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json index 40a1338e3..e0b176d49 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json +++ b/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json @@ -17,8 +17,7 @@ "show": "View User Profile", "text": "Your user profile has the following information:", "value": "Claim value:" - }, - "policies": "Manage Protected Resource Policies" + } }, "client": { "client-form": { @@ -338,29 +337,6 @@ "whitelist-table": { "no-sites": "There are no whitelisted sites. Use the whitelist button on the client management page to create one." } - }, - "policy" : { - "resource-sets": "Resource Sets", - "edit-policy": "Edit Policy", - "required-claims": "Required Claims", - "policy-table": { - "confirm": "Are you sure you want to delete this resource set?", - "delete": "Delete", - "edit": "Edit Policies", - "email-address": "email address", - "required-claims": "Users that you share this resource will with need to be able to present the following claims in order to access the resource.", - "no-resource-sets": "There are no resource sets registered. Introduce a protected to this authorization server to let it register some.", - "no-required-claims": "There are no required claims for this resource set: This resource set is inaccessible by others.", - "share-email": "Share with email address", - "shared-with": "Shared with:", - "shared-nobody": "NOBODY", - "shared-nobody-tooltip": "This resource is not accessible by anyone else, edit the policies and share it with someone.", - "issuers": "Issuers", - "claim": "Claim", - "value": "Value" - }, - "webfinger-error": "Error", - "webfinger-error-description": "The server was unable to find an identity provider for __email__." }, "copyright": "Powered by MITREid Connect {0} © 2015 The MITRE Corporation and MIT KIT..", "about": { @@ -420,8 +396,7 @@ "title": "Personal", "approved_sites": "Manage Approved Sites", "active_tokens": "Manage Active Tokens", - "profile_information": "View Profile Information", - "resource_policies": "Manage Protected Resource Policies" + "profile_information": "View Profile Information" }, "developer": { "title": "Developer", diff --git a/pom.xml b/pom.xml index 1e660ce47..b1fe303e4 100644 --- a/pom.xml +++ b/pom.xml @@ -510,11 +510,6 @@ 3.9 - - org.mitre - openid-connect-client - ${project.version} - @@ -573,4 +568,4 @@ - \ No newline at end of file +