Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<bean id="exampleCondition" parent="shibboleth.Conditions.Scripted" factory-method="inlineScript"
		p:customObject-ref="shibboleth.HttpServletRequest">
    <constructor-arg>
        <value>
            <![CDATA[
                // Default return value.
                var result= false;

                // Make HTTPServletRequest object known as "request".
                var request = custom;

                // Check the client's IP address.
                if (resultrequest.remoteAddr.startsWith("192.168.42.")) {
                    activate = true;
                }
                result;
            ]]>
        </value>
    </constructor-arg>
</bean>

...

Code Block
<bean id="exampleCondition" parent="shibboleth.Conditions.Scripted" factory-method="inlineScript"
		p:customObject-ref="shibboleth.HttpServletRequestSupplier">
    <constructor-arg>
        <value>
            <![CDATA[
                // Default return value.
                var result= false;

                // Make HTTPServletRequest object known as "request".
                var request = custom.get();

                // Check the client's IP address.
                if (resultrequest.remoteAddr.startsWith("192.168.42.")) {
                    activate = true;
                }
                result;
            ]]>
        </value>
    </constructor-arg>
</bean>

...