scripted attributes and customObjectRef="shibboleth.HttpServletRequest"
Liam Hoekenga
liamr at umich.edu
Tue Jun 13 16:27:23 EDT 2017
I'm trying to use the customObjectReg interface to
shibboleth.HttpServletRequest,
I'm using the RemoteUser authentication flow in Shibboleth IDP 3.3.1.
RHEL 6.9, Oracle java 1.8.0_131, Tomcat 8.0.43 fronted by Apache HTTPd
2.2.x and mod_proxy_ajp.
<resolver:AttributeDefinition
xmlns="urn:mace:shibboleth:2.0:resolver:ad" xsi:type="Script" id="testAttr"
dependencyOnly="false" language="nashorn"
customObjectRef="shibboleth.HttpServletResponse">
<resolver:Dependency ref="mcommDir"/>
<Script><![CDATA[
logger =
Java.type("org.slf4j.LoggerFactory").getLogger("net.shibboleth.idp.attribute.resolver.testAttr");
logger.debug("***** " + custom.getHeader("User-Agent"));
testAttr.addValue("value");
]]></Script>
</resolver:AttributeDefinition>
Every method I try returns "null".
2017-06-13 16:06:14,207 - DEBUG
[net.shibboleth.idp.attribute.resolver.testAttr:2] - xxx.xxx.xxx.xxx -
***** null
I thought I had the correct usage. The "custom" variable shows that it's
of
type net.shibboleth.utilities.java.support.net.ThreadLocalHttpServletResponseProxy
Any suggestions?
Liam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20170613/64665c78/attachment.html>
More information about the users
mailing list