cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From step...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/webapp/samples/slide principal2auth.xsl login-failed.html login.html logout.html principal2html4users.xsl sitemap.xmap
Date Mon, 08 Jul 2002 21:20:30 GMT
stephan     2002/07/08 14:20:30

  Modified:    src/scratchpad/webapp/samples/slide login-failed.html
                        login.html logout.html principal2html4users.xsl
                        sitemap.xmap
  Added:       src/scratchpad/webapp/samples/slide principal2auth.xsl
  Log:
  Brought the authentication with the sunrise components to work.
  
  Revision  Changes    Path
  1.2       +88 -8     xml-cocoon2/src/scratchpad/webapp/samples/slide/login-failed.html
  
  Index: login-failed.html
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/login-failed.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- login-failed.html	1 Jul 2002 15:09:21 -0000	1.1
  +++ login-failed.html	8 Jul 2002 21:20:30 -0000	1.2
  @@ -1,8 +1,88 @@
  -<html>
  - <head>
  -  <title>Login failed</title>
  - </head>
  - <body>
  -  <h3>Login failed!</h3>
  - </body>
  -</html>
  +<?xml version="1.0"?>
  +  <html>
  +   <head>
  +    <title>Apache Cocoon @version@</title>
  +    <link rel="SHORTCUT ICON" href="favicon.ico"/>
  +   </head>
  +   <body bgcolor="#ffffff" link="#0086b2" vlink="#00698c" alink="#743e75">
  +    <table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
  +     <tr>
  +      <td width="*"><font face="arial,helvetica,sanserif" color="#000000">The
Apache Software Foundation is proud to present...</font></td>
  +      <td width="40%" align="center"><img border="0" src="/cocoon/samples/images/cocoon.gif"/></td>
  +      <td width="30%" align="center"><font face="arial,helvetica,sanserif" color="#000000"><b>version
@version@</b></font></td>
  +     </tr>
  +     <tr>
  +       <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" align="center"
width="100%">
  +         <tr>
  +            <td width="90%" align="left" bgcolor="#0086b2">
  +             <br/>
  +            </td>
  +         </tr>
  +       </table>
  +     </tr>
  +    </table>
  +
  +  <table width="200" align="center">
  +   <tr>
  +    <td valign="top">
  +     <table border="0" bgcolor="#000000" cellpadding="0" cellspacing="0" width="97%">
  +      <tbody>
  +       <tr>
  +        <td>
  +         <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" align="center"
width="100%">
  +          <tr>
  +           <td bgcolor="#0086b2" width="100%" align="left">
  +            <font size="+1" face="arial,helvetica,sanserif" color="#ffffff">Login</font>
  +           </td>
  +          </tr>
  +          <tr>
  +           <td width="100%" bgcolor="#ffffff" align="left">
  +            <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2"  width="100%"
align="center">
  +
  +             <form action="login" method="post">
  +              <tr>
  +               <td>Username</td>
  +               <td><input name="name" type="text" size="15" maxlength="40"/></td>
  +              </tr>
  +              <tr>
  +               <td>Password</td>
  +               <td><input name="password" type="password" size="15" maxlength="40"/></td>
  +              </tr>
  +              <tr>
  +               <td></td>
  +               <td><input type="submit" name="cocoon-login" value="Login"/></td>
  +              </tr>
  +              <tr>
  +               <td></td>
  +               <td>Login failed!</td>
  +              </tr>
  +              <tr>
  +               <td></td>
  +               <td>Try root,root or john,john</td>
  +              </tr>
  +             </form>
  +
  +            </table>
  +           </td>
  +          </tr>
  +         </table>
  +
  +        </td>
  +       </tr>
  +      </tbody>
  +     </table>
  +
  +     <br/>
  +    </td>
  +   </tr>
  +  </table>
  +
  +
  +    <p align="center">
  +     <font size="-1">
  +      Copyright &#169; @year@ <a href="http://www.apache.org/">The Apache Software
