forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.html
144 lines (124 loc) · 5.39 KB
/
config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
global $CFG;
// Set to defaults if undefined
if (!isset($config->auth_instructions) or empty($config->user_attribute)) {
$config->auth_instructions = get_string('auth_shib_instructions', 'auth_shibboleth', $CFG->wwwroot.'/auth/shibboleth/index.php');
}
if (!isset ($config->user_attribute)) {
$config->user_attribute = '';
}
if (!isset ($config->convert_data)) {
$config->convert_data = '';
}
if (!isset($config->changepasswordurl)) {
$config->changepasswordurl = '';
}
?>
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><label for="user_attribute"><?php print_string("username") ?>: </label></td>
<td>
<input id="user_attribute" name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
</td>
<td><?php print_string("auth_shib_username_description", "auth_shibboleth") ?></td>
</tr>
<tr valign="top">
<td align="right"><label for="convert_data"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>: </label></td>
<td>
<input name="convert_data" id="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
<?php
if ($config->convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) {
echo '<br/><span class="notifyproblem">';
print_string("auth_shib_convert_data_warning", "auth_shibboleth");
echo '</span>';
}
?>
</td>
<td><?php print_string("auth_shib_convert_data_description", "auth_shibboleth"); echo (isset($config->alt_login) ? $config->alt_login : '') ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("auth_shib_integrated_wayf", "auth_shibboleth") ?>:</td>
<td>
<input name="alt_login" type="checkbox" <?php
if ( isset($config->alt_login) and $config->alt_login == 'on' ){
echo 'checked="checked"';
}
?> />
</td>
<td><?php print_string("auth_shib_integrated_wayf_description", "auth_shibboleth") ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("auth_shib_idp_list", "auth_shibboleth") ?>:</td>
<td>
<textarea name="organization_selection" rows="10" cols="30" style="overflow: auto;"
><?php
if (!isset($config->organization_selection)){
echo 'urn:mace:organization1:providerID, Example Organization 1
https://another.idp-id.com/shibboleth, Other Example Organization, /Shibboleth.sso/DS/SWITCHaai
urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/SWITCHaai';
} else {
echo htmlentities($config->organization_selection);
}
?>
</textarea>
<?php
if (isset($config->organization_selection) && empty($config->organization_selection) && isset($config->alt_login) && $config->alt_login == 'on') {
echo '<br/><span class="notifyproblem">';
print_string("auth_shib_no_organizations_warning", "auth_shibboleth");
echo '</span>';
}
?>
</td>
<td><?php print_string("auth_shib_idp_list_description", "auth_shibboleth") ?></td>
</tr>
<tr valign="top">
<td align="right"><label for="logout_handler"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>: </label></td>
<td>
<input name="logout_handler" id="logout_handler" type="text" size="30" value="<?php
if ( isset($config->logout_handler) and !empty($config->logout_handler)){
echo $config->logout_handler;
}
?>" />
</td>
<td><?php print_string("auth_shib_logout_url_description", "auth_shibboleth") ?></td>
</tr>
<tr valign="top">
<td align="right"><label for="logout_return_url"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>: </label></td>
<td>
<input name="logout_return_url" id="logout_return_url" type="text" size="30" value="<?php
if ( isset($config->logout_return_url) and !empty($config->logout_return_url)){
echo $config->logout_return_url;
}
?>" />
</td>
<td><?php print_string("auth_shib_logout_return_url_description", "auth_shibboleth") ?></td>
</tr>
<tr valign="top">
<td align="right"><label for="login_name"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>: </label></td>
<td>
<input name="login_name" id="login_name" type="text" size="30" value="<?php
if ( isset($config->login_name) and !empty($config->login_name)){
echo htmlentities($config->login_name);
} else {
echo 'Shibboleth Login';
}
?>" />
</td>
<td><?php print_string("auth_shib_auth_method_description", "auth_shibboleth") ?></td>
</tr>
<tr valign="top">
<td align="right"><label for="changepasswordurl"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </label></td>
<td>
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
echo $OUTPUT->error_text($err['changepasswordurl']);
}
?>
</td>
<td><?php print_string('changepasswordhelp', 'auth') ?></td>
</tr>
<?php
print_auth_lock_options($this->authtype, $user_fields, '<!-- empty help -->', true, false);
?>
</table>