cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf-fediz git commit: Starting with making the home console to be a starting point for various oidc management related tasks
Date Mon, 28 Mar 2016 16:29:47 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master ea5e0190a -> 4591da2b6


Starting with making the home console to be a starting point for various oidc management related
tasks


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/4591da2b
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/4591da2b
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/4591da2b

Branch: refs/heads/master
Commit: 4591da2b68cf65cd18e6138511963e72f8fa32b2
Parents: ea5e019
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Mar 28 17:29:30 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Mar 28 17:29:30 2016 +0100

----------------------------------------------------------------------
 .../service/oidc/account/UserAccountService.java      |  2 +-
 .../src/main/webapp/WEB-INF/applicationContext.xml    | 14 +++++---------
 .../oidc/src/main/webapp/WEB-INF/views/client.jsp     | 10 +++++-----
 .../main/webapp/WEB-INF/views/clientCodeGrants.jsp    |  4 ++--
 .../src/main/webapp/WEB-INF/views/clientTokens.jsp    |  6 +++---
 .../src/main/webapp/WEB-INF/views/registerClient.jsp  |  4 ++--
 .../main/webapp/WEB-INF/views/registeredClients.jsp   |  4 ++--
 .../src/main/webapp/WEB-INF/views/userAccount.jsp     |  2 +-
 services/oidc/src/main/webapp/WEB-INF/web.xml         | 13 -------------
 9 files changed, 21 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java
index d56c2d8..39b38f5 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java
@@ -26,7 +26,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.SecurityContext;
 
-@Path("/")
+@Path("/console")
 public class UserAccountService {
 
     @Context

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml b/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
index 8f774cf..94375f7 100644
--- a/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
@@ -120,6 +120,7 @@
     
     <bean id="keyPasswordProvider" class="org.apache.cxf.fediz.service.oidc.PrivateKeyPasswordProviderImpl"/>
     
+    
     <bean id="clientRegService" init-method="init" 
        class="org.apache.cxf.fediz.service.oidc.clients.ClientRegistrationService">
        <property name="dataProvider" ref="oauthProvider"/>
@@ -134,19 +135,14 @@
           </map>
        </property>
     </bean>
-    <jaxrs:server address="/clients">
-        <jaxrs:serviceBeans>
-            <ref bean="clientRegService"/>
-        </jaxrs:serviceBeans>
-        <jaxrs:providers>
-            <ref bean="viewProvider"/>
-        </jaxrs:providers> 
-    </jaxrs:server>
-    
     <bean id="accountService" class="org.apache.cxf.fediz.service.oidc.account.UserAccountService"/>
+    
+    
+    
     <jaxrs:server address="/home">
         <jaxrs:serviceBeans>
             <ref bean="accountService"/>
+            <ref bean="clientRegService"/>
         </jaxrs:serviceBeans>
         <jaxrs:providers>
             <ref bean="viewProvider"/>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/views/client.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/client.jsp b/services/oidc/src/main/webapp/WEB-INF/views/client.jsp
index 574804d..fda31dc 100644
--- a/services/oidc/src/main/webapp/WEB-INF/views/client.jsp
+++ b/services/oidc/src/main/webapp/WEB-INF/views/client.jsp
@@ -153,10 +153,10 @@
 </table>
 <br/>
 <p>
-<p><a href="<%= basePath + "clients/" + client.getClientId() + "/tokens" %>">Issued
Tokens</a></p>
+<p><a href="<%= basePath + "home/clients/" + client.getClientId() + "/tokens"
%>">Issued Tokens</a></p>
 </p>
 <p>
-<p><a href="<%= basePath + "clients/" + client.getClientId() + "/codes" %>">Issued
Code Grants</a></p>
+<p><a href="<%= basePath + "home/clients/" + client.getClientId() + "/codes"
%>">Issued Code Grants</a></p>
 </p>
 
 <br/>
@@ -166,7 +166,7 @@
     if (client.getClientSecret() != null) {
 %>
 <td class="td_no_border">
-<form name="resetSecretForm" action="<%=basePath%>clients/<%= client.getClientId()
+ "/reset"%>" method="POST">
+<form name="resetSecretForm" action="<%=basePath%>home/clients/<%= client.getClientId()
+ "/reset"%>" method="POST">
      <div data-type="control_button" class="form-line">
 	<button name="submit_reset_button" class="form-submit-button" type="submit">Reset
Client Secret</button>
 </form>
@@ -176,7 +176,7 @@
     }
 %>
 <td class="td_no_border">
-<form name="deleteForm" action="<%=basePath%>clients/<%= client.getClientId()
+ "/remove"%>" method="POST">
+<form name="deleteForm" action="<%=basePath%>home/clients/<%= client.getClientId()
+ "/remove"%>" method="POST">
         <div data-type="control_button" class="form-line">
 	<button name="submit_delete_button" class="form-submit-button" type="submit">Delete
Client</button>
         </div>
@@ -187,7 +187,7 @@
 <br/>
 
 <p>
-<p>Return to <a href="<%=basePath%>clients">registered Clients</a></p>
+<p>Return to <a href="<%=basePath%>home/clients">registered Clients</a></p>
 </p>
 <br/>
 </div>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp b/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp
index 33c463f..d378d36 100644
--- a/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp
+++ b/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp
@@ -74,7 +74,7 @@
 		       }
 		   %>
            <td>