Foundation</a>.<br/>
  +      All rights reserved.
  +     </font>
  +    </p>
  +   </body>
  +  </html>
  
  
  
  1.3       +5 -1      xml-cocoon2/src/scratchpad/webapp/samples/slide/login.html
  
  Index: login.html
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/login.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- login.html	8 Jul 2002 08:15:13 -0000	1.2
  +++ login.html	8 Jul 2002 21:20:30 -0000	1.3
  @@ -39,7 +39,7 @@
              <td width="100%" bgcolor="#ffffff" align="left">
               <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2"  width="100%"
align="center">
   
  -             <form action="" method="post">
  +             <form action="login" method="post">
                 <tr>
                  <td>Username</td>
                  <td><input name="name" type="text" size="15" maxlength="40"/></td>
  @@ -51,6 +51,10 @@
                 <tr>
                  <td></td>
                  <td><input type="submit" name="cocoon-login" value="Login"/></td>
  +              </tr>
  +              <tr>
  +               <td></td>
  +               <td>Try root,root or john,john</td>
                 </tr>
                </form>
   
  
  
  
  1.2       +72 -8     xml-cocoon2/src/scratchpad/webapp/samples/slide/logout.html
  
  Index: logout.html
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/logout.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- logout.html	1 Jul 2002 15:09:21 -0000	1.1
  +++ logout.html	8 Jul 2002 21:20:30 -0000	1.2
  @@ -1,8 +1,72 @@
  -<html>
  - <head>
  -  <title>Logout</title>
  - </head>
  - <body>
  -  <h3>You are logged out!</h3>
  - </body>
  -</html>
  +<?xml version="1.0"?>
  +  <html>
  +   <head>
  +    <title>Apache Cocoon @version@</title>
  +    <link rel="SHORTCUT ICON" href="favicon.ico"/>
  +   </head>
  +   <body bgcolor="#ffffff" link="#0086b2" vlink="#00698c" alink="#743e75">
  +    <table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
  +     <tr>
  +      <td width="*"><font face="arial,helvetica,sanserif" color="#000000">The
Apache Software Foundation is proud to present...</font></td>
  +      <td width="40%" align="center"><img border="0" src="/cocoon/samples/images/cocoon.gif"/></td>
  +      <td width="30%" align="center"><font face="arial,helvetica,sanserif" color="#000000"><b>version
@version@</b></font></td>
  +     </tr>
  +     <tr>
  +       <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" align="center"
width="100%">
  +         <tr>
  +            <td width="95%" align="left" bgcolor="#0086b2">
  +             <br/>
  +            </td>
  +            <td nowrap="nowrap" bgcolor="#ffffff"><a href="/cocoon/samples/slide/login.html">
  +             <i>login</i></a>
  +            </td>
  +         </tr>
  +       </table>
  +     </tr>
  +    </table>
  +
  +  <table width="200" align="center">
  +   <tr>
  +    <td valign="top">
  +     <table border="0" bgcolor="#000000" cellpadding="0" cellspacing="0" width="97%">
  +      <tbody>
  +       <tr>
  +        <td>
  +         <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" align="center"
width="100%">
  +          <tr>
  +           <td bgcolor="#0086b2" width="100%" align="left">
  +            <font size="+1" face="arial,helvetica,sanserif" color="#ffffff">Logout</font>
  +           </td>
  +          </tr>
  +          <tr>
  +           <td width="100%" bgcolor="#ffffff" align="left">
  +            <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2"  width="100%"
align="center">
  +
  +             <tr>
  +              <td>Good bye.</td>
  +             </tr>
  +
  +            </table>
  +           </td>
  +          </tr>
  +         </table>
  +
  +        </td>
  +       </tr>
  +      </tbody>
  +     </table>
  +
  +     <br/>
  +    </td>
  +   </tr>
  +  </table>
  +
  +
  +    <p align="center">
  +     <font size="-1">
  +      Copyright &#169; @year@ <a href="http://www.apache.org/">The Apache Software
