Reply
Visitor
issohal
Posts: 1
0

Delegated Authentication (Single Sign On) using PHP

1) Contact Salesforce.com to turn on Single Sign-On for your organization. DONE

2) Download the Web Services Description Language (WSDL) file, AuthenticationService.wsdl, that describes the Single Sign-On service. DONE

3) In Salesforce, specify your organization’s Single Sign-On Gateway URL by clicking Setup Security Controls Single Sign On Settings. DONE

4) Modify your user profiles to contain the "Uses Single Sign-On" user permission. DONE

5) Build your SSO Web Service. NOT DONE

 

Please help me in creating PHP webservice using soap library for single sign on Delegated Authentication.
I had soap library uploaded in my folder. My script is given below please correct if there is anything
missing.

---------------------------------------------------------------------------

Soap Client
<?php
require_once("SoapLibrary/nusoap.php");
ini_set("soap.wsdl_cache_enabled", "0");
try{
$client = new nusoap_client(SITE_URL."SFAuthenticationServer.php");
//$client = new nusoap_client(SITE_URL."AuthenticationService.wsdl.xml");
$param = array('username' =>"test@test.com",'password'=>"xxxxx",'sourceIp'=>$_SERVER['REMOTE_ADDR']);
$ProcessSync = $client->call('Authenticate', $param,'http://www.AccessIntelligence.com/');
echo '<pre>';
print_r($ProcessSync);
}catch (Exception $e) {
$Message = $e->getMessage();
throw new Exception($Message);
}
?>

Soap Server
<?php
require_once("SoapLibrary/nusoap.php");
$server = new soap_server;
$server->configureWSDL('SalesforceAuthenticationServer','urn:SalesforceAuthenticationServer','',"document");
$server->register('Authenticate',array('username'=>'xsd:string','password'=>'xsd:string','sourceIp'=>'xsd:string'),array('return'=>'xsd:string'));
function Authenticate($username, $password, $sourceIp) {
try{
return 'true';
} catch (Exception $e) {
$Message = $e->getMessage();
throw new Exception($Message);
}
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>

-----------------------------------------------------------------------

 

Newbie
yangzhijun1010
Posts: 1
0

Re: Delegated Authentication (Single Sign On) using PHP

hi,Issohal:

I see your step 4) has done, I want to know where can i find "Uses Single Sign-On" check box? i go through all profiles but can not find it in "General User Perssion" section.

Can you help me?