src/Pdefreitas/VanillaSSO/VanillaSSO.php
protected static function JsSSOString($User, $ClientID, $Secret)
    {
        if (!isset($User['client_id']))
            $User['client_id'] = $ClientID;

        $String = base64_encode(json_encode($User));
        $Timestamp = time();
        $Hash = hash_hmac('sha1', "$String $Timestamp", $Secret);

        $Result = "$String $Hash $Timestamp hmacsha1";
        return $Result;
    }
protected static function JsSSOString($User, $ClientID, $Secret)
    {
        if (!isset($User['client_id']))
            $User['client_id'] = $ClientID;

        $String = base64_encode(json_encode($User));
        $Timestamp = time();
        $Hash = hash_hmac('sha1', "$String $Timestamp", $Secret);

        $Result = "$String $Hash $Timestamp hmacsha1";
        return $Result;
    }
protected static function JsSSOString ( $ User , $ ClientID , $ Secret ) { if ( ! isset ( $ User [ 'client_id' ] ) ) $ User [ 'client_id' ] = $ ClientID ; $ String = base64_encode ( json_encode ( $ User ) ) ; $ Timestamp = time ( ) ; $ Hash = hash_hmac ( 'sha1' , "$String $Timestamp" , $ Secret ) ; $ Result = "$String $Hash $Timestamp hmacsha1" ; return $ Result ; }
Generate an SSO string suitible for passing in the url for embedded SSO.

@param array $User The user to sso.
@param string $ClientID Your client ID.
@param string $Secret Your secret.
@return string
Generate an SSO string suitible for passing in the url for embedded SSO .