portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/servlet SSODemoServlet.java
Date Fri, 26 Nov 2004 18:49:56 GMT
taylor      2004/11/26 10:49:56

  Modified:    applications/demo/src/webapp/WEB-INF jetspeed-portlet.xml
                        web.xml portlet.xml
  Added:       applications/demo/src/java/org/apache/jetspeed/demo/servlet
                        SSODemoServlet.java
  Log:
  SSO demo - first example: URL-based SSO
  this is still under construction
  
  Revision  Changes    Path
  1.9       +4 -0      jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/jetspeed-portlet.xml
  
  Index: jetspeed-portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/jetspeed-portlet.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jetspeed-portlet.xml	15 Nov 2004 05:53:55 -0000	1.8
  +++ jetspeed-portlet.xml	26 Nov 2004 18:49:56 -0000	1.9
  @@ -215,4 +215,8 @@
           -->
       </portlet>
   
  +	<js:services>
  +	    <js:service name='SSO'/>
  +	</js:services>
  +	
   </portlet-app>
  
  
  
  1.10      +12 -0     jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/web.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- web.xml	12 Nov 2004 06:32:31 -0000	1.9
  +++ web.xml	26 Nov 2004 18:49:56 -0000	1.10
  @@ -41,6 +41,18 @@
   		</init-param>
   		<load-on-startup>10</load-on-startup>
   	</servlet>
  +
  +  <servlet>
  +    <servlet-name>SSODemo</servlet-name>
  +    <display-name>SSODemo Servlet</display-name>
  +    <description>Servlet for Testing SSO</description>
  +    <servlet-class>org.apache.jetspeed.demo.servlet.SSODemoServlet</servlet-class>
  +  </servlet>       
  +
  +	<servlet-mapping>
  +		<servlet-name>SSODemo</servlet-name>
  +		<url-pattern>/sso-demo</url-pattern>
  +	</servlet-mapping>	
   	
       <!-- Map *.vm files to Velocity  -->
   	<servlet-mapping>
  
  
  
  1.25      +65 -0     jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/portlet.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- portlet.xml	19 Nov 2004 21:53:12 -0000	1.24
  +++ portlet.xml	26 Nov 2004 18:49:56 -0000	1.25
  @@ -424,6 +424,71 @@
           </portlet-info>
       </portlet>
   
  +    <portlet id="SSOIFrame">
  +        <portlet-name>SSOIFramePortlet</portlet-name>
  +        <display-name>SSO IFrame Portlet</display-name>
  +        <description>
  +            Example of using the SSO IFRAME portlet
  +        </description>
  +		<init-param>
  +		<name>EditPage</name>
  +		  <value>/WEB-INF/view/edit-prefs.vm</value>
  +		</init-param>
  +		<init-param>
  +		<name>HelpPage</name>
  +		  <value>/WEB-INF/view/iframe-help.html</value>
  +		</init-param>
  +		
  +        <portlet-class>org.apache.jetspeed.portlet.SSOIFramePortlet</portlet-class>
  +        <expiration-cache>-1</expiration-cache>
  +        <supports>
  +            <mime-type>text/html</mime-type>
  +            <portlet-mode>EDIT</portlet-mode>
  +            <portlet-mode>VIEW</portlet-mode>
  +            <portlet-mode>HELP</portlet-mode>
  +        </supports>
  +        <portlet-preferences>
  +            <preference>
  +                <name>SRC</name>
  +				<value>/demo/sso-demo</value>
  +            </preference>
  +			<preference>
  +				<name>HEIGHT</name>
  +				<value>100%</value>
  +			</preference>
  +			<preference>
  +				<name>WIDTH</name>
  +				<value>100%</value>
  +			</preference>
  +			<preference>
  +				<name>MAX-HEIGHT</name>
  +				<value>800</value>
  +			</preference>
  +			<preference>
  +				<name>MAX-WIDTH</name>
  +				<value>100%</value>
  +			</preference>			
  +			<preference>
  +				<name>sso.type</name>
  +				<value>url</value>
  +			</preference>			
  +			<preference>
  +				<name>sso.url.param.username</name>
  +				<value>ssouser</value>
  +			</preference>			
  +			<preference>
  +				<name>sso.url.param.password</name>
  +				<value>ssopw</value>
  +			</preference>						
  +        </portlet-preferences>
  +        <supported-locale>en</supported-locale>
  +        <portlet-info>
  +            <title>SSO IFrame Portlet</title>
  +            <short-title>SSOIFrame</short-title>
  +            <keywords>single-signon,SSO,iframe,frame</keywords>
  +        </portlet-info>
  +    </portlet>
  +
     <portlet id="CSSDemoPortlet">
       <init-param>
         <name>ViewPage</name>
  
  
  
  1.1                  jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/servlet/SSODemoServlet.java
  
  Index: SSODemoServlet.java
  ===================================================================
  /*
   * Copyright 2000-2004 The Apache Software Foundation.
   * 
   * Licensed 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.jetspeed.demo.servlet;
  
  import java.io.IOException;
  
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  
  /**
   * SSODemoServlet - looks for username, password in the URL for single
   * signon to this servlet from a SSO portlet.
   * Username request parameter: ssouser
   * Password request parameter: ssopw
   * 
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: SSODemoServlet.java,v 1.1 2004/11/26 18:49:56 taylor Exp $
   */
  public class SSODemoServlet extends HttpServlet
  {
      public final void doGet(HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException
      {
          String user = request.getParameter("ssouser");
          String password = request.getParameter("ssopw");
          response.getWriter().println("User = " + user);
          response.getWriter().println(" PW = " + password);
      }
  
      public final void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException,
ServletException
      {
          doGet(req, res);
      }
      
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message