public function get_idp_url($identifier=NULL)
{
$postData = array();
$postData['uiMode'] = "popup";
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
CURLOPT_POSTFIELDS => json_encode($postData),
CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_SSL_VERIFYHOST => FALSE));
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code == '200' && !empty($response)) {
$res = json_decode($response, true);
redirect( $res['authUri'] );
} else {
echo "app_error_call_federation";
return;
}
}
1) Open a new blank window.
2) Run the function to get the authorized url.
3) Redirect the window with the authorized url.
4) If you are on the IPD main page to login is that everything went well.
I hope that cleared.