cas_var.inc.php 767 B

123456789101112131415161718192021
  1. <?php
  2. /* This file contains all the configuration variable for the cas module
  3. * In the future, these will be in the database
  4. */
  5. require_once('lib/CAS.php');
  6. global $cas_auth_ver, $cas_auth_server, $cas_auth_port, $cas_auth_uri;
  7. $cas_auth_server = api_get_setting('cas_server');
  8. $cas_auth_uri = api_get_setting('cas_server_uri');
  9. $cas_auth_port = intval(api_get_setting('cas_port'));
  10. switch (api_get_setting('cas_protocol')) {
  11. case 'CAS1': $cas_auth_ver = CAS_VERSION_1_0; break;
  12. case 'CAS2': $cas_auth_ver = CAS_VERSION_2_0; break;
  13. case 'SAML': $cas_auth_ver = SAML_VERSION_1_1; break;
  14. default : $cas_auth_ver = CAS_VERSION_2_0; break;
  15. }
  16. $cas_auth_uri = api_get_setting('cas_server_uri');
  17. if ( ! is_string($cas_auth_uri)) $cas_auth_uri = '';
  18. ?>