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

Ilya Rumyantsev iliggio at gmx.de
Thu Dec 19 08:14:44 EST 2019


Thanks Rod, works like charm


> Gesendet: Donnerstag, 19. Dezember 2019 um 13:49 Uhr
> Von: "Rod Widdowson" <rdw at steadingsoftware.com>
> An: "Shib Users" <users at shibboleth.net>
> Betreff: Re: Accessing headers from Scripted attribute (Shibboleth 3.x)
>
> Inject the request context as per [1]
> 
> Note that it might not always be there (for non browser profiles, for which you should look at the profile request context..)
> 
> [1] https://wiki.shibboleth.net/confluence/display/IDP30/ScriptedAttributeDefinition#ScriptedAttributeDefinition-Accessingotherinformation
> 
> Sent from my iPad
> 
> > On 19 Dec 2019, at 12:22, Ilya Rumyantsev <iliggio at gmx.de> wrote:
> > 
> > Hi all, I would like to access http headers from attributes. So far the following works (for jsp pages):
> > 
> > `request.getHeader("X-MY-HEADER");`
> > 
> > 
> > How can I access a header from the attribute, e.g.:
> > 
> > ```
> > <AttributeDefinition
> >      id="headerValue"
> >      xsi:type="ScriptedAttribute">
> >    <Script><![CDATA[
> >      # Something like this
> >      headerValue = request.headers["X-MY-HEADER"]
> >    }
> >    ]]></Script>
> >  </AttributeDefinition>
> > 
> > ```
> > 
> > Thanks a lot,
> > Ilya
> > -- 
> > 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
> -- 
> 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