Conditionally use SAML2 (to Shib) or Legacy Raven based on R4L support requested
Look at the ptags
webauth option to determine whether to use SAML2 or Legacy Raven for sites wanting to support R4L users.
It may be simpler/possible to just redirect requests wanting R4L support to legacy.raven.cam.ac.uk to completely handle.