Aw: Re: Accessing headers from Scripted attribute (Shibboleth 3.x)

Ilya Rumyantsev iliggio at gmx.de
Thu Dec 19 09:39:27 EST 2019


> Could you share the result for posterity, either here or in the wiki as an example?

Here we go, please feel free to post it in Wiki:

 <AttributeDefinition
      id="attrFromHeader"
      xsi:type="ScriptedAttribute"
      customObjectRef="shibboleth.HttpServletRequest">
    <Script><![CDATA[
       header = custom.getHeader("X-MY-HEADER");
       attrFromHeader.addValue(header.toString());
    ]]></Script>
  </AttributeDefinition>

BR, Ilya

> Gesendet: Donnerstag, 19. Dezember 2019 um 14:29 Uhr
> Von: "Cantor, Scott" <cantor.2 at osu.edu>
> An: "Shib Users" <users at shibboleth.net>
> Betreff: Re: Accessing headers from Scripted attribute (Shibboleth 3.x)
>
> On 12/19/19, 8:22 AM, "users on behalf of Peter Schober" <users-bounces at shibboleth.net on behalf of peter.schober at univie.ac.at> wrote:
>
> > Could you share the result for posterity, either here or in the wiki as an example?
>
> All of the components in the system that have a customObjectRef or (in Spring XML) p:customObject-ref capability can access any of it by pointing to shibboleth.HttpServletRequest and using the custom (or $custom) variable that will be defined.
>
> -- Scott
>
>
> --
> For Consortium Member technical support, see https://wiki.shibboleth.net/confluence/x/coFAAg
> To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
>


More information about the users mailing list