Hi Stuart,
Thanks for your reply.  I tried both methods but received what seems
to be the same error each time.  I had hoped to change this at the
Manakin theme level, so maybe I'll just stick with the Java web filter
redirect that I am currently using.  In case you or anyone else is
curious though, I'll paste the java stack trace from the secod method
below.

Eric

--

java.lang.IllegalStateException: Multiple authentication methods found
when only one was expected.
        at 
org.dspace.app.xmlui.aspect.eperson.LoginRedirect.act(LoginRedirect.java:83)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:124)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:121)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:192)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:265)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:110)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:102)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:107)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:192)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:265)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:110)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:192)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:265)
        at 
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:331)
        at 
org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:213)
        at 
org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:64)
        at 
org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
        at 
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at 
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:552)
        at 
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:539)
        at 
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.resolveURI(MutableEnvironmentFacade.java:298)
        at 
org.apache.cocoon.generation.FileGenerator.setup(FileGenerator.java:78)
        at 
org.dspace.app.xmlui.cocoon.AspectGenerator.setup(AspectGenerator.java:112)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:384)
        at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:720)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:500)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.prepareInternal(AbstractProcessingPipeline.java:514)
        at 
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:341)
        at 
org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:213)
        at 
org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:64)
        at 
org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
        at 
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at 
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at 
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at 
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at 
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at 
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:552)
        at 
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:539)
        at 
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.resolveURI(MutableEnvironmentFacade.java:298)
        at 
org.apache.cocoon.generation.FileGenerator.setup(FileGenerator.java:78)
        at 
org.dspace.app.xmlui.cocoon.AspectGenerator.setup(AspectGenerator.java:112)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:384)
        at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:720)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:500)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.prepareInternal(AbstractProcessingPipeline.java:514)
        at 
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:341)
        at 
org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:213)
        at 
org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:64)
        at 
org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
        at 
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at 
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:552)
        at 
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:539)
        at 
org.apache.cocoon.generation.FileGenerator.setup(FileGenerator.java:78)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:384)
        at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:720)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:500)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:452)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:252)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:252)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:107)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:252)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:252)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:686)
        at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1153)
        at 
org.dspace.app.xmlui.cocoon.DSpaceCocoonServlet.service(DSpaceCocoonServlet.java:245)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
        at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:619)

On Fri, Jan 16, 2009 at 2:39 AM, Stuart Lewis <s...@aber.ac.uk> wrote:
> Hi Eric,
>
>>> Our DSpace server has LDAP and Password authentication enabled.  Is
>>> there an easy way to modify the Manakin Reference theme's "login"
>>> links to point directly to http://server/ldap-login rather than the
>>> login chooser at http://server/login?  I need to leave password
>>> authentication enabled on the system, but I'm trying to simplify login
>>> for general users who will all use LDAP. This way, general users can
>>> click the "login" link for LDAP, and administrators can manually type
>>> the URL for Password login.
>
> You'll need to edit a couple of files:
>
> sitemap.xmap, look for:
>
>            <map:match pattern="login">
>                <map:select type="AuthenticationCountSelector">
>                  <map:when test="0">
>                    <map:transform type="Include" src="noAuthMethod.xml" />
>                    <map:serialize type="xml"/>
>                  </map:when>
>                  <map:when test="1">
>                      <map:act type="LoginRedirect" />
>                  </map:when>
>                  <map:otherwise>
>                      <map:transform type="LoginChooser"/>
>                    <map:serialize type="xml"/>
>                  </map:otherwise>
>                </map:select>
>                <map:serialize type="xml"/>
>            </map:match>
>
> You'll probably want to remove the 'when test="1"' clause and replace the
> content of the 'otherwise' clause with the content of the 'when test="1"'.
> This will then use the LoginRedirect class to always redirect the user
> rather than presenting the login chooser to the user.
>
> I've not tried it, so you might find this is enough because password and
> LDAP authN both use a similar login form, and once the user has entered
> their credentials DSpace tries each authN method in turn (irrespective of
> which one the user selected) until one accepts the credentials.
>
> If it isn't enough, then you'll need to edit
> org.dspace.app.xmlui.aspect.eperson.LoginRedirect.java:
>
> final String url = ((AuthenticationMethod) authMethods.next())
>                .loginPageURL(ContextUtil.obtainContext(objectModel),
>                        httpRequest, httpResponse);
>
> This can be changed to something like:
>
> final String url = "/xmlui/ldap-login";
>
> This will mean all authN methods redirect to the LDAP login screen.
>
> Hope this helps,
>
>
> Stuart
> _________________________________________________________________
>
> Gwasanaethau Gwybodaeth                      Information Services
> Prifysgol Aberystwyth                      Aberystwyth University
>
>            E-bost / E-mail: stuart.le...@aber.ac.uk
>                 Ffon / Tel: (01970) 622860
> _________________________________________________________________
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to