PHP code example of humanmade / wp-simple-saml
1. Go to this page and download the library: Download humanmade/wp-simple-saml 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/ */
humanmade / wp-simple-saml example snippets
add_filter( 'wpsimplesaml_network_activated', '__return_true' )
// SAML metadata XML file path
add_filter( 'wpsimplesaml_idp_metadata_xml_path', function(){
return ABSPATH . '/.private/sso/test.idp.xml';
} );
// Configure attribute mapping between WordPress and SSO IdP SAML attributes
add_filter( 'wpsimplesaml_attribute_mapping', function(){
return [
'user_login' => 'uid',
'user_email' => 'email',
];
} );