Extending the script context of ScriptedPredicate by configuration

Cantor, Scott cantor.2 at osu.edu
Wed Sep 9 12:53:27 EDT 2015


On 9/9/15, 12:45 PM, "dev on behalf of Daniel Lutz" <dev-bounces at shibboleth.net on behalf of daniel.lutz at switch.ch> wrote:

>I have a use case (SPNEGO/Kerberos) where I want to use
>ScriptedPredicate to configure an activation predicate for a flow.
>The script should get access to the HTTPServletRequest object.
>But currently, only the ProfileRequestContext object
>is available in the script context.

You can get to the servlet request from there, FWIW.

>Has someone already thought about a method how to extend
>the script context of the ScriptedPredicate?

I just fixed the view contexts to populate an arbitrary custom object to solve this. We can plug the same custom object into the scripting contexts.

>My idea is to extend the class ScriptedPredicate to allow
>setting a map of named objects that are added to the
>script context.

That's basically what I did, but without limiting it to a map, so we may as well just inject something similar to shibboleth.CustomViewContext or we could rename that or alias it or whatever.

-- Scott



More information about the dev mailing list