58 if (isset(
$_POST[
'home_organization_selection'])) {
66 $_POST[
'idp_selection'] !=
'-' and isset($this->idp_list[
$_POST[
'idp_selection']])
69 $this->selected_idp = $_POST[
'idp_selection'];
117 if (!$this->idp_list) {
124 if (count($idp_cookie) > 0
and isset($arr_idp_list[end($idp_cookie)])) {
125 $selectedIDP = end($idp_cookie);
127 <select name="idp_selection"> 128 <option value="-">' .
$lng->txt(
"shib_member_of") .
'</option>';
131 <select name="idp_selection"> 132 <option value="-" selected="selected">' .
$lng->txt(
"shib_member_of") .
'</option>';
134 foreach ($arr_idp_list as $idp_id => $idp_data) {
135 if ($idp_id == $selectedIDP) {
136 $selectElement .=
'<option value="' . $idp_id .
'" selected="selected">' . $idp_data[0] .
'</option>';
138 $selectElement .=
'<option value="' . $idp_id .
'">' . $idp_data[0] .
'</option>';
144 return $selectElement;
153 if (!$this->idp_list) {
159 $target = trim(ILIAS_HTTP_PATH,
'/') .
'/shib_login.php?target=' .
$_POST[
"il_target"];
161 if (isset($idp_data[1])) {
162 ilUtil::redirect($idp_data[1] .
'?providerId=' . urlencode($this->selected_idp) .
'&target=' 167 ilUtil::redirect(
'/Shibboleth.sso?providerId=' . urlencode($this->selected_idp) .
'&target=' 184 setcookie(
'_saml_idp', $this->
generateCookieValue($arr_idps), time() + (100 * 24 * 3600),
'/');
198 return $lng->txt(
"shib_invalid_home_organization");
212 $idp_raw_list = explode(
"\n",
$ilSetting->get(
"shib_idp_list"));
213 foreach ($idp_raw_list as $idp_line) {
214 $idp_data = explode(
',', $idp_line);
215 if (isset($idp_data[2])) {
216 $idp_list[trim($idp_data[0])] = array( trim($idp_data[1]), trim($idp_data[2]) );
217 } elseif (isset($idp_data[1])) {
218 $idp_list[trim($idp_data[0])] = array( trim($idp_data[1]) );
235 $arr_cookie = explode(
' ', $value);
236 $arr_cookie = array_map(
'base64_decode', $arr_cookie);
251 $arr_cookie = array_map(
'base64_encode', $arr_cookie);
252 $value = implode(
' ', $arr_cookie);
268 array_push($arr_cookie, $value);
269 $arr_cookie = array_reverse($arr_cookie);
270 $arr_cookie = array_unique($arr_cookie);
271 $arr_cookie = array_reverse($arr_cookie);
setSAMLCookie()
Sets the standard SAML domain cookie that is also used to preselect the right entry on the local wayf...
generateCookieArray($value)
generateCookieValue(array $arr_cookie)
static redirect($a_script)
redirect()
Redirects user to the local Shibboleth session initatiotor with already set GET arguments for the rig...
appendCookieValue($value, array $arr_cookie)