MDL-14916:
[moodle-linuxchix.git] / auth / shibboleth / config.html
blob54e097a4ef9b6e1164f4a2d4d0c7fc445c59694b
1 <?php
3 global $CFG;
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>
24 <td>
25 <input name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
26 </td>
27 <td><?php print_string("auth_shib_username_description", "auth") ?></td>
28 </tr>
30 <tr valign="top">
31 <td align="right"><?php print_string("auth_shib_convert_data", "auth") ?>:</td>
32 <td>
33 <input name="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
34 <?php
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");
39 echo '</font>';
43 </td>
44 <td><?php print_string("auth_shib_convert_data_description", "auth"); echo $config->alt_login ?></td>
45 </tr>
47 <tr valign="top">
48 <td align="right">Moodle WAYF Service:</td>
49 <td>
50 <input name="alt_login" type="checkbox" <?php
51 if ( isset($config->alt_login) and $config->alt_login == 'on' ){
52 echo 'checked="checked"';
54 ?> />
55 </td>
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>
57 </tr>
59 <tr valign="top">
60 <td align="right">Identity Providers:</td>
61 <td>
62 <textarea name="organization_selection" rows="10" cols="30" style="overflow: auto; white-space: nowrap;"
63 ><?php
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';
68 } else {
69 echo $config->organization_selection;
72 </textarea>
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");
77 echo '</font>';
80 </td>
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>
84 </tr>
86 <tr valign="top">
87 <td align="right">Authentication Method Name:</td>
88 <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;
92 } else {
93 echo 'Shibboleth Login';
95 ?>" />
96 </td>
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>
98 </tr>
100 <tr valign="top">
101 <td align="right"><?php print_string('auth_shib_changepasswordurl', 'auth') ?>: </td>
102 <td>
103 <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
104 <?php
106 if (isset($err['changepasswordurl'])) {
107 formerr($err['changepasswordurl']);
111 </td>
112 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
113 </tr>
117 <?php
119 print_auth_lock_options('shibboleth', $user_fields, '<!-- empty help -->', true, false);
122 </table>