Edited version of simplesaml/saml2