-               <form action="/fediz-oidc/clients/<%= client.getClientId() + "/codes/"
+ token.getCode() + "/revoke"%>" method="POST">
+               <form action="/fediz-oidc/home/clients/<%= client.getClientId() + "/codes/"
+ token.getCode() + "/revoke"%>" method="POST">
 		         <input type="submit" value="Delete"/>
                </form>
            </td>
@@ -88,7 +88,7 @@
 <br/>
 <br/>
 <p>
-<a href="<%= basePath + "clients/" + client.getClientId() %>">Return</a>
+<a href="<%= basePath + "home/clients/" + client.getClientId() %>">Return</a>
 </p>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp b/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp
index 7d65bab..4d97602 100644
--- a/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp
+++ b/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp
@@ -109,7 +109,7 @@
 	          }
 	       %>
            <td>
-               <form action="/fediz-oidc/clients/<%= client.getClientId() + "/at/"
+ token.getTokenKey() + "/revoke"%>" method="POST">
+               <form action="/fediz-oidc/home/clients/<%= client.getClientId() + "/at/"
+ token.getTokenKey() + "/revoke"%>" method="POST">
 		           <input type="submit" value="Delete"/>  
                </form>
            </td>
@@ -168,7 +168,7 @@
            </td>    
 	       
            <td>
-               <form action="/fediz-oidc/clients/<%= client.getClientId() + "/rt/"
+ token.getTokenKey() + "/revoke"%>" method="POST">
+               <form action="/fediz-oidc/home/clients/<%= client.getClientId() + "/rt/"
+ token.getTokenKey() + "/revoke"%>" method="POST">
 		         <input type="submit" value="Delete"/>
                </form>
            </td>
@@ -182,7 +182,7 @@
 <br/>
 <br/>
 <p>
-<a href="<%= basePath + "clients/" + client.getClientId() %>">Return</a>
+<a href="<%= basePath + "home/clients/" + client.getClientId() %>">Return</a>
 </p>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/views/registerClient.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/registerClient.jsp b/services/oidc/src/main/webapp/WEB-INF/views/registerClient.jsp
index e73c503..7152a60 100644
--- a/services/oidc/src/main/webapp/WEB-INF/views/registerClient.jsp
+++ b/services/oidc/src/main/webapp/WEB-INF/views/registerClient.jsp
@@ -61,7 +61,7 @@ input, select, button {
 </style>
 </head>
 <body>
-	<form action="<%=basePath%>clients" method="POST">
+	<form action="<%=basePath%>home/clients" method="POST">
 		<div class="form">
 			<div class="header-text">
 				<h2>OIDC Client Registration</h2>
@@ -112,6 +112,6 @@ input, select, button {
 			</div>
 		</div>
 	</form>
-	<p>Return to <a href="<%=basePath%>clients">registered Clients</a></p>
+	<p>Return to <a href="<%=basePath%>home/clients">registered Clients</a></p>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp b/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
index 4134f23..df3d42b 100644
--- a/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
+++ b/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
@@ -50,7 +50,7 @@
        for (Client client : regs) {
     %>
        <tr>
-           <td><a href="<%= basePath + "clients/" + client.getClientId() %>"><%=
client.getApplicationName() %></a></td>
+           <td><a href="<%= basePath + "home/clients/" + client.getClientId()
%>"><%= client.getApplicationName() %></a></td>
            <td>
               <%= client.getClientId() %>
            </td>
@@ -79,7 +79,7 @@
 <br/>
 <br/>
 <p>
-<a href="<%= basePath + "clients/register" %>">Register a new client</a>
+<a href="<%= basePath + "home/clients/register" %>">Register a new client</a>
 </p>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/views/userAccount.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/userAccount.jsp b/services/oidc/src/main/webapp/WEB-INF/views/userAccount.jsp
index e48f517..dc2b83a 100644
--- a/services/oidc/src/main/webapp/WEB-INF/views/userAccount.jsp
+++ b/services/oidc/src/main/webapp/WEB-INF/views/userAccount.jsp
@@ -62,6 +62,6 @@ input, select, button {
 </head>
 <body>
     <h2>Welcome to Fediz OpenId Connect Console</h2>
-	<p><a href="<%=basePath%>clients">Client Registrations</a></p>
+	<p><a href="<%=basePath%>home/clients">Client Registrations</a></p>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4591da2b/services/oidc/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/web.xml b/services/oidc/src/main/webapp/WEB-INF/web.xml
index 738c8bb..bf21303 100644
--- a/services/oidc/src/main/webapp/WEB-INF/web.xml
+++ b/services/oidc/src/main/webapp/WEB-INF/web.xml
@@ -40,10 +40,6 @@
     </filter-mapping>
     <filter-mapping>
         <filter-name>FederationFilter</filter-name>
-        <url-pattern>/clients/*</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-        <filter-name>FederationFilter</filter-name>
         <url-pattern>/home/*</url-pattern>
     </filter-mapping>
 
@@ -79,15 +75,6 @@
     </security-role>
     <security-constraint>
         <web-resource-collection>
-            <web-resource-name>Client Registration Protected Area</web-resource-name>
-            <url-pattern>/clients/*</url-pattern>
-        </web-resource-collection>
-        <auth-constraint>
-            <role-name>*</role-name>
-        </auth-constraint>
-    </security-constraint>
-    <security-constraint>
-        <web-resource-collection>
             <web-resource-name>User Protected Area</web-resource-name>
             <url-pattern>/idp/*</url-pattern>
         </web-resource-collection>


Mime
View raw message