Posted by
smaran on
Mar 08, 2011; 10:18am
URL: https://discuss.orbeon.com/p-param-type-input-name-instance-tp3338458p3341012.html
Hi,
For Authentication Instead of j_security I had written my own servlet.And I am taking username and password from
User and setting that in request.In crud.xpl I am trying to acess this user name as below.
<include>/request/attributes</include>
<username><xsl:value-of select="$request/username"/></username>
But user name is stored as null in database can any one correct me whts wrong in my approach.
I am adding the crud.xpl of mine
Reagrds,
Smaran
-----Original Message-----
From: Florian Schmitt [mailto:
[hidden email]]
Sent: Monday, March 07, 2011 5:28 PM
To:
[hidden email]
Subject: [ops-users] Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>
Smaran,
> So far all right, but although there is an authenticated user in the
> context '/ orbeon' in Tomcat, 'Form Runner' or 'Form Builder' shows no
> reference to the user, or when you create or modify forms, data is not
> saved user in the 'USERNAME' table 'ORBEON_FORM_DATA', which remains
> empty although there is an authenticated user.
it seems that crud.xpl doesn't use the container authentication data; this may be a bug.
If i understand crud.xpl correctly, the username value is set in line 82 of /src/resources/apps/fr/perssistence/oracle/crud.xpl or line 64 of /src/resources/apps/fr/perssistence/mysql/crud.xpl, respectively. In both cases, the output of /request/headers/header[name = 'orbeon-username']/value is used, assuming that this header field contains the user name.
But the name of the authenticated user isn't availbe in /request/headers/header[name = 'orbeon-username']/value. The path should be /request/remote-user, i assume. AFAIK, "orbeon-username"
appears only in the both crud.xpl files, but nowhere else in the sources. The docs of the request generator don't mention a header field named "orbeon-username" or "orbeon-roles" or "orbeon-datasource":
http://www.orbeon.com/orbeon/doc/processors-generators-request#d30e37You could try to change crud.xpl manually to use the name of the authenticated user as username; i've attached a patch. Since i don't use SQL persistence, i wasn't able to test i myselft, and i don't know which other effects may be caused by this chance.
HTH
florian
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws