PHP code example of theodorejb / saml-utils
1. Go to this page and download the library: Download theodorejb/saml-utils 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/ */
theodorejb / saml-utils example snippets
use LightSaml\Credential\{KeyHelper, X509Certificate};
use theodorejb\SamlUtils\ServiceProvider;
$sp = new ServiceProvider(
entityId: 'https://sp.com/saml',
acsPostUrl: 'https://sp.com/saml/acs',
slsRedirectUrl: 'https://sp.com/saml/sls',
certificate: X509Certificate::fromFile('saml.crt'),
privateKey: KeyHelper::createPrivateKey('saml.pem', '', true),
);