mijndomein / dreamcommerce-sso-client
A single sign on client for a dreamcommerce webshop
Installs: 1 852
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 23
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.3
- guzzlehttp/guzzle: >=4,<6
- symfony/framework-bundle: ~2.3
Requires (Dev)
- ibuildings/qa-tools: 1.1.*
- mockery/mockery: dev-master@dev
This package is not auto-updated.
Last update: 2018-06-10 13:57:08 UTC
README
To test this run the following script in the root of the project:
<?php require_once "vendor/autoload.php"; use GuzzleHttp\Client as GuzzleClient; use DreamCommerce\SingleSignOn\Ip; use DreamCommerce\SingleSignOn\SignOnMode; use DreamCommerce\SingleSignOn\TimeProvider; use DreamCommerce\SingleSignOn\SingleSignOnClient; // Please change the following values for testing // string hardcoded in the application code, provided by DC $serverSalt = 'salt'; $shopDomain = 'domain-of-your.shop'; // string generated by MD and passed as one of the parameters to "createLicense" api call (should be unique for every shop) $ssoHash = 'sso-hash-for-your-shop'; $client = new SingleSignOnClient( new GuzzleClient(), new TimeProvider, $serverSalt, 'console/plugin/execute/plugin/LmsSSO-SSO/act/handshake/token', 10 ); $handShakeUrl = $client->requestHandshakeUrl( SignOnMode::asUser(), new Ip(file_get_contents('http://api.ipify.org')), $shopDomain, $ssoHash ); echo $handShakeUrl;