Foundation</a>.<br/>
  +      All rights reserved.
  +     </font>
  +    </p>
  +   </body>
  +  </html>
  
  
  
  1.3       +3 -0      xml-cocoon2/src/scratchpad/webapp/samples/slide/principal2html4users.xsl
  
  Index: principal2html4users.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/principal2html4users.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- principal2html4users.xsl	8 Jul 2002 08:15:13 -0000	1.2
  +++ principal2html4users.xsl	8 Jul 2002 21:20:30 -0000	1.3
  @@ -38,6 +38,9 @@
               <td nowrap="nowrap" bgcolor="#ffffff"><a href="/cocoon/samples/slide/locks/">
                <i>locks</i></a>
               </td>
  +            <td nowrap="nowrap" bgcolor="#ffffff"><a href="/cocoon/samples/slide/logout.html">
  +             <i>logout</i></a>
  +            </td>
            </tr>
          </table>
        </tr>
  
  
  
  1.6       +12 -34    xml-cocoon2/src/scratchpad/webapp/samples/slide/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/sitemap.xmap,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sitemap.xmap	8 Jul 2002 08:15:13 -0000	1.5
  +++ sitemap.xmap	8 Jul 2002 21:20:30 -0000	1.6
  @@ -88,18 +88,6 @@
     </map:view>
    </map:views>
   
  -<!--  <map:action-sets>
  -   <map:action-set name="source-actions">
  -    <map:act action="upload"         type="source-upload"/>
  -    <map:act action="addproperty"    type="source-addproperty"/>
  -    <map:act action="deleteproperty" type="source-deleteproperty"/>
  -    <map:act action="deletecontent" type="source-deletecontent"/>
  -   </map:action-set>
  -
  -   <map:action-set name="repository-actions">
  -   </map:action-set>
  -  </map:action-sets>-->
  -
    <map:pipelines>
     <map:component-configurations>
      <authentication-manager>
  @@ -109,31 +97,21 @@
         <authentication uri="cocoon://samples/slide/repository-authuser"/>
        </handler>
       </handlers>
  -<!--   <handlers>
  -      <handler name="demohandler">
  -    <redirect-to uri="cocoon:/login"/>
  -    <authentication uri="cocoon:raw:/authenticate"/>
  -      </handler>
  -     </handlers>-->
      </authentication-manager>
     </map:component-configurations>
   
     <map:pipeline>
  -   <map:match pattern="source-*">
  -
  -    <map:match pattern="repository-authuser">
  -     <map:generate type="principallist">
  -      <map:parameter name="principalprovider" value="slide"/>
  -      <map:parameter name="principalcaller" value="root"/>
  -     </map:generate>
  -
  -     <map:transform src="resources/slideuser2user.xsl">
  -      <map:parameter name="use-request-parameters" value="true"/>
  -     </map:transform>
  -
  -     <map:serialize type="xml"/>
  -    </map:match>
  +   <map:match pattern="repository-authuser">
  +    <map:generate type="principallist">
  +     <map:parameter name="principalprovider" value="slide"/>
  +     <map:parameter name="principalcaller" value="root"/>
  +    </map:generate>
  +
  +    <map:transform src="principal2auth.xsl">
  +     <map:parameter name="use-request-parameters" value="true"/>
  +    </map:transform>
   
  +    <map:serialize type="xml"/>
      </map:match>
   
      <map:handle-errors>
  @@ -156,8 +134,8 @@
      <map:match pattern="login">
       <map:act type="auth-login">
        <map:parameter name="handler" value="slidehandler"/>
  -     <map:parameter name="parameter_userid" value="request:name"/>
  -     <map:parameter name="parameter_password" value="request:password"/>
  +     <map:parameter name="parameter_userid" value="{request:name}"/>
  +     <map:parameter name="parameter_password" value="{request:password}"/>
        <map:redirect-to uri="content/"/>
       </map:act>
   
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/webapp/samples/slide/principal2auth.xsl
  
  Index: principal2auth.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" 
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:pl="http://xml.apache.org/cocoon/PrincipalListGenerator">
  
   <xsl:param name="password"/>
   <xsl:param name="name"/>
  
   <xsl:template match="pl:list">
    <authentication>
  	 <xsl:apply-templates select="pl:principal"/>
    </authentication>
   </xsl:template>
  
   <xsl:template match="pl:principal">
    <xsl:if test="normalize-space(@pl:name) = $name and normalize-space(@pl:password) =
$password">
  	 <ID><xsl:value-of select="@pl:name"/></ID>
  	 <role><xsl:value-of select="@pl:role"/></role>
    </xsl:if>
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message