Passing & Accessing Attributes with Tomcat

Peter Schober peter.schober at univie.ac.at
Wed Mar 30 11:18:56 EDT 2016


* Peter Schober <peter.schober at univie.ac.at> [2016-03-30 17:13]:
> > In doing some testing I setup a simple PHP page and attempted to
> > access: $_SERVER['Shib_Affiliation'] but nothing is outputted.  A
> > quick check of Shibboleth.sso/Session reveals that the
> > affiliation, and eppn are present. I can see them with
> > ShowAttributeValues set to True
> 
> Then you're using the wrong keys to the PHP superglobal array, i.e.,
> if /Shibboleth.sso/Session says "affiliation" is set, then you'd have
> to look for $_SERVER['affiliation'], too.
> Printing out all of $_SERVER would quickly make that obvious.

Also, if this is still related to your Tomcat issue, you'll need to
take into account the attributePrefix="AJP_" you may have set
earlier. As $_SERVER would show, the prefix would have to applied the
PHP side as well (or only there, as the prefix won't appear on the
Java side), i.e. $_SERVER['AJP_foo'] for an attribute mapped to "foo"
in your attribute-map.xml.
-peter


More information about the users mailing list