Hi,
MyUW, based on uPortal 4.2.1, receives some group memberships via a muli-valued HTTP header "ismemberof". It flows from UW's localized Grouper ("Manifest"), through the Shibboleth IdP, through the Shibboleth SP, to MyUW.
We're trying out a custom PAGS "Tester" class to more cleanly check whether that header indicates a user is in a given group.
Regular expressions are hard.
StringContainsTester is tempting but doesn't get the check quite correct.
The not-quite-correct-ness bit MyUW in production recently, which is the motivation for switching to a Tester that makes it easier to configure correctly.
This new HttpHeaderTester is as easy to configure as StringContainsTester, but checks more carefully to avoid the StringContainsTester false positive case.
Sharing the code in case anyone else finds it useful. It might even spare someone a production incident...
-Andrew