Antwort: accessing Authentication Session Context with java

2002-10-10 Thread michael_hampel

Hello,

  I found our problem...


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




accessing Authentication Session Context with java

2002-10-09 Thread michael_hampel

Hello,

   I am trying to get the user data stored in the authentication session
context in an action.
   I tried:
  SessionManager.getContext(authenticate);
   and:
 SessionContextProviderImpl.getSessionContext
(authenticate, ...);

   Both methods return a context and if I do
  context.getName();

   it returns authenticate.

   The problem is that in both cases if I try to get the xml with
for example:
  context.getXML(/authentication);
the returned document fragment is always null.

I have done this for the temporary session context as well and there it
worked.
I got the data with e.g.:
  context.getValueOfNode(/data/source);

Please tell me what I am doing wrong here.

Thanx again for any help.


 miham


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




authentication session context

2002-09-25 Thread michael_hampel

Hello,

   we have the following problem:
   We have an application where we use the authentication framework for
login.
   At successful authentication we write the user data to the
authentication context.
   After the user is logged in we like to work with the stored data in the
session context like following:
   The user clicks a link  and we have to load information from a database.
   Therefore we wrote a generator which gets out the user information from
the authentication
session context, queries the database and returns xml.
This works fine as long as we are not using aggregation or the cocoon
Protocol.
   (we don´t really know in the moment where the problem lies).
   Here is the part of the sitemap:

   map:pipeline
  map:act type=locale
map:parameter name=parameters value=true /
map:act type=auth-protect
  map:parameter name=handler value=loginhandler /
  map:match pattern=gallery.xml
map:generate type=gallery /
map:serialize type=xml /
  /map:match
  map:match pattern=*.html
map:aggregate element=inbox
  map:part src=cocoon:/gallery.xml /
  map:part src=WEB-INF/xml/{1}.xml /
  map:part src=WEB-INF/xml/userinbox.xml /
  map:part src=WEB-INF/xml/msapp.xml /
!--map:part src=WEB-INF/xml/gallery.xml /--
/map:aggregate
map:transform type=i18n
  map:parameter name=locale value={../locale} /
  map:parameter name=catalogue-name value={1} /
/map:transform
map:transform src=WEB-INF/xsl/{1}.xsl
  map:parameter name=use-request-parameters value=true /
/map:transform
map:serialize /
  /map:match
/map:act
  /map:act
/map:pipeline

If we request gallery.xml after login from the browser everything works
fine.
If we try the same thing with the aggregation and the cocoon protocol, we
get an empty map
in our generator when doing:
AuthenticationManager.createMap();
meaning are not getting the data from the authentication session context.

Anybody tried something like this before - or is there a beter way to do
it?

Thanx again for any help,


miHam


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: authentication session context

2002-09-25 Thread Carsten Ziegeler

I think your problem is caused by this bug:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12293

Carsten

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 1:51 PM
 To: [EMAIL PROTECTED]
 Subject: authentication session context


 Hello,

we have the following problem:
We have an application where we use the authentication framework for
 login.
At successful authentication we write the user data to the
 authentication context.
After the user is logged in we like to work with the stored data in the
 session context like following:
The user clicks a link  and we have to load information from a
 database.
Therefore we wrote a generator which gets out the user information from
 the authentication
 session context, queries the database and returns xml.
 This works fine as long as we are not using aggregation or the cocoon
 Protocol.
(we don´t really know in the moment where the problem lies).
Here is the part of the sitemap:

map:pipeline
   map:act type=locale
 map:parameter name=parameters value=true /
 map:act type=auth-protect
   map:parameter name=handler value=loginhandler /
   map:match pattern=gallery.xml
 map:generate type=gallery /
 map:serialize type=xml /
   /map:match
   map:match pattern=*.html
 map:aggregate element=inbox
   map:part src=cocoon:/gallery.xml /
   map:part src=WEB-INF/xml/{1}.xml /
   map:part src=WEB-INF/xml/userinbox.xml /
   map:part src=WEB-INF/xml/msapp.xml /
 !--map:part src=WEB-INF/xml/gallery.xml /--
 /map:aggregate
 map:transform type=i18n
   map:parameter name=locale value={../locale} /
   map:parameter name=catalogue-name value={1} /
 /map:transform
 map:transform src=WEB-INF/xsl/{1}.xsl
   map:parameter name=use-request-parameters value=true /
 /map:transform
 map:serialize /
   /map:match
 /map:act
   /map:act
 /map:pipeline

 If we request gallery.xml after login from the browser everything works
 fine.
 If we try the same thing with the aggregation and the cocoon protocol, we
 get an empty map
 in our generator when doing:
 AuthenticationManager.createMap();
 meaning are not getting the data from the authentication session context.

 Anybody tried something like this before - or is there a beter way to do
 it?

 Thanx again for any help,


 miHam


 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]



-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]