cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Johnston <rjoh...@juniper.net>
Subject (fwd) Persistant user authentication data in portal (Take Two)
Date Wed, 06 Nov 2002 19:04:36 GMT
Maybe you guys could give a little more insight into this.

Is it possible to get to the currently logged in user's authentication
session data from a portlet?  If so, how?  Am I going about this
incorrectly?

thanks,
rob

----- Forwarded message from Rob Johnston <rjohnst@juniper.net> -----

Date: Tue, 5 Nov 2002 11:48:08 -0800
From: Rob Johnston <rjohnst@juniper.net>
To: cocoon-users@xml.apache.org
Subject: Persistant user authentication data in portal (Take Two)
X-JNPR-Received-From: outside
Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm
list-post: <mailto:cocoon-users@xml.apache.org>
Reply-To: cocoon-users@xml.apache.org
Delivered-To: mailing list cocoon-users@xml.apache.org
Message-ID: <20021105194808.GA12328@juniper.net>
User-Agent: Mutt/1.4i
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-OriginalArrivalTime: 05 Nov 2002 19:48:10.0859 (UTC) FILETIME=[45494BB0:01C28504]
X-Scanned-By: MIMEDefang 2.15 (www dot roaringpenguin dot com slash mimedefang)

Hey all,

I'm attempting to get at authentication session data using the session
transformer in a installed portlet.  That is, I want to check something
stored in the user's authentication session data from a pipeline called
from the portal itself (and not me directly).

For instance, I have a simple "portlet" xml file that is called by the
portal framework that contains:

<portal-html>
  <session:include xmlns:session="http://cocoon.apache.org/session/1.0" ignoreErrors="true">
    <session:getxml context="authentication" path="/authentication/data"/>
  </session:include>
</portal-html>

if I call this directly by entering the proper url into my browser, I
get what is expected:

<portal-html>
  <session:include xmlns:session="http://cocoon.apache.org/session/1.0" ignoreErrors="true">
    <title>Mr.</title>
    <name>Paul</name>
  </session:include>
</portal-html>

However, if I go through the portal and load the main portal screen
(which should call the same pipeline I just manually issued), the XML
never comes up, and I get an error in my log file:

DEBUG   2002-11-05 14:35:36.900 [core.session-manager    ] (): BEGIN streamContextFragment
name=authentication, path=/authentication/data, consumerorg.apache.cocoon.webapps.session.transformation.SessionTransformer@3a95af
DEBUG   2002-11-05 14:35:36.901 [core.manager            ] (): Got a org.apache.cocoon.webapps.authentication.components.AuthenticationManager
from the pool.
DEBUG   2002-11-05 14:35:36.901 [core.roles              ] (): looking up shorthand authentication-manager,
returning org.apache.cocoon.webapps.authentication.components.AuthenticationManager
DEBUG   2002-11-05 14:35:36.901 [core.roles              ] (): looking up shorthand authentication-manager,
returning org.apache.cocoon.webapps.authentication.components.AuthenticationManager
DEBUG   2002-11-05 14:35:36.902 [core.manager            ] (): Put a org.apache.cocoon.webapps.authentication.components.AuthenticationManager
back into the pool.
DEBUG   2002-11-05 14:35:36.902 [core.manager            ] (): Put a org.apache.cocoon.webapps.session.components.SessionManager
back into the pool.
DEBUG   2002-11-05 14:35:36.903 [sitemap                 ] (): Put a org.apache.cocoon.generation.FileGenerator
back into the pool.
DEBUG   2002-11-05 14:35:36.903 [sitemap                 ] (): Put a org.apache.cocoon.webapps.session.transformation.SessionTransformer
back into the pool.
DEBUG   2002-11-05 14:35:36.903 [sitemap                 ] (): Put a org.apache.cocoon.serialization.XMLSerializer
back into the pool.
DEBUG   2002-11-05 14:35:36.904 [core.manager            ] (): Put a org.apache.cocoon.components.sax.XMLByteStreamCompiler
back into the pool.
DEBUG   2002-11-05 14:35:36.904 [sitemap                 ] (): Put a org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline
back into the pool.
ERROR   2002-11-05 14:35:36.905 [core.portal-manager     ] (): Exception during processing
of coplet: somethingelse
org.apache.cocoon.ProcessingException: SAXException: org.apache.cocoon.ProcessingException:
Failed to execute pipeline.: java.lang.NullPointerException: org.apache.cocoon.ProcessingException:
Failed to execute pipeline.: java.lang.NullPointerException
	at org.apache.cocoon.webapps.session.connector.ResourceConnectorImpl.streamXML(ResourceConnectorImpl.java:664)
	at org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.java:249)
	at java.lang.Thread.run(Thread.java:484)
org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.NullPointerException
	at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:380)
	at org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:532)
	at org.apache.cocoon.webapps.session.connector.ResourceConnectorImpl.streamXMLFromURI(ResourceConnectorImpl.java:620)
	at org.apache.cocoon.webapps.session.connector.ResourceConnectorImpl.streamXML(ResourceConnectorImpl.java:648)
	at org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.java:249)
	at java.lang.Thread.run(Thread.java:484)

Is this because for some reason the session data is not being persisted
unless I make the call directly to this pipeline?  It looks like the
authentication context is valid, because if I change that to say "foo",
I get an error saying the context isn't found.

Any help/insight would be appreciated.

thanks,
rob

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>

----- End forwarded message -----

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message