1. Go to this page and download the library: Download beedooedtech/beedoo-saml2 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/ */
'saml2' => [
'acs' => 'https://idp.co/auth/acs', // (the IDP's 'Assertion Consumer Service' URL. Also known as the assertion callback URL or SAML assertion consumer endpoint)
'entityid' => 'http://saml.to/trust', // (the IDP's globally unique "Entity ID", normally formatted as a URI, but it is not a real URL)
'certificate' => 'MIIC4jCCAcqgAwIBAgIQbDO5YO....', // (the IDP's assertion signing certificate)
],
Route::get('/auth/callback', function () {
$user = Socialite::driver('saml2')->stateless()->user();
});
Route::get('/auth/saml2/logout', function () {
$response = Socialite::driver('saml2')->logoutResponse();
});
'saml2' => [
'sp_sls' => 'auth/saml2/logout',
],
'saml2' => [
'sp_certificate' => file_get_contents('path/to/sp_saml.crt'),
'sp_private_key' => file_get_contents('path/to/sp_saml.pem'),
'sp_private_key_passphrase' => 'passphrase to your private key, provide it only if you have one',
'sp_sign_assertions' => true, // or false to disable assertion signing
],