i try to write an Shopware Plugin which provides SSO against different Platforms like Facebook, LinkedIn etc. Unfortunately i get stuck since 2 days into a problem with your session handling.
I call this 2 lines inside my controller action:
$linkedIn = new \SimpleSAML_Auth_Simple('linkedin');
$linkedIn->requireAuth();
When i execute this, something went wrong with the session inside SimpleSamlAuth, because on some time the ReturnTo parameter is not there anymore and i will get an exception:
Bad request received
There is an error in the request to this page. The reason was: Missing ReturnTo parameter.
I think the problem is the shopware system which uses Enlight a Fork from ZendFramework. I recognized that when i put the auth code to a part before the ZendFramework Sessions gets initialized it all works fine!
Is there a best practice how i should configure the session handling for SimpleSamlPhp?