PHP code example of manyhub / sso-client-php

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

    

manyhub / sso-client-php example snippets


# monscript.php

Client;
use Manyhub\SSO\Client\Component\Signer\Signer;
use Manyhub\SSO\Client\Component\SSOTokenClient;

$client = new SSOTokenClient(new Client(), new Signer());
$result = $client->tryAuth(
       'get',
       $urlSSO,
       $key,
       $secret,
       'HMAC-SHA1',
       '1.0',
       $callback,
       $login,
       $application
);

// Tout se trouve dans $result['redirect_url'] :
// echo $result['redirect_url'];
header('Location: ' . $result['redirect_url']);
exit();