//If the user is not authenticated, authenticate the user
$as->requireAuth();
//Get the users attributes and print them.
$attributes = $as->getAttributes();
print_r($attributes);
//Output the attributes to a file
$myFile = "/tmp/attributes.log";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = print_r($attributes, true);
fwrite($fh, $stringData);
fclose($fh);
//Displays a Login and Logout link
$url_in = $as->getLoginURL();
$url_out = $as->getLogoutURL();
print('<br><a href="' . htmlspecialchars($url_in) . '">Login</a>');
print('<br><a href="' . htmlspecialchars($url_out) . '">Logout</a><br>');
//If using PHP sessions in SimpleSAMLphp cleanup the SimpleSAMLphp session to be able to use $_SESSION
$session = SimpleSAML_Session::getSessionFromRequest();
$session->cleanup();
//Display PHP information
phpinfo()
?>
</body>
</html>
This is related to a previous question I made, and the SP is described on the other question as well as the IDP, and was also able to make a valid request as per IDP rules.
But the question remains, as I don't want to be dependent on PHP, as I wish to integrate this as an IDP proxy on keycloak Saml IDP brokering.
So far I've used the same DomElements contstruction on authsources.php, but without luck