Accessing headers from Scripted attribute (Shibboleth 3.x)
Rod Widdowson
rdw at steadingsoftware.com
Thu Dec 19 07:49:52 EST 2019
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20191219/4b07600e/attachment.html>
More information about the users
mailing list