Posted by
fl.schmitt(ops-users) on
Mar 07, 2011; 10:07am
URL: https://discuss.orbeon.com/p-param-type-input-name-instance-tp3338458p3338641.html
Smaran,
> Can you tell me
> <xforms:action if="xxforms:property('oxf.fr.authentication.method') = 'container'">
> <!-- Case where we get the username and roles from the container -->
> <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'username']/@value" value="xxforms:get-remote-user()"/>
> <xforms:message level="xxforms:log-debug">Roles: <xforms:output value="xxforms:property('oxf.fr.authentication.container.roles')"/></xforms:message>
> <xforms:action xxforms:iterate="tokenize(xxforms:property('oxf.fr.authentication.container.roles'), '\s+')">
> <xxforms:variable name="role" select="."/>
> <xforms:action if="xxforms:is-user-in-role($role)">
> <xforms:setvalue ref="instance('fr-authentication-headers')/header[@name = 'roles']/@value" value="if (. = '') then $role else concat(., ' ', $role)"/>
> </xforms:action>
> </xforms:action>
> </xforms:action>
>
>
> From where the username its expecting
i suppose the important line is
<xforms:setvalue ref="instance('fr-authentication-headers')/header[@name
= 'username']/@value" value="xxforms:get-remote-user()"/>
It tries to determine the user using the function
xxforms:get-remote-user(). (1)
If the function doesn't return a user name, it's most likely that the
request doesn't contain authentication data, maybe because the requested
resource didn't require authentication. So, to narrow down the problem i
would start with the tomcat configuration - is authentication set up
correctly, does the request fail if no authentication information is
given? Using, for example, an AccessLogValve (2) could be useful to
determine if a remote user was authenticated (using u%).
HTH
florian
(1)
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-xxforms:get-remote-user-(2)
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve--
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