Skip to content
Snippets Groups Projects
Commit 3d129f66 authored by David Metzler's avatar David Metzler
Browse files

#1063664 Require phpCAS>1.0

parent 752a88b0
No related branches found
No related tags found
No related merge requests found
phpCAS is available directly from http://www.ja-sig.org/wiki/display/CASC/phpCAS. phpCAS is distributed under the LGPL license.
You must download and install phpCAS library in order for this CAS module to work.
Your PHP must have the following modules enabled:
--with-curl
--with-openssl
--with-dom
--with-zlib
Drupal modifications
---------------------
1) Enable the CAS module in admin/modules
2) Set the CAS server parameters in admin/config/people/cas
3) Enable the CAS login block to provide authentication.
4) Test authentication
6) If the user database is not external, remove the ability for users to edit own user names
their accounts.
Requirements
============
PHP 5 with the following modules:
curl, openssl, dom, zlib, and xml
phpCAS version 1.0.0 or later.
Installation
============
* Place the cas folder in your Drupal modules directory.
* Download phpCAS from http://www.ja-sig.org/wiki/display/CASC/phpCAS You will
need version 1.0.0 or later.
* There are several locations you can install the phpCAS library.
1. Module directory installation. This means installing the library folder
under the moduels directory, so that the file
sites/<site>/modules/cas/CAS/CAS.php exists.
2. System wide installation. See the phpCAS installation guide, currently at
https://wiki.jasig.org/display/CASC/phpCAS+installation+guide
3. Libraries API installation. Install and enable the Libraries API module,
available at http://drupal.org/project/libraries. Then extract phpCAS so
that sites/<site>/libraries/CAS/CAS.php exists.
* Go to Administer > Modules and enable this module.
* Go to Administer > Configuration > People > CAS to configure the CAS module.
Depending on where and how you installed the phpCAS library, you may need
to configure the path to CAS.php. The current library version will be
displayed if the library is found.
......@@ -182,18 +182,15 @@ function cas_login_check() {
// force CAS authentication
// Determine if CA option is set. This is only avialable in version 0.6 or greater, so we need to test
// to make sure its callable.
if (is_callable(array('phpCAS', 'setNoCasServerValidation'))) {
switch ($cas_cert_verify) {
case CAS_NO_VERIFY:
phpCAS::setNoCasServerValidation();
break;
case CAS_CA_VERIFY:
phpCAS::setCasServerCACert($cas_cert);
break;
}
switch ($cas_cert_verify) {
case CAS_NO_VERIFY:
phpCAS::setNoCasServerValidation();
break;
case CAS_CA_VERIFY:
phpCAS::setCasServerCACert($cas_cert);
break;
}
// We're going to try phpCAS auth test
if (!$cas_force_login) {
$logged_in = phpCAS::checkAuthentication();
......@@ -205,15 +202,7 @@ function cas_login_check() {
}
else {
// using function check for backward compatibility of the cas libraries.
// Newer versions of the cas client use authenticateIfNeeded,
// but older versions use forceAuthentication
if (is_callable(array('phpCAS', 'authenticateIfNeeded'))) {
phpCAS::authenticateIfNeeded();
}
else {
phpCAS::forceAuthentication();
}
phpCAS::forceAuthentication();
}
$cas_name = phpCAS::getUser();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment