ScreenStepsSingle Sign-on with ScreenSteps Remote Authentication and SAML How ScreenSteps Remote Authentication WorksHow can I log a user into ScreenSteps using PHP and ScreenSteps Remote Authentication?

How can I log a user into ScreenSteps using PHP and ScreenSteps Remote Authentication?

The ScreenSteps Remote Authentication feature allows you to log users into ScreenSteps using a 3rd party system. Here is some example PHP code which takes the 'timestamp' and 'return_to_url' GET parameters, combines them with user information and redirects back to the ScreenSteps server.

We have also developed a remote login plugin for WordPress. You can find that here.

$sToken = 'my-remote-authentication-token'; // different for each account
$sScreenStepsAccountName = 'my-account';
$sFirstName= 'John';
$sLastName= 'Doe';
$sEmail = 'john.doe@email.com';
$sExternalID = ""; 
$sOrganization = ""; 
$sReturnToURL = urlencode($_GET['return_to_url']);
$sTimestamp = $_GET['timestamp'];

/* Build the message */
$sMessage = $sFirstName.$sLastName.$sEmail.$sExternalID.$sOrganization.$sToken.$sTimestamp; 
$sHash = MD5($sMessage);
$sso_url = 'https://' . $sScreenStepsAccountName . '.screenstepslive.com?'.
      'first_name='.urlencode($sFirstName).'&last_name='.urlencode($sLastName).
      '&email='.urlencode($sEmail).'&external_id='.$sExternalID.'&organization='.$sOrganization.
      '&timestamp='.$sTimestamp.'&hash='.$sHash.'&return_to_url='.$sReturnToURL;
header("Location: ".$sso_url);
exit();