You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2004/12/03 05:26:35 UTC
cvs commit: jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/servlet SSODemoServlet.java
taylor 2004/12/02 20:26:35
Modified: applications/demo/src/webapp/WEB-INF/view iframe-help.html
applications/demo/src/java/org/apache/jetspeed/demo/servlet
SSODemoServlet.java
Log:
had to change the demo to use a hard-coded credential instead of servlet's principal
under Tomcat 4 it was propagating, but not under Tomcat 5
Revision Changes Path
1.3 +4 -1 jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/view/iframe-help.html
Index: iframe-help.html
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/view/iframe-help.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- iframe-help.html 1 Dec 2004 01:28:47 -0000 1.2
+++ iframe-help.html 3 Dec 2004 04:26:35 -0000 1.3
@@ -20,6 +20,9 @@
Principal and Credential for the <b>/demo/sso-demo</b> site as the demo will take the authenticated principal <br/>
currently logged in as the SSO Principal, and *always* require the SSO Credential listed below<br/>
If a user is not authenticated, you must supply the SSO Principal name <b>'guest'</b>.<br/>
+<p class='portlet-msg-alert'>
+IGNORE ABOVE for now !!! Just enter the credentials shown below for now ... having a problem with Tomcat 5<br/>
+</p>
</div>
<br/>
<table border="1" cellspacing="1" cellpadding="3">
@@ -28,7 +31,7 @@
<th class="portlet-section-header">SSO Credential</th>
</tr>
<tr>
-<td class='portlet-section-body'>(current authenticated username)</td>
+<td class='portlet-section-body'>007</td>
<td class='portlet-section-body'>secret-password</td>
</tr>
</table>
1.4 +7 -2 jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/servlet/SSODemoServlet.java
Index: SSODemoServlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/servlet/SSODemoServlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SSODemoServlet.java 2 Dec 2004 03:13:30 -0000 1.3
+++ SSODemoServlet.java 3 Dec 2004 04:26:35 -0000 1.4
@@ -44,8 +44,11 @@
{
String principal = request.getParameter(DEMO_SSO_PRINCIPAL_PARAM);
String credential = request.getParameter(DEMO_SSO_CREDENTIAL_PARAM);
- String authenticatedPrincipal = "";
+ String authenticatedPrincipal = "007";
+ /*
+ * this is not working on Tomcat 5.0.30
+
Principal userPrincipal = request.getUserPrincipal();
if (userPrincipal == null)
{
@@ -55,11 +58,13 @@
{
authenticatedPrincipal = userPrincipal.toString();
}
+ */
if (principal == null)
{
error403(request, response, "SSO Principal is not valid. Please provide a valid SSO principal.");
return;
}
+
if (credential == null)
{
error403(request, response, "SSO Credential is not valid. Please provide a valid SSO credential.");
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org