PHP code example of surfnet / stepup-saml-bundle
1. Go to this page and download the library: Download surfnet/stepup-saml-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
surfnet / stepup-saml-bundle example snippets
namespace Acme\SamlBundle
use Surfnet\SamlBundle\Http\XMLResponse;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class MetadataController extends Controller
{
public function metadataAction(Request $request)
{
/** @var \Surfnet\SamlBundle\Metadata\MetadataFactory $metadataFactory */
$metadataFactory = $this->get('surfnet_saml.metadata_factory');
return new XMLResponse($metadataFactory->generate());
}
}