PHP code example of vendasta / sso

1. Go to this page and download the library: Download vendasta/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/ */

    

vendasta / sso example snippets


// Uncomment to use the sandbox environment, as setup for you by Vendasta
// $hostname = 'sso-api-demo.vendasta-internal.com';
// $scope = 'https://sso-api-demo.vendasta-internal.com';

// Production
$hostname = 'sso-api-prod.vendasta-internal.com';
$scope = 'https://sso-api-prod.vendasta-internal.com';

// Reuse this instance for all of your SDK calls
$client = new Vendasta\Sso\V1\IdentityProviderClient($hostname, $scope); // For Identity Providers
// $client = new Vendasta\Sso\V1\ServiceProviderClient($hostname, $scope); // For Service Providers
bash
export VENDASTA_APPLICATION_CREDENTIALS=<path to credentials.json>
./vendor/bin/phpunit --bootstrap vendor/autoload.php test