Closed mmoayyed closed 1 year ago
Here's the code I was talking about that you use after you configure the External Auth handler on the SP
<?php
$url = "http://localhost/Shibboleth.sso/External";
$postData = array(
'NameID' => 'dave@thelangenbergs.com',
'attributes' => 'mail,cn',
'cn' => 'David Langenberg',
'address' => urlencode($_SERVER["REMOTE_ADDR"]),
'mail' => 'davel@uchicago.edu'
);
$ch = curl_init();
curl_setopt_array($ch,array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_POST => true,
CURLOPT_COOKIESESSION => true,
CURLOPT_POSTFIELDS => http_build_query($postData)
)
);
$output = curl_exec($ch);
#turn the returned XML into an array
$ob = simplexml_load_string($output);
$json = json_encode($ob);
$array = json_decode($json,true);
header('Set-cookie: '.$array['Cookie']);
header('Location: /secure');
?>
@mmoayyed and @langedb had a very lively and wildly successful and productive discussion on the native SP backdoor functionality acting as an OIDC client for Shibboleth SPs. Add a summary of that to the roadmap.