getRelayState for scripted attribute definition

Brent Putman putmanb at georgetown.edu
Thu Apr 2 14:10:21 EDT 2015



On 4/2/15 12:36 PM, Brent Putman wrote:
>
> The general way to access subcontexts in the tree from a resolver
> script is also documented there in the wiki.  I can't test off-hand,
> but I think the scripted variant for your question should be
> something like the following:
>
> clazloader = resolutionContext.getClass().getClassLoader();
>
> bindingContextClass =
> clazloader.loadClass("org.opensaml.saml.common.messaging.context.SAMLBindingContext");
>
> relayState =
> resolutionContext.getInboundMessageContext().getSubcontext(bindingContextClass).getRelayState();
>  


Actually, I thought Scott had added an overloaded String-based way of
getting at subcontexts, and I do see it there in BaseContext.  So you
could try a slightly simpler approach, could even be a (longish) one-liner:


relayState =
resolutionContext.getInboundMessageContext().getSubcontext("org.opensaml.saml.common.messaging.context.SAMLBindingContext").getRelayState();
  

Assuming that works, we will update the Scripted attribute wiki page,
since it still documents the old way of having to get a Class literal. 
The latter is obviously inconvenient in resolver scripts, as well as views.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20150402/a21b59e3/attachment.html 


More information about the users mailing list