...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<bean id="AttributeValueExtraction" parent="shibboleth.ContextFunctions.Scripted" factory-method="inlineScript" abstract="true"> <constructor-arg> <value> <![CDATA[ var getinfo = function() { var rpContext = input.getSubcontext("net.shibboleth.idp.profile.context.RelyingPartyContext"); if (null === rpContext) { return "norp"null; } var attrContext = rpContext.getSubcontext("net.shibboleth.idp.attribute.context.AttributeContext"); if (null === attrContext) { return "noac"null; } var attributes = null attributes = attrContext.getUnfilteredIdPAttributes(); if (attributes === null) { return "Notrr"null; } attribute = attributes.get(custom); if (attribute === null || attribute.getValues().isEmpty()) { return null; } var iter = attribute.getValues().iterator(); var result = ""; while (iter.hasNext()) { result = result + " " + iter.next().toString(); } return result; } getinfo(); ]]> </value> </constructor-arg> </bean> |
...