/auth/shibboleth/config.html

https://bitbucket.org/kudutest1/moodlegit · HTML · 144 lines · 124 code · 20 blank · 0 comment · 0 complexity · c898463599a0186a7e7aa743494be279 MD5 · raw file

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