[java-idp-testbed] branch master updated: Add "native" CAS client use to testbed.
Scott Cantor
cantor.2 at osu.edu
Tue Jun 25 13:03:54 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-idp-testbed.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-testbed.git;a=commit;h=37968c5909b98dd4ecebd26eacfe959b64d9c69d
The following commit(s) were added to refs/heads/master by this push:
new 37968c5 Add "native" CAS client use to testbed.
37968c5 is described below
commit 37968c5909b98dd4ecebd26eacfe959b64d9c69d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jun 25 13:03:51 2019 -0400
Add "native" CAS client use to testbed.
---
src/main/java/sp/CASClientController.java | 16 +++++++++++
src/main/webapp/WEB-INF/sp/jsp/casclient.jsp | 39 ++++++++++++++++++++++++++
src/main/webapp/WEB-INF/web.xml | 41 ++++++++++++++++++++++++++++
src/main/webapp/index.html | 2 ++
4 files changed, 98 insertions(+)
diff --git a/src/main/java/sp/CASClientController.java b/src/main/java/sp/CASClientController.java
new file mode 100644
index 0000000..708e72f
--- /dev/null
+++ b/src/main/java/sp/CASClientController.java
@@ -0,0 +1,16 @@
+package sp;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+ at Controller
+public class CASClientController {
+
+ @RequestMapping("/casclient")
+ public String contextInfo(Model model) {
+
+ return "casclient";
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/sp/jsp/casclient.jsp b/src/main/webapp/WEB-INF/sp/jsp/casclient.jsp
new file mode 100644
index 0000000..d37b93c
--- /dev/null
+++ b/src/main/webapp/WEB-INF/sp/jsp/casclient.jsp
@@ -0,0 +1,39 @@
+<%@page language="java" contentType="text/html; charset=US-ASCII" pageEncoding="US-ASCII"%>
+<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>CAS Info Page</title>
+
+<style type="text/css">
+
+table {
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+td, th {
+ padding: 3px;
+ text-align: left;
+ border: 1px solid black;
+}
+
+tr:nth-of-type(odd) { background-color: white; }
+
+tr:nth-of-type(even) { background-color: lightgrey; }
+
+</style>
+
+</head>
+
+<body>
+
+ <h1>CAS Authentication Info</h1>
+
+ <p><%= request.getRemoteUser() %></p>
+
+</body>
+
+</html>
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 3d411b4..0c846a6 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -18,6 +18,11 @@
<param-value>net.shibboleth.ext.spring.context.DeferPlaceholderFileSystemXmlWebApplicationContext</param-value>
</context-param>
+ <context-param>
+ <param-name>serverName</param-name>
+ <param-value>https://localhost:8443</param-value>
+ </context-param>
+
<!-- Listeners -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
@@ -57,4 +62,40 @@
<url-pattern>/sp/*</url-pattern>
</servlet-mapping>
+ <!-- CAS client use for testbed -->
+ <filter>
+ <filter-name>CASAuthenticationFilter</filter-name>
+ <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
+ <init-param>
+ <param-name>casServerUrlPrefix</param-name>
+ <param-value>https://localhost:8443/idp/profile/cas</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>CASAuthenticationFilter</filter-name>
+ <url-pattern>/sp/casclient</url-pattern>
+ </filter-mapping>
+
+ <filter>
+ <filter-name>CASValidationFilter</filter-name>
+ <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
+ <init-param>
+ <param-name>casServerUrlPrefix</param-name>
+ <param-value>https://localhost:9443/idp/profile/cas</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>CASValidationFilter</filter-name>
+ <url-pattern>/sp/casclient</url-pattern>
+ </filter-mapping>
+
+ <filter>
+ <filter-name>HttpServletRequestWrapperFilter</filter-name>
+ <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>HttpServletRequestWrapperFilter</filter-name>
+ <url-pattern>/sp/casclient</url-pattern>
+ </filter-mapping>
+
</web-app>
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 2249d45..0882571 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -9,6 +9,8 @@
<h1>Testbed Execution Menu</h1>
<ul>
+<li><a href="sp/casclient">Init CAS SSO</a></li>
+
<li><a href="sp/SAML2/InitSSO/Redirect">Init SAML 2 SSO, Redirect Binding</a></li>
<li><a href="sp/SAML2/InitSSO/Passive">Init SAML 2 SSO, Redirect Binding, Passive Request</a></li>
<li><a href="sp/SAML2/InitSSO/ForceAuthn">Init SAML 2 SSO, Redirect Binding, ForceAuthn Request</a></li>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list