Created
August 1, 2011 17:48
-
-
Save qetzal/1118622 to your computer and use it in GitHub Desktop.
PHP SSO example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sso_secret = "TEST"; | |
$message = base64_encode("{appId:'123',userId:'234',profile:{email:'test@example.com'}}"); | |
$timestamp = time(); | |
$hmac = hash_hmac('sha1', "$message $timestamp", $sso_secret); | |
echo "<script> var ecwid_sso_profile = '$message $hmac $timestamp' </script>"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment