Since I got no replies from the forum of anyone having managed to port/rewrite a simplesaml authentication extension for phpBB 3.1.x, I spent some time reading the simplesamlphp and phpBB3 API (also trying to figure out what is working and what not from the -partially deprecated- examples in Area51) and
managed to make this code https://github.com/strandbygaard/phpbb-saml2 work for phpBB3.1.x!
Apart from the necessary reordering of directories and code for the creation of the authentication extension, I made some additions to the code and also managed to make it support custom profiles fields (lastname, firstname, etc provided that they are already created in phpBB and returned by the Idp).
The code is VERY rough since I had very little time to spend on it, but
if anyone is really interested, I might be able to find some time to wipe out things that are specific to my case (also write a proper composer.json) and post a .zip file here (or create a gist/repo) for the community to use and enhance.
Kind regards,
Theodoros Theodoropoulos