Import changes from simplesamlphp-authentication 0.7