From d9bf22a0e29c2a70049443a0ae8521a2c0492c8b Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 11 Dec 2011 06:38:23 -0500 Subject: initial commit for git repository --- pages/sso.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pages/sso.php (limited to 'pages/sso.php') diff --git a/pages/sso.php b/pages/sso.php new file mode 100644 index 000000000..a0098ce72 --- /dev/null +++ b/pages/sso.php @@ -0,0 +1,52 @@ +wwwroot.'action/openid_client/login'; +// $ts = time(); +// $token = generate_action_token($ts); +// $fields = array( +// '__elgg_token'=>$token, +// '__elgg_ts'=>$ts, +// 'passthru_url'=>'', +// 'externalservice'=>'', +// 'username'=>urlencode($openid_url), +// ); +// +// //url-ify the data for the POST +// foreach($fields as $key=>$value) { +// $fields_string .= $key.'='.$value.'&'; +// } +// rtrim($fields_string,'&'); +// +// //open connection +// $ch = curl_init(); +// +// //set the url, number of POST vars, POST data +// curl_setopt($ch,CURLOPT_URL,$url); +// //curl_setopt($ch,CURLOPT_POST,count($fields)); +// curl_setopt($ch,CURLOPT_POST,true); +// curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); +// curl_setopt($ch,CURLOPT_RETURNTRANSFER,false); +// curl_setopt($ch,CURLOPT_FAILONERROR,true); +// //curl_setopt($ch,CURLOPT_HEADER, true); +// curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true); +// +// //execute post +// curl_exec($ch); +// +// //print_r (curl_getinfo($ch)); +// +// //print $result; +// +// //close connection +// curl_close($ch); + +?> \ No newline at end of file -- cgit v1.2.3