5 // Set to defaults if undefined
6 if (!isset($config->auth_instructions
) or empty($config->user_attribute
)) {
7 $config->auth_instructions
= get_string('auth_shib_instructions', 'auth', $CFG->wwwroot
.'/auth/shibboleth/index.php');
9 if (!isset ($config->user_attribute
)) {
10 $config->user_attribute
= '';
12 if (!isset ($config->convert_data
)) {
13 $config->convert_data
= '';
15 if (!isset($config->changepasswordurl
)) {
16 $config->changepasswordurl
= '';
20 <table cellspacing=
"0" cellpadding=
"5" border=
"0">
22 <tr valign=
"top" class=
"required">
23 <td align=
"right"><?php print_string("username") ?>:
</td>
25 <input name=
"user_attribute" type=
"text" size=
"30" value=
"<?php echo $config->user_attribute ?>" />
27 <td
><?php
print_string("auth_shib_username_description", "auth") ?></td>
31 <td align=
"right"><?php print_string("auth_shib_convert_data", "auth") ?>:
</td>
33 <input name=
"convert_data" type=
"text" size=
"30" value=
"<?php echo $config->convert_data?>" />
36 if ($config->convert_data
and $config->convert_data
!= '' and !is_readable($config->convert_data
)) {
37 echo '<br/><font color="red">';
38 print_string("auth_shib_convert_data_warning", "auth");
44 <td><?php print_string("auth_shib_convert_data_description", "auth"); echo $config->alt_login
?></td>
48 <td align=
"right">Moodle WAYF Service:
</td>
50 <input name=
"alt_login" type=
"checkbox" <?php
51 if ( isset($config->alt_login
) and $config->alt_login
== 'on' ){
52 echo 'checked="checked"';
56 <td>If you check this, Moodle will use its own WAYF service instead of the one configured for Shibboleth. Moodle will display a drop-down list on this alternative login page where the user has to select his Identity Provider.
</td>
60 <td align=
"right">Identity Providers:
</td>
62 <textarea name=
"organization_selection" rows=
"10" cols=
"30" style=
"overflow: auto; white-space: nowrap;"
64 if (!isset($config->organization_selection
)){
65 echo 'urn:mace:organization1:providerID, Example Organization 1
66 https://another.idp-id.com/shibboleth, Other Example Organization
67 urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/SWITCHaai';
69 echo $config->organization_selection
;
74 if (isset($config-
>organization_selection) && empty($config-
>organization_selection) && isset($config-
>alt_login) && $config-
>alt_login == 'on') {
75 echo '
<br/><font color=
"red">';
76 print_string(
"auth_shib_no_organizations_warning",
"auth");
81 <td>Provide a list of Identity Provider entityIDs to let the user choose from on the login page.
82 On each line there must be a comma-separated tuple for entityID of the IdP (see the Shibboleth metadata file) and Name of IdP as it shall be displayed in the drow-down list.
83 As an optional third parameter you can add the location of a Shibboleth session initiator that shall be used in case your Moodle installation is part of a multi federation setup.
</td>
87 <td align=
"right">Authentication Method Name:
</td>
89 <input name=
"login_name" type=
"text" size=
"30" value=
"<?php
90 if ( isset($config->login_name) and !empty($config->login_name)){
91 echo $config->login_name;
93 echo 'Shibboleth Login';
97 <td
>Provide a name
for the Shibboleth authentication method that is familiar to your users
. This could be the name of your Shibboleth federation
, e
.g
. "SWITCHaai Login" or "InCommon Login" and so on
.</td
>
101 <td align
="right"><?php
print_string('auth_shib_changepasswordurl', 'auth') ?>:
</td>
103 <input name=
"changepasswordurl" type=
"text" value=
"<?php echo $config->changepasswordurl ?>" />
106 if (isset($err['changepasswordurl'])) {
107 formerr($err['changepasswordurl']);
112 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
119 print_auth_lock_options('shibboleth', $user_fields, '<!-- empty help -->', true, false);