PHP code example of pressbooks / pressbooks-shibboleth-sso
1. Go to this page and download the library: Download pressbooks/pressbooks-shibboleth-sso 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/ */
pressbooks / pressbooks-shibboleth-sso example snippets
add_filter( 'pb_saml_auth_settings', function( $config ) {
$config['sp']['x509cert'] = file_get_contents( '/path/to/sp.key' );
$config['sp']['privateKey'] = file_get_contents( '/path/to/sp.crt' );
return $config;
} );
define( 'PHP_SAML_SP_KEY_PATH', '/path/to/sp.key' );
define( 'PHP_SAML_SP_CERT_PATH', '/path/to/sp.crt' );