You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2015/12/01 17:41:07 UTC
cxf-fediz git commit: Renaming hashSet.jsp to registeredClients.jsp
Repository: cxf-fediz
Updated Branches:
refs/heads/master e5c3ea7c4 -> b330d0096
Renaming hashSet.jsp to registeredClients.jsp
Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/b330d009
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/b330d009
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/b330d009
Branch: refs/heads/master
Commit: b330d009696118d0f6fb701400005ab1083ffb18
Parents: e5c3ea7
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Tue Dec 1 16:40:50 2015 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Tue Dec 1 16:40:50 2015 +0000
----------------------------------------------------------------------
.../main/webapp/WEB-INF/applicationContext.xml | 5 ++
.../src/main/webapp/WEB-INF/views/hashSet.jsp | 83 --------------------
.../webapp/WEB-INF/views/registeredClients.jsp | 83 ++++++++++++++++++++
3 files changed, 88 insertions(+), 83 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b330d009/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 a2bb650..c698c06 100644
--- a/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
@@ -88,6 +88,11 @@
<property name="locationPrefix" value="/WEB-INF/views/"/>
<property name="beanName" value="data"/>
<property name="dispatcherName" value="jsp"/>
+ <property name="resourcePaths">
+ <map>
+ <entry key="/client/register" value="/WEB-INF/views/registeredClients.jsp"/>
+ </map>
+ </property>
</bean>
<bean id="idTokenFilter" class="org.apache.cxf.rs.security.oidc.idp.IdTokenResponseFilter"/>
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b330d009/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp b/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp
deleted file mode 100644
index 99adac2..0000000
--- a/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp
+++ /dev/null
@@ -1,83 +0,0 @@
-<%@ page import="org.apache.cxf.rs.security.oauth2.common.Client"%>
-<%@ page import="java.util.Collection"%>
-<%@ page import="javax.servlet.http.HttpServletRequest, org.apache.cxf.rs.security.oauth2.client.Consumer, org.apache.cxf.rs.security.oauth2.client.Consumers" %>
-
-<%
- Collection<Client> regs = (Collection<Client>)request.getAttribute("data");
- String basePath = request.getContextPath() + request.getServletPath();
- if (!basePath.endsWith("/")) {
- basePath += "/";
- }
-%>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>API Client Registration Confirmation</title>
- <STYLE TYPE="text/css">
- table {
- border-collapse: collapse;
- }
- table th {
- background-color: #f0f0f0;
- border-color: #ccc;
- border-style: solid;
- border-width: 1px;
- padding: 3px 4px;
- text-align: center;
- }
- table td {
- border-color: #ccc;
- border-style: solid;
- border-width: 1px;
- padding: 3px 4px;
- }
- </STYLE>
-</head>
-<body>
-<div class="padded">
-<h1>Registered API Clients</h1>
-<br/>
-<table border="1">
- <tr><th>Client Name</th><th>Client Identifier</th><th>Client Secret</th><th>Redirect URIs</th></tr>
- <%
- for (Client client : regs) {
- %>
- <tr>
- <td><%= client.getApplicationName() %></td>
- <td><input type="text" name="clientId" size="15" readonly="readonly" value="<%= client.getClientId() %>" /></td>
- <td>
- <%
- if (client.getClientSecret() != null) {
- %>
- <input type="text" name="clientSecret" size="25" readonly="readonly" value="<%= client.getClientSecret() %>" />
- <%
- } else {
- %>
- <i>Unavailable for public client</i>
- <%
- }
- %>
- </td>
- <td>
- <% if(client.getRedirectUris() != null) {
- for (String redirectURI : client.getRedirectUris()) {
- %>
- <%= redirectURI %><br/>
- <% }
- } %>
- </td>
- </tr>
- <%
- }
- %>
-
-</table>
-
-<br/>
-<br/>
-<p>
-Back to <a href="<%= basePath %>client">Client Registration page</a>
-</p>
-</div>
-</body>
-</html>
-
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b330d009/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
new file mode 100644
index 0000000..5657e56
--- /dev/null
+++ b/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
@@ -0,0 +1,83 @@
+<%@ page import="org.apache.cxf.rs.security.oauth2.common.Client"%>
+<%@ page import="java.util.Collection"%>
+<%@ page import="javax.servlet.http.HttpServletRequest" %>
+
+<%
+ Collection<Client> regs = (Collection<Client>)request.getAttribute("data");
+ String basePath = request.getContextPath() + request.getServletPath();
+ if (!basePath.endsWith("/")) {
+ basePath += "/";
+ }
+%>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>API Client Registration Confirmation</title>
+ <STYLE TYPE="text/css">
+ table {
+ border-collapse: collapse;
+ }
+ table th {
+ background-color: #f0f0f0;
+ border-color: #ccc;
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 4px;
+ text-align: center;
+ }
+ table td {
+ border-color: #ccc;
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 4px;
+ }
+ </STYLE>
+</head>
+<body>
+<div class="padded">
+<h1>Registered API Clients</h1>
+<br/>
+<table border="1">
+ <tr><th>Client Name</th><th>Client Identifier</th><th>Client Secret</th><th>Redirect URIs</th></tr>
+ <%
+ for (Client client : regs) {
+ %>
+ <tr>
+ <td><%= client.getApplicationName() %></td>
+ <td><input type="text" name="clientId" size="15" readonly="readonly" value="<%= client.getClientId() %>" /></td>
+ <td>
+ <%
+ if (client.getClientSecret() != null) {
+ %>
+ <input type="text" name="clientSecret" size="25" readonly="readonly" value="<%= client.getClientSecret() %>" />
+ <%
+ } else {
+ %>
+ <i>Unavailable for public client</i>
+ <%
+ }
+ %>
+ </td>
+ <td>
+ <% if(client.getRedirectUris() != null) {
+ for (String redirectURI : client.getRedirectUris()) {
+ %>
+ <%= redirectURI %><br/>
+ <% }
+ } %>
+ </td>
+ </tr>
+ <%
+ }
+ %>
+
+</table>
+
+<br/>
+<br/>
+<p>
+Back to <a href="<%= basePath %>client">Client Registration page</a>
+</p>
+</div>
+</body>
+</html>
+