| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You 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. |
| --> |
| |
| <!--+ |
| | Authentication (with flow) block samples sitemap. |
| | |
| | CVS $Id$ |
| +--> |
| |
| <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> |
| |
| <map:flow language="javascript"> |
| <map:script src="flow/sample.js"/> |
| </map:flow> |
| |
| <!-- =========================== Pipelines ================================= --> |
| <map:pipelines> |
| <map:component-configurations> |
| <authentication-manager> |
| <handlers> |
| <handler name="flowdemohandler"> |
| <redirect-to uri="cocoon:/login"/> |
| <authentication uri="cocoon:raw:/authenticate"/> |
| </handler> |
| </handlers> |
| </authentication-manager> |
| </map:component-configurations> |
| |
| <map:pipeline> |
| <map:match pattern=""> |
| <map:redirect-to uri="login" session="true"/> |
| </map:match> |
| |
| <!-- ================= --> |
| <!-- Simple login page --> |
| <!-- ================= --> |
| <map:match pattern="login"> |
| <map:call function="isLoggedIn"> |
| <map:parameter name="handler" value="flowdemohandler"/> |
| <map:parameter name="protected-redirect" value="protected"/> |
| <map:parameter name="failure-internal" value="internal/login"/> |
| </map:call> |
| </map:match> |
| |
| <!-- ========================================= --> |
| <!-- Form target which performs auth service --> |
| <!-- ========================================= --> |
| <map:match pattern="do-login"> |
| <!-- try to login --> |
| <map:call function="login"> |
| <map:parameter name="handler" value="flowdemohandler"/> |
| <map:parameter name="parameter_name" value="{request-param:username}"/> |
| <map:parameter name="protected-redirect" value="protected"/> |
| <map:parameter name="failure-redirect" value="login"/> |
| </map:call> |
| </map:match> |
| |
| <!-- ================ --> |
| <!-- Protected area --> |
| <!-- ================ --> |
| <map:match pattern="protected"> |
| <map:call function="protect"> |
| <map:parameter name="handler" value="flowdemohandler"/> |
| <map:parameter name="protected-internal" value="internal/protected"/> |
| <map:parameter name="failure-redirect" value="login"/> |
| </map:call> |
| </map:match> |
| |
| <!-- ========================================= --> |
| <!-- Logout link which invalidates the session --> |
| <!-- ========================================= --> |
| <map:match pattern="do-logout"> |
| <map:call function="logout"> |
| <map:parameter name="handler" value="flowdemohandler"/> |
| <map:parameter name="failure-redirect" value="login"/> |
| </map:call> |
| </map:match> |
| </map:pipeline> |
| |
| <map:pipeline internal-only="true"> |
| <!-- This is the authentication resource --> |
| <map:match pattern="authenticate"> |
| <map:generate src="docs/userlist.xml"/> |
| <map:transform src="stylesheets/authenticate.xsl"> |
| <map:parameter name="use-request-parameters" value="true"/> |
| </map:transform> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| <map:match pattern="internal/login"> |
| <map:generate src="docs/login.xml"/> |
| <map:transform src="stylesheets/simple-page2html.xsl"/> |
| <map:transform type="encodeURL"/> |
| <map:serialize/> |
| </map:match> |
| |
| <map:match pattern="internal/protected"> |
| <map:generate src="docs/protected.xml"/> |
| <map:transform type="session"/> |
| <map:transform src="stylesheets/simple-page2html.xsl"/> |
| <map:transform type="encodeURL"/> |
| <map:serialize/> |
| </map:match> |
| </map:pipeline> |
| |
| </map:pipelines> |
| </map:sitemap> |