modified for proper PAOS detection, added Spring SAML support