Repository: cxf-fediz
Updated Branches:
  refs/heads/master 98fa5a516 -> 62bb88811


Making ClientRegistrationService a subresource of the console service


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

Branch: refs/heads/master
Commit: 62bb8881123f5ef20502551a8b72062f0ae672c2
Parents: 98fa5a5
Author: Sergey Beryozkin <[email protected]>
Authored: Tue Mar 29 17:38:02 2016 +0100
Committer: Sergey Beryozkin <[email protected]>
Committed: Tue Mar 29 17:38:02 2016 +0100

----------------------------------------------------------------------
 .../fediz/service/oidc/account/UserAccount.java | 33 ----------
 .../oidc/account/UserAccountService.java        | 44 -------------
 .../fediz/service/oidc/account/UserConsole.java | 33 ++++++++++
 .../oidc/account/UserConsoleService.java        | 61 ++++++++++++++++++
 .../oidc/clients/ClientRegistrationService.java |  8 ++-
 .../main/webapp/WEB-INF/applicationContext.xml  |  9 +--
 .../src/main/webapp/WEB-INF/views/client.jsp    | 10 +--
 .../webapp/WEB-INF/views/clientCodeGrants.jsp   |  4 +-
 .../main/webapp/WEB-INF/views/clientTokens.jsp  |  6 +-
 .../webapp/WEB-INF/views/registerClient.jsp     |  4 +-
 .../webapp/WEB-INF/views/registeredClients.jsp  |  4 +-
 .../main/webapp/WEB-INF/views/userAccount.jsp   | 67 --------------------
 .../main/webapp/WEB-INF/views/userConsole.jsp   | 67 ++++++++++++++++++++
 services/oidc/src/main/webapp/WEB-INF/web.xml   |  4 +-
 .../cxf/fediz/systests/oidc/OIDCTest.java       | 14 ++--
 15 files changed, 195 insertions(+), 173 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java
----------------------------------------------------------------------
diff --git 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java
 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java
deleted file mode 100644
index e5a9ee6..0000000
--- 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccount.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.cxf.fediz.service.oidc.account;
-
-public class UserAccount {
-    private String userName;
-    public UserAccount(String userName) {
-        this.userName = userName;
-    }
-    public String getUserName() {
-        return userName;
-    }
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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
deleted file mode 100644
index 39b38f5..0000000
--- 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserAccountService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-
-package org.apache.cxf.fediz.service.oidc.account;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.SecurityContext;
-
-@Path("/console")
-public class UserAccountService {
-
-    @Context
-    private SecurityContext sc;
-
-    @GET
-    @Produces(MediaType.TEXT_HTML)
-    public UserAccount getAccount() {
-        return new UserAccount(getUserName()); 
-    }
-    private String getUserName() {
-        return sc.getUserPrincipal().getName();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsole.java
----------------------------------------------------------------------
diff --git 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsole.java
 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsole.java
new file mode 100644
index 0000000..1643ebf
--- /dev/null
+++ 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsole.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.cxf.fediz.service.oidc.account;
+
+public class UserConsole {
+    private String userName;
+    public UserConsole(String userName) {
+        this.userName = userName;
+    }
+    public String getUserName() {
+        return userName;
+    }
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsoleService.java
----------------------------------------------------------------------
diff --git 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsoleService.java
 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsoleService.java
new file mode 100644
index 0000000..c638ed2
--- /dev/null
+++ 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/account/UserConsoleService.java
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.cxf.fediz.service.oidc.account;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.SecurityContext;
+
+import org.apache.cxf.fediz.service.oidc.clients.ClientRegistrationService;
+
+@Path("/")
+public class UserConsoleService {
+
+    private SecurityContext sc;
+
+    private ClientRegistrationService clientRegService;
+    
+    @Context
+    public void setSecurityContext(SecurityContext securityContext) {
+        this.sc = securityContext;
+        clientRegService.setSecurityContext(securityContext);
+    }
+     
+    
+    @GET
+    @Produces(MediaType.TEXT_HTML)
+    public UserConsole getConsole() {
+        return new UserConsole(getUserName()); 
+    }
+    private String getUserName() {
+        return sc.getUserPrincipal().getName();
+    }
+    @Path("clients")
+    public ClientRegistrationService getClientRegService() {
+        return clientRegService;
+    }
+    public void setClientRegService(ClientRegistrationService 
clientRegService) {
+        this.clientRegService = clientRegService;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
----------------------------------------------------------------------
diff --git 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
index a4e874a..228f286 100644
--- 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
+++ 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
@@ -62,7 +62,7 @@ import 
org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 
-@Path("/clients")
+@Path("/")
 public class ClientRegistrationService {
 
     private Map<String, Collection<Client>> registrations = new 
HashMap<String, Collection<Client>>();
@@ -73,9 +73,13 @@ public class ClientRegistrationService {
     private boolean protectIdTokenWithClientSecret;
     private Map<String, String> clientScopes;
     
-    @Context
     private SecurityContext sc;
 
+    @Context
+    public void setSecurityContext(SecurityContext securityContext) {
+        this.sc = securityContext;
+    }
+    
     @GET
     @Produces(MediaType.TEXT_HTML)
     @Path("/register")

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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 94375f7..2704675 100644
--- a/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
@@ -135,14 +135,15 @@
           </map>
        </property>
     </bean>
-    <bean id="accountService" 
class="org.apache.cxf.fediz.service.oidc.account.UserAccountService"/>
+    <bean id="consoleService" 
class="org.apache.cxf.fediz.service.oidc.account.UserConsoleService">
+        <property name="clientRegService" ref="clientRegService"/>
+    </bean>
     
     
     
-    <jaxrs:server address="/home">
+    <jaxrs:server address="/console">
         <jaxrs:serviceBeans>
-            <ref bean="accountService"/>
-            <ref bean="clientRegService"/>
+            <ref bean="consoleService"/>
         </jaxrs:serviceBeans>
         <jaxrs:providers>
             <ref bean="viewProvider"/>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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 fda31dc..58438a9 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 + "home/clients/" + client.getClientId() + "/tokens" 
%>">Issued Tokens</a></p>
+<p><a href="<%= basePath + "console/clients/" + client.getClientId() + 
"/tokens" %>">Issued Tokens</a></p>
 </p>
 <p>
-<p><a href="<%= basePath + "home/clients/" + client.getClientId() + "/codes" 
%>">Issued Code Grants</a></p>
+<p><a href="<%= basePath + "console/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%>home/clients/<%= 
client.getClientId() + "/reset"%>" method="POST">
+<form name="resetSecretForm" action="<%=basePath%>console/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%>home/clients/<%= 
client.getClientId() + "/remove"%>" method="POST">
+<form name="deleteForm" action="<%=basePath%>console/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%>home/clients">registered Clients</a></p>
+<p>Return to <a href="<%=basePath%>console/clients">registered Clients</a></p>
 </p>
 <br/>
 </div>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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 d378d36..a303bd4 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/home/clients/<%= client.getClientId() 
+ "/codes/" + token.getCode() + "/revoke"%>" method="POST">
+               <form action="/fediz-oidc/console/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 + "home/clients/" + client.getClientId() %>">Return</a>
+<a href="<%= basePath + "console/clients/" + client.getClientId() 
%>">Return</a>
 </p>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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 4d97602..4ccd6de 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/home/clients/<%= client.getClientId() 
+ "/at/" + token.getTokenKey() + "/revoke"%>" method="POST">
+               <form action="/fediz-oidc/console/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/home/clients/<%= client.getClientId() 
+ "/rt/" + token.getTokenKey() + "/revoke"%>" method="POST">
+               <form action="/fediz-oidc/console/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 + "home/clients/" + client.getClientId() %>">Return</a>
+<a href="<%= basePath + "console/clients/" + client.getClientId() 
%>">Return</a>
 </p>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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 7152a60..eb51409 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%>home/clients" method="POST">
+       <form action="<%=basePath%>console/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%>home/clients">registered 
Clients</a></p>
+       <p>Return to <a href="<%=basePath%>console/clients">registered 
Clients</a></p>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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 df3d42b..5fca5f7 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 + "home/clients/" + client.getClientId() 
%>"><%= client.getApplicationName() %></a></td>
+           <td><a href="<%= basePath + "console/clients/" + 
client.getClientId() %>"><%= client.getApplicationName() %></a></td>
            <td>
               <%= client.getClientId() %>
            </td>
@@ -79,7 +79,7 @@
 <br/>
 <br/>
 <p>
-<a href="<%= basePath + "home/clients/register" %>">Register a new client</a>
+<a href="<%= basePath + "console/clients/register" %>">Register a new 
client</a>
 </p>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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
deleted file mode 100644
index dc2b83a..0000000
--- a/services/oidc/src/main/webapp/WEB-INF/views/userAccount.jsp
+++ /dev/null
@@ -1,67 +0,0 @@
-<%@ page
-       
import="javax.servlet.http.HttpServletRequest,java.util.Map,java.util.Iterator,org.apache.cxf.fediz.service.oidc.account.UserAccount"%>
-<%
-    UserAccount account = (UserAccount)request.getAttribute("data");
-    String basePath = request.getContextPath() + request.getServletPath();
-    if (!basePath.endsWith("/")) {
-        basePath += "/";
-    }
-%>
-<html xmlns="http://www.w3.org/1999/xhtml";>
-<head>
-<title>User Account</title>
-<style TYPE="text/css">
-<!--
-h2 {
-       font-size: 1.5em;
-       font-family: verdana, arial, helvetica, sans-serif;
-       margin: 0;
-       text-align: center;
-}
-
-.header-text {
-       border-bottom: 1px solid gray;
-       padding: 24px 0;
-       margin: 12px 36px 12px;
-}
-
-label {
-       font-weight: bold;
-       margin-bottom: 9px;
-       display: block;
-       white-space: normal;
-}
-
-.form {
-       max-width: 425px;
-       margin-bottom: 25px;
-       margin-left: auto;
-       margin-right: auto;
-}
-
-.form-line {
-       margin: 6 0 6 0;
-       padding: 12 36 12 36;
-}
-
-.form-required {
-       color: red;
-       margin-left: 5px;
-}
-
-input, select, button {
-       width: 100%;
-}
-
-.form-submit-button {
-       padding: 4px;
-       text-align: center;
-}
--->
-</style>
-</head>
-<body>
-    <h2>Welcome to Fediz OpenId Connect Console</h2>
-       <p><a href="<%=basePath%>home/clients">Client Registrations</a></p>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/services/oidc/src/main/webapp/WEB-INF/views/userConsole.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/userConsole.jsp 
b/services/oidc/src/main/webapp/WEB-INF/views/userConsole.jsp
new file mode 100644
index 0000000..5e4da0d
--- /dev/null
+++ b/services/oidc/src/main/webapp/WEB-INF/views/userConsole.jsp
@@ -0,0 +1,67 @@
+<%@ page
+       
import="javax.servlet.http.HttpServletRequest,java.util.Map,java.util.Iterator,org.apache.cxf.fediz.service.oidc.account.UserConsole"%>
+<%
+    UserConsole account = (UserConsole)request.getAttribute("data");
+    String basePath = request.getContextPath() + request.getServletPath();
+    if (!basePath.endsWith("/")) {
+        basePath += "/";
+    }
+%>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<title>User Account</title>
+<style TYPE="text/css">
+<!--
+h2 {
+       font-size: 1.5em;
+       font-family: verdana, arial, helvetica, sans-serif;
+       margin: 0;
+       text-align: center;
+}
+
+.header-text {
+       border-bottom: 1px solid gray;
+       padding: 24px 0;
+       margin: 12px 36px 12px;
+}
+
+label {
+       font-weight: bold;
+       margin-bottom: 9px;
+       display: block;
+       white-space: normal;
+}
+
+.form {
+       max-width: 425px;
+       margin-bottom: 25px;
+       margin-left: auto;
+       margin-right: auto;
+}
+
+.form-line {
+       margin: 6 0 6 0;
+       padding: 12 36 12 36;
+}
+
+.form-required {
+       color: red;
+       margin-left: 5px;
+}
+
+input, select, button {
+       width: 100%;
+}
+
+.form-submit-button {
+       padding: 4px;
+       text-align: center;
+}
+-->
+</style>
+</head>
+<body>
+    <h2>Welcome to Fediz OpenId Connect Console</h2>
+       <p><a href="<%=basePath%>console/clients">Client Registrations</a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/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 bf21303..ebc17f0 100644
--- a/services/oidc/src/main/webapp/WEB-INF/web.xml
+++ b/services/oidc/src/main/webapp/WEB-INF/web.xml
@@ -40,7 +40,7 @@
     </filter-mapping>
     <filter-mapping>
         <filter-name>FederationFilter</filter-name>
-        <url-pattern>/home/*</url-pattern>
+        <url-pattern>/console/*</url-pattern>
     </filter-mapping>
 
     <context-param>
@@ -85,7 +85,7 @@
     <security-constraint>
         <web-resource-collection>
             <web-resource-name>OIDC Account Protected Area</web-resource-name>
-            <url-pattern>/home/*</url-pattern>
+            <url-pattern>/console/*</url-pattern>
         </web-resource-collection>
         <auth-constraint>
             <role-name>*</role-name>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/62bb8881/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/OIDCTest.java
----------------------------------------------------------------------
diff --git 
a/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/OIDCTest.java 
b/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/OIDCTest.java
index 572a0c8..f4ea3a4 100644
--- 
a/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/OIDCTest.java
+++ 
b/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/OIDCTest.java
@@ -230,7 +230,7 @@ public class OIDCTest {
     
     // Runs as BeforeClass: Login to the OIDC Clients page + create two new 
clients
     private static void loginToClientsPage(String rpPort, String idpPort) 
throws Exception {
-        String url = "https://localhost:"; + rpPort + 
"/fediz-oidc/home/clients";
+        String url = "https://localhost:"; + rpPort + 
"/fediz-oidc/console/clients";
         String user = "alice";
         String password = "ecila";
         
@@ -297,7 +297,7 @@ public class OIDCTest {
     
     // Runs as AfterClass: Login to the OIDC Clients page + delete the created 
clients!
     private static void loginToClientsPageAndDeleteClient(String rpPort, 
String idpPort) throws Exception {
-        String url = "https://localhost:"; + rpPort + 
"/fediz-oidc/home/clients";
+        String url = "https://localhost:"; + rpPort + 
"/fediz-oidc/console/clients";
         String user = "alice";
         String password = "ecila";
         
@@ -345,7 +345,7 @@ public class OIDCTest {
     // Test that we managed to create the clients ok
     @org.junit.Test
     public void testCreatedClients() throws Exception {
-        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/home/clients";
+        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/console/clients";
         String user = "alice";
         String password = "ecila";
         
@@ -551,7 +551,7 @@ public class OIDCTest {
     
     @org.junit.Test
     public void testCreateClientWithInvalidRegistrationURI() throws Exception {
-        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/home/clients";
+        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/console/clients";
         String user = "alice";
         String password = "ecila";
         
@@ -575,7 +575,7 @@ public class OIDCTest {
     
     @org.junit.Test
     public void testCreateClientWithRegistrationURIFragment() throws Exception 
{
-        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/home/clients";
+        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/console/clients";
         String user = "alice";
         String password = "ecila";
         
@@ -599,7 +599,7 @@ public class OIDCTest {
     
     @org.junit.Test
     public void testCreateClientWithInvalidAudienceURI() throws Exception {
-        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/home/clients";
+        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/console/clients";
         String user = "alice";
         String password = "ecila";
         
@@ -623,7 +623,7 @@ public class OIDCTest {
     
     @org.junit.Test
     public void testCreateClientWithAudienceURIFragment() throws Exception {
-        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/home/clients";
+        String url = "https://localhost:"; + getRpHttpsPort() + 
"/fediz-oidc/console/clients";
         String user = "alice";
         String password = "ecila";
         

Reply via email to