From 02afa2f19bf528c230adf5a1a63b46eee25281b3 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 8 Aug 2022 16:44:42 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B05270=20-=20Move=20"apereo/phpcas"=20lib?= =?UTF-8?q?=20from=20"authent-cas"=20module=20to=20core=20composer.json=20?= =?UTF-8?q?(#320)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * N°5270 - Move "apereo/phpcas" lib from "authent-cas" module to core composer.json * N°5270 - Rebase on develop branch --- composer.json | 1 + composer.lock | 70 +- datamodels/2.x/authent-cas/composer.json | 5 - datamodels/2.x/authent-cas/composer.lock | 73 -- datamodels/2.x/authent-cas/main.php | 1 - .../vendor/apereo/phpcas/composer.json | 29 - .../2.x/authent-cas/vendor/autoload.php | 7 - .../vendor/composer/ClassLoader.php | 445 ------- .../2.x/authent-cas/vendor/composer/LICENSE | 21 - .../vendor/composer/autoload_classmap.php | 54 - .../vendor/composer/autoload_namespaces.php | 9 - .../vendor/composer/autoload_psr4.php | 9 - .../vendor/composer/autoload_real.php | 52 - .../vendor/composer/autoload_static.php | 64 - .../vendor/composer/installed.json | 59 - lib/apereo/phpcas/.codecov.yml | 17 + .../apereo/phpcas/.gitattributes | 0 lib/apereo/phpcas/.github/dependabot.yml | 7 + lib/apereo/phpcas/.github/workflows/test.yml | 43 + .../vendor => lib}/apereo/phpcas/CAS.php | 6 +- .../vendor => lib}/apereo/phpcas/LICENSE | 0 .../vendor => lib}/apereo/phpcas/NOTICE | 0 .../vendor => lib}/apereo/phpcas/README.md | 13 +- lib/apereo/phpcas/composer.json | 55 + lib/apereo/phpcas/phpunit.xml.dist | 13 + .../apereo/phpcas/source/CAS.php | 111 +- .../source/CAS/AuthenticationException.php | 16 +- .../apereo/phpcas/source/CAS/Autoload.php | 31 +- .../apereo/phpcas/source/CAS/Client.php | 1136 ++++++++++++----- .../apereo/phpcas/source/CAS/CookieJar.php | 3 +- .../apereo/phpcas/source/CAS/Exception.php | 4 +- .../CAS/GracefullTerminationException.php | 4 +- .../source/CAS/InvalidArgumentException.php | 4 +- .../phpcas/source/CAS/Languages/Catalan.php | 2 +- .../CAS/Languages/ChineseSimplified.php | 4 +- .../phpcas/source/CAS/Languages/English.php | 4 +- .../phpcas/source/CAS/Languages/French.php | 4 +- .../phpcas/source/CAS/Languages/Galego.php | 117 ++ .../phpcas/source/CAS/Languages/German.php | 2 +- .../phpcas/source/CAS/Languages/Greek.php | 2 +- .../phpcas/source/CAS/Languages/Japanese.php | 2 +- .../CAS/Languages/LanguageInterface.php | 4 +- .../source/CAS/Languages/Portuguese.php | 114 ++ .../phpcas/source/CAS/Languages/Spanish.php | 2 +- ...uenceBeforeAuthenticationCallException.php | 2 +- .../OutOfSequenceBeforeClientException.php | 2 +- .../CAS/OutOfSequenceBeforeProxyException.php | 2 +- .../source/CAS/OutOfSequenceException.php | 2 +- .../source/CAS/PGTStorage/AbstractStorage.php | 2 +- .../phpcas/source/CAS/PGTStorage/Db.php | 2 +- .../phpcas/source/CAS/PGTStorage/File.php | 2 +- .../phpcas/source/CAS/ProxiedService.php | 2 +- .../source/CAS/ProxiedService/Abstract.php | 2 +- .../source/CAS/ProxiedService/Exception.php | 2 +- .../phpcas/source/CAS/ProxiedService/Http.php | 2 +- .../CAS/ProxiedService/Http/Abstract.php | 2 +- .../source/CAS/ProxiedService/Http/Get.php | 2 +- .../source/CAS/ProxiedService/Http/Post.php | 2 +- .../phpcas/source/CAS/ProxiedService/Imap.php | 2 +- .../source/CAS/ProxiedService/Testable.php | 2 +- .../apereo/phpcas/source/CAS/ProxyChain.php | 2 +- .../source/CAS/ProxyChain/AllowedList.php | 2 +- .../phpcas/source/CAS/ProxyChain/Any.php | 2 +- .../source/CAS/ProxyChain/Interface.php | 4 +- .../phpcas/source/CAS/ProxyChain/Trusted.php | 2 +- .../source/CAS/ProxyTicketException.php | 2 +- .../source/CAS/Request/AbstractRequest.php | 2 +- .../source/CAS/Request/CurlMultiRequest.php | 2 +- .../phpcas/source/CAS/Request/CurlRequest.php | 15 +- .../phpcas/source/CAS/Request/Exception.php | 2 +- .../CAS/Request/MultiRequestInterface.php | 2 +- .../source/CAS/Request/RequestInterface.php | 2 +- .../phpcas/source/CAS/Session/PhpSession.php | 45 + .../source/CAS/TypeMismatchException.php | 2 +- lib/composer/autoload_classmap.php | 68 +- lib/composer/autoload_files.php | 2 +- lib/composer/autoload_psr4.php | 2 +- lib/composer/autoload_static.php | 74 +- lib/composer/installed.json | 71 ++ lib/composer/installed.php | 13 +- lib/composer/platform_check.php | 1 + 81 files changed, 1611 insertions(+), 1357 deletions(-) delete mode 100644 datamodels/2.x/authent-cas/composer.json delete mode 100644 datamodels/2.x/authent-cas/composer.lock delete mode 100644 datamodels/2.x/authent-cas/vendor/apereo/phpcas/composer.json delete mode 100644 datamodels/2.x/authent-cas/vendor/autoload.php delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/ClassLoader.php delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/LICENSE delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/autoload_classmap.php delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/autoload_namespaces.php delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/autoload_psr4.php delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/autoload_real.php delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/autoload_static.php delete mode 100644 datamodels/2.x/authent-cas/vendor/composer/installed.json create mode 100644 lib/apereo/phpcas/.codecov.yml rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/.gitattributes (100%) create mode 100644 lib/apereo/phpcas/.github/dependabot.yml create mode 100644 lib/apereo/phpcas/.github/workflows/test.yml rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/CAS.php (86%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/LICENSE (100%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/NOTICE (100%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/README.md (73%) create mode 100644 lib/apereo/phpcas/composer.json create mode 100644 lib/apereo/phpcas/phpunit.xml.dist rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS.php (94%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/AuthenticationException.php (94%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Autoload.php (74%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Client.php (79%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/CookieJar.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Exception.php (98%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/GracefullTerminationException.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/InvalidArgumentException.php (98%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/Catalan.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/English.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/French.php (99%) create mode 100644 lib/apereo/phpcas/source/CAS/Languages/Galego.php rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/German.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/Greek.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/Japanese.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/LanguageInterface.php (99%) create mode 100644 lib/apereo/phpcas/source/CAS/Languages/Portuguese.php rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Languages/Spanish.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/OutOfSequenceException.php (98%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/PGTStorage/Db.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/PGTStorage/File.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Abstract.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Exception.php (98%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Http.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Imap.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxiedService/Testable.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxyChain.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxyChain/Any.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxyChain/Interface.php (98%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxyChain/Trusted.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/ProxyTicketException.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Request/AbstractRequest.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Request/CurlRequest.php (93%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Request/Exception.php (98%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php (99%) rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/Request/RequestInterface.php (99%) create mode 100644 lib/apereo/phpcas/source/CAS/Session/PhpSession.php rename {datamodels/2.x/authent-cas/vendor => lib}/apereo/phpcas/source/CAS/TypeMismatchException.php (99%) diff --git a/composer.json b/composer.json index c0dd34675..341e70135 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "ext-json": "*", "ext-mysqli": "*", "ext-soap": "*", + "apereo/phpcas" : "~1.3", "combodo/tcpdf": "~6.4.4", "guzzlehttp/guzzle": "^7.4.5", "laminas/laminas-mail": "^2.11", diff --git a/composer.lock b/composer.lock index b3d0fd08a..1c2b92f70 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,76 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "602165ae648abe1eb93c98704bddbd30", + "content-hash": "276d2024de344c0d4105b15850560696", "packages": [ + { + "name": "apereo/phpcas", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/apereo/phpCAS.git", + "reference": "d6f5797fb568726f34c8e48741776d81e4a2646b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apereo/phpCAS/zipball/d6f5797fb568726f34c8e48741776d81e4a2646b", + "reference": "d6f5797fb568726f34c8e48741776d81e4a2646b", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-dom": "*", + "php": ">=7.1.0", + "psr/log": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "monolog/monolog": "^1.0.0 || ^2.0.0", + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": ">=7.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "source/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Joachim Fritschi", + "email": "jfritschi@freenet.de", + "homepage": "https://github.com/jfritschi" + }, + { + "name": "Adam Franco", + "homepage": "https://github.com/adamfranco" + }, + { + "name": "Henry Pan", + "homepage": "https://github.com/phy25" + } + ], + "description": "Provides a simple API for authenticating users against a CAS server", + "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", + "keywords": [ + "apereo", + "cas", + "jasig" + ], + "support": { + "issues": "https://github.com/apereo/phpCAS/issues", + "source": "https://github.com/apereo/phpCAS/tree/1.5.0" + }, + "time": "2022-05-03T21:12:54+00:00" + }, { "name": "combodo/tcpdf", "version": "6.4.4", diff --git a/datamodels/2.x/authent-cas/composer.json b/datamodels/2.x/authent-cas/composer.json deleted file mode 100644 index 91734a0ed..000000000 --- a/datamodels/2.x/authent-cas/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require" : { - "apereo/phpcas" : "~1.3" - } -} \ No newline at end of file diff --git a/datamodels/2.x/authent-cas/composer.lock b/datamodels/2.x/authent-cas/composer.lock deleted file mode 100644 index 4f4b75cd3..000000000 --- a/datamodels/2.x/authent-cas/composer.lock +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "4db4df78154f0de344ba35a27fe766b7", - "packages": [ - { - "name": "apereo/phpcas", - "version": "1.3.7", - "source": { - "type": "git", - "url": "https://github.com/apereo/phpCAS.git", - "reference": "b5b29102c3a42f570c4a3e852f3cf67cae6d6082" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/apereo/phpCAS/zipball/b5b29102c3a42f570c4a3e852f3cf67cae6d6082", - "reference": "b5b29102c3a42f570c4a3e852f3cf67cae6d6082", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~3.7.10" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "source/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Joachim Fritschi", - "homepage": "https://wiki.jasig.org/display/~fritschi" - }, - { - "name": "Adam Franco", - "homepage": "https://wiki.jasig.org/display/~adamfranco" - } - ], - "description": "Provides a simple API for authenticating users against a CAS server", - "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", - "keywords": [ - "apereo", - "cas", - "jasig" - ], - "time": "2019-04-22T19:48:16+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/datamodels/2.x/authent-cas/main.php b/datamodels/2.x/authent-cas/main.php index aa7e99d1d..f30c02829 100644 --- a/datamodels/2.x/authent-cas/main.php +++ b/datamodels/2.x/authent-cas/main.php @@ -1,4 +1,3 @@ =5.4.0", - "ext-curl": "*" - }, - "require-dev": { - "phpunit/phpunit": "~3.7.10" - }, - "autoload": { - "classmap": [ - "source/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - } -} diff --git a/datamodels/2.x/authent-cas/vendor/autoload.php b/datamodels/2.x/authent-cas/vendor/autoload.php deleted file mode 100644 index 157d2fd21..000000000 --- a/datamodels/2.x/authent-cas/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; - if (isset($this->prefixDirsPsr4[$search])) { - foreach ($this->prefixDirsPsr4[$search] as $dir) { - $length = $this->prefixLengthsPsr4[$first][$search]; - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/datamodels/2.x/authent-cas/vendor/composer/LICENSE b/datamodels/2.x/authent-cas/vendor/composer/LICENSE deleted file mode 100644 index f27399a04..000000000 --- a/datamodels/2.x/authent-cas/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/datamodels/2.x/authent-cas/vendor/composer/autoload_classmap.php b/datamodels/2.x/authent-cas/vendor/composer/autoload_classmap.php deleted file mode 100644 index 5396a2faa..000000000 --- a/datamodels/2.x/authent-cas/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,54 +0,0 @@ - $vendorDir . '/apereo/phpcas/source/CAS/AuthenticationException.php', - 'CAS_Client' => $vendorDir . '/apereo/phpcas/source/CAS/Client.php', - 'CAS_CookieJar' => $vendorDir . '/apereo/phpcas/source/CAS/CookieJar.php', - 'CAS_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/Exception.php', - 'CAS_GracefullTerminationException' => $vendorDir . '/apereo/phpcas/source/CAS/GracefullTerminationException.php', - 'CAS_InvalidArgumentException' => $vendorDir . '/apereo/phpcas/source/CAS/InvalidArgumentException.php', - 'CAS_Languages_Catalan' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Catalan.php', - 'CAS_Languages_ChineseSimplified' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php', - 'CAS_Languages_English' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/English.php', - 'CAS_Languages_French' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/French.php', - 'CAS_Languages_German' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/German.php', - 'CAS_Languages_Greek' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Greek.php', - 'CAS_Languages_Japanese' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Japanese.php', - 'CAS_Languages_LanguageInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/LanguageInterface.php', - 'CAS_Languages_Spanish' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Spanish.php', - 'CAS_OutOfSequenceBeforeAuthenticationCallException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php', - 'CAS_OutOfSequenceBeforeClientException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php', - 'CAS_OutOfSequenceBeforeProxyException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php', - 'CAS_OutOfSequenceException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceException.php', - 'CAS_PGTStorage_AbstractStorage' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php', - 'CAS_PGTStorage_Db' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/Db.php', - 'CAS_PGTStorage_File' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/File.php', - 'CAS_ProxiedService' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService.php', - 'CAS_ProxiedService_Abstract' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Abstract.php', - 'CAS_ProxiedService_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Exception.php', - 'CAS_ProxiedService_Http' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http.php', - 'CAS_ProxiedService_Http_Abstract' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php', - 'CAS_ProxiedService_Http_Get' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php', - 'CAS_ProxiedService_Http_Post' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php', - 'CAS_ProxiedService_Imap' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Imap.php', - 'CAS_ProxiedService_Testable' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Testable.php', - 'CAS_ProxyChain' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain.php', - 'CAS_ProxyChain_AllowedList' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php', - 'CAS_ProxyChain_Any' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Any.php', - 'CAS_ProxyChain_Interface' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Interface.php', - 'CAS_ProxyChain_Trusted' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Trusted.php', - 'CAS_ProxyTicketException' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyTicketException.php', - 'CAS_Request_AbstractRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/AbstractRequest.php', - 'CAS_Request_CurlMultiRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php', - 'CAS_Request_CurlRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/CurlRequest.php', - 'CAS_Request_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/Request/Exception.php', - 'CAS_Request_MultiRequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php', - 'CAS_Request_RequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/RequestInterface.php', - 'CAS_TypeMismatchException' => $vendorDir . '/apereo/phpcas/source/CAS/TypeMismatchException.php', - 'phpCAS' => $vendorDir . '/apereo/phpcas/source/CAS.php', -); diff --git a/datamodels/2.x/authent-cas/vendor/composer/autoload_namespaces.php b/datamodels/2.x/authent-cas/vendor/composer/autoload_namespaces.php deleted file mode 100644 index b7fc0125d..000000000 --- a/datamodels/2.x/authent-cas/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInitfbc00f22d0b7b7b490d18e0252e08746::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - return $loader; - } -} diff --git a/datamodels/2.x/authent-cas/vendor/composer/autoload_static.php b/datamodels/2.x/authent-cas/vendor/composer/autoload_static.php deleted file mode 100644 index e9cf76615..000000000 --- a/datamodels/2.x/authent-cas/vendor/composer/autoload_static.php +++ /dev/null @@ -1,64 +0,0 @@ - __DIR__ . '/..' . '/apereo/phpcas/source/CAS/AuthenticationException.php', - 'CAS_Client' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Client.php', - 'CAS_CookieJar' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/CookieJar.php', - 'CAS_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Exception.php', - 'CAS_GracefullTerminationException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/GracefullTerminationException.php', - 'CAS_InvalidArgumentException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/InvalidArgumentException.php', - 'CAS_Languages_Catalan' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Catalan.php', - 'CAS_Languages_ChineseSimplified' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php', - 'CAS_Languages_English' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/English.php', - 'CAS_Languages_French' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/French.php', - 'CAS_Languages_German' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/German.php', - 'CAS_Languages_Greek' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Greek.php', - 'CAS_Languages_Japanese' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Japanese.php', - 'CAS_Languages_LanguageInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/LanguageInterface.php', - 'CAS_Languages_Spanish' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Spanish.php', - 'CAS_OutOfSequenceBeforeAuthenticationCallException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php', - 'CAS_OutOfSequenceBeforeClientException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php', - 'CAS_OutOfSequenceBeforeProxyException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php', - 'CAS_OutOfSequenceException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceException.php', - 'CAS_PGTStorage_AbstractStorage' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php', - 'CAS_PGTStorage_Db' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/Db.php', - 'CAS_PGTStorage_File' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/File.php', - 'CAS_ProxiedService' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService.php', - 'CAS_ProxiedService_Abstract' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Abstract.php', - 'CAS_ProxiedService_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Exception.php', - 'CAS_ProxiedService_Http' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http.php', - 'CAS_ProxiedService_Http_Abstract' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php', - 'CAS_ProxiedService_Http_Get' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php', - 'CAS_ProxiedService_Http_Post' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php', - 'CAS_ProxiedService_Imap' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Imap.php', - 'CAS_ProxiedService_Testable' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Testable.php', - 'CAS_ProxyChain' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain.php', - 'CAS_ProxyChain_AllowedList' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php', - 'CAS_ProxyChain_Any' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Any.php', - 'CAS_ProxyChain_Interface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Interface.php', - 'CAS_ProxyChain_Trusted' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Trusted.php', - 'CAS_ProxyTicketException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyTicketException.php', - 'CAS_Request_AbstractRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/AbstractRequest.php', - 'CAS_Request_CurlMultiRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php', - 'CAS_Request_CurlRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/CurlRequest.php', - 'CAS_Request_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/Exception.php', - 'CAS_Request_MultiRequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php', - 'CAS_Request_RequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/RequestInterface.php', - 'CAS_TypeMismatchException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/TypeMismatchException.php', - 'phpCAS' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInitfbc00f22d0b7b7b490d18e0252e08746::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/datamodels/2.x/authent-cas/vendor/composer/installed.json b/datamodels/2.x/authent-cas/vendor/composer/installed.json deleted file mode 100644 index cb01b031c..000000000 --- a/datamodels/2.x/authent-cas/vendor/composer/installed.json +++ /dev/null @@ -1,59 +0,0 @@ -[ - { - "name": "apereo/phpcas", - "version": "1.3.7", - "version_normalized": "1.3.7.0", - "source": { - "type": "git", - "url": "https://github.com/apereo/phpCAS.git", - "reference": "b5b29102c3a42f570c4a3e852f3cf67cae6d6082" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/apereo/phpCAS/zipball/b5b29102c3a42f570c4a3e852f3cf67cae6d6082", - "reference": "b5b29102c3a42f570c4a3e852f3cf67cae6d6082", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~3.7.10" - }, - "time": "2019-04-22T19:48:16+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "source/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Joachim Fritschi", - "homepage": "https://wiki.jasig.org/display/~fritschi" - }, - { - "name": "Adam Franco", - "homepage": "https://wiki.jasig.org/display/~adamfranco" - } - ], - "description": "Provides a simple API for authenticating users against a CAS server", - "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", - "keywords": [ - "apereo", - "cas", - "jasig" - ] - } -] diff --git a/lib/apereo/phpcas/.codecov.yml b/lib/apereo/phpcas/.codecov.yml new file mode 100644 index 000000000..ddfdd0eff --- /dev/null +++ b/lib/apereo/phpcas/.codecov.yml @@ -0,0 +1,17 @@ +codecov: + strict_yaml_branch: master + +coverage: + round: up + precision: 2 + status: + project: + default: + target: "70%" + informational: true + patch: # temporarily disabled + default: + target: "70%" + informational: true + +comment: false diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/.gitattributes b/lib/apereo/phpcas/.gitattributes similarity index 100% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/.gitattributes rename to lib/apereo/phpcas/.gitattributes diff --git a/lib/apereo/phpcas/.github/dependabot.yml b/lib/apereo/phpcas/.github/dependabot.yml new file mode 100644 index 000000000..c630ffa6b --- /dev/null +++ b/lib/apereo/phpcas/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/lib/apereo/phpcas/.github/workflows/test.yml b/lib/apereo/phpcas/.github/workflows/test.yml new file mode 100644 index 000000000..081e334d6 --- /dev/null +++ b/lib/apereo/phpcas/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: Test + +on: + - push + - pull_request + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php-version: + - php: '7.2' + phpunit: '8' + - php: '7.3' + phpunit: latest + - php: '7.4' + phpunit: latest + - php: '8.0' + phpunit: latest + - php: '8.1' + phpunit: latest + steps: + - uses: actions/checkout@v2 + - uses: php-actions/composer@v6 + with: + php_version: "${{ matrix.php-version.php }}" + - name: Run PHPUnit + uses: php-actions/phpunit@v3 + with: + version: "${{ matrix.php-version.phpunit }}" + php_version: "${{ matrix.php-version.php }}" + php_extensions: xdebug + args: --verbose --coverage-clover=coverage.xml + bootstrap: vendor/autoload.php + env: + XDEBUG_MODE: coverage + - name: Report coverage + uses: codecov/codecov-action@v1 + with: + files: coverage.xml diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/CAS.php b/lib/apereo/phpcas/CAS.php similarity index 86% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/CAS.php rename to lib/apereo/phpcas/CAS.php index 8cd549ea3..6ddcf07bc 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/CAS.php +++ b/lib/apereo/phpcas/CAS.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS.php * @category Authentication @@ -27,4 +27,6 @@ * @link https://wiki.jasig.org/display/CASC/phpCAS */ -require_once dirname(__FILE__).'/source/CAS.php'; \ No newline at end of file +require_once __DIR__.'/source/CAS.php'; + +trigger_error('Including CAS.php is deprecated. Install phpCAS using composer instead.', E_USER_DEPRECATED); diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/LICENSE b/lib/apereo/phpcas/LICENSE similarity index 100% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/LICENSE rename to lib/apereo/phpcas/LICENSE diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/NOTICE b/lib/apereo/phpcas/NOTICE similarity index 100% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/NOTICE rename to lib/apereo/phpcas/NOTICE diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/README.md b/lib/apereo/phpcas/README.md similarity index 73% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/README.md rename to lib/apereo/phpcas/README.md index f425edca8..d48128912 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/README.md +++ b/lib/apereo/phpcas/README.md @@ -6,22 +6,21 @@ users via a Central Authentication Service (CAS) server. Please see the wiki website for more information: -https://wiki.jasig.org/display/CASC/phpCAS +https://apereo.github.io/phpCAS/ Api documentation can be found here: -https://apereo.github.io/phpCAS/ +https://apereo.github.io/phpCAS/api/ -[![Build Status](https://travis-ci.org/apereo/phpCAS.png)](https://travis-ci.org/apereo/phpCAS) - +[![Test](https://github.com/apereo/phpCAS/actions/workflows/test.yml/badge.svg)](https://github.com/apereo/phpCAS/actions/workflows/test.yml) LICENSE ------- -Copyright 2007-2015, JA-SIG, Inc. -This project includes software developed by Jasig. -http://www.jasig.org/ +Copyright 2007-2020, Apereo Foundation. +This project includes software developed by Apereo Foundation. +http://www.apereo.org/ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. diff --git a/lib/apereo/phpcas/composer.json b/lib/apereo/phpcas/composer.json new file mode 100644 index 000000000..89ab7b9f6 --- /dev/null +++ b/lib/apereo/phpcas/composer.json @@ -0,0 +1,55 @@ +{ + "name" : "apereo/phpcas", + "description" : "Provides a simple API for authenticating users against a CAS server", + "keywords" : [ + "cas", + "jasig", + "apereo" + ], + "homepage" : "https://wiki.jasig.org/display/CASC/phpCAS", + "type" : "library", + "license" : "Apache-2.0", + "authors" : [{ + "name" : "Joachim Fritschi", + "homepage" : "https://github.com/jfritschi", + "email" : "jfritschi@freenet.de" + }, { + "name" : "Adam Franco", + "homepage" : "https://github.com/adamfranco" + }, { + "name" : "Henry Pan", + "homepage" : "https://github.com/phy25" + } + ], + "require" : { + "php" : ">=7.1.0", + "ext-curl" : "*", + "ext-dom" : "*", + "psr/log" : "^1.0 || ^2.0 || ^3.0" + }, + "require-dev" : { + "monolog/monolog" : "^1.0.0 || ^2.0.0", + "phpunit/phpunit" : ">=7.5", + "phpstan/phpstan" : "^1.5" + }, + "autoload" : { + "classmap" : [ + "source/" + ] + }, + "autoload-dev" : { + "files": ["source/CAS.php"], + "psr-4" : { + "PhpCas\\" : "test/CAS/" + } + }, + "scripts" : { + "test" : "phpunit", + "phpstan" : "phpstan" + }, + "extra" : { + "branch-alias" : { + "dev-master" : "1.3.x-dev" + } + } +} diff --git a/lib/apereo/phpcas/phpunit.xml.dist b/lib/apereo/phpcas/phpunit.xml.dist new file mode 100644 index 000000000..f0431f153 --- /dev/null +++ b/lib/apereo/phpcas/phpunit.xml.dist @@ -0,0 +1,13 @@ + + + + + source/ + + + + + test/CAS/Tests/ + + + diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS.php b/lib/apereo/phpcas/source/CAS.php similarity index 94% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS.php rename to lib/apereo/phpcas/source/CAS.php index dd17a48e4..c30e22d0a 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS.php +++ b/lib/apereo/phpcas/source/CAS.php @@ -20,7 +20,7 @@ * * * Interface class of the phpCAS library - * PHP Version 5 + * PHP Version 7 * * @file CAS/CAS.php * @category Authentication @@ -35,6 +35,7 @@ * @ingroup public */ +use Psr\Log\LoggerInterface; // // hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] @@ -44,11 +45,6 @@ if (!isset($_SERVER['REQUEST_URI']) && isset($_SERVER['SCRIPT_NAME']) && isset($ $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']; } -// Add a E_USER_DEPRECATED for php versions <= 5.2 -if (!defined('E_USER_DEPRECATED')) { - define('E_USER_DEPRECATED', E_USER_NOTICE); -} - // ######################################################################## // CONSTANTS @@ -61,7 +57,7 @@ if (!defined('E_USER_DEPRECATED')) { /** * phpCAS version. accessible for the user by phpCAS::getVersion(). */ -define('PHPCAS_VERSION', '1.3.7'); +define('PHPCAS_VERSION', '1.5.0'); /** * @addtogroup public @@ -140,11 +136,6 @@ define("SAML_SOAP_ENV_CLOSE", ''); */ define("SAML_ATTRIBUTES", 'SAMLATTRIBS'); -/** - * SAML Attributes - */ -define("DEFAULT_ERROR", 'Internal script failure'); - /** @} */ /** * @addtogroup publicPGTStorage @@ -224,6 +215,8 @@ define("PHPCAS_LANG_JAPANESE", 'CAS_Languages_Japanese'); define("PHPCAS_LANG_SPANISH", 'CAS_Languages_Spanish'); define("PHPCAS_LANG_CATALAN", 'CAS_Languages_Catalan'); define("PHPCAS_LANG_CHINESE_SIMPLIFIED", 'CAS_Languages_ChineseSimplified'); +define("PHPCAS_LANG_GALEGO", 'CAS_Languages_Galego'); +define("PHPCAS_LANG_PORTUGUESE", 'CAS_Languages_Portuguese'); /** @} */ @@ -261,7 +254,7 @@ define('DEFAULT_DEBUG_DIR', gettmpdir()."/"); /** @} */ // include the class autoloader -require_once dirname(__FILE__) . '/CAS/Autoload.php'; +require_once __DIR__ . '/CAS/Autoload.php'; /** * The phpCAS class is a simple container for the phpCAS library. It provides CAS @@ -330,12 +323,14 @@ class phpCAS /** * phpCAS client initializer. * - * @param string $server_version the version of the CAS server - * @param string $server_hostname the hostname of the CAS server - * @param int $server_port the port the CAS server is running on - * @param string $server_uri the URI the CAS server is responding on - * @param bool $changeSessionID Allow phpCAS to change the session_id (Single - * Sign Out/handleLogoutRequests is based on that change) + * @param string $server_version the version of the CAS server + * @param string $server_hostname the hostname of the CAS server + * @param int $server_port the port the CAS server is running on + * @param string $server_uri the URI the CAS server is responding on + * @param bool $changeSessionID Allow phpCAS to change the session_id + * (Single Sign Out/handleLogoutRequests + * is based on that change) + * @param \SessionHandlerInterface $sessionHandler the session handler * * @return void a newly created CAS_Client object * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be @@ -343,7 +338,7 @@ class phpCAS * and phpCAS::setDebug()). */ public static function client($server_version, $server_hostname, - $server_port, $server_uri, $changeSessionID = true + $server_port, $server_uri, $changeSessionID = true, \SessionHandlerInterface $sessionHandler = null ) { phpCAS :: traceBegin(); if (is_object(self::$_PHPCAS_CLIENT)) { @@ -363,7 +358,7 @@ class phpCAS try { self::$_PHPCAS_CLIENT = new CAS_Client( $server_version, false, $server_hostname, $server_port, $server_uri, - $changeSessionID + $changeSessionID, $sessionHandler ); } catch (Exception $e) { phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); @@ -374,12 +369,14 @@ class phpCAS /** * phpCAS proxy initializer. * - * @param string $server_version the version of the CAS server - * @param string $server_hostname the hostname of the CAS server - * @param int $server_port the port the CAS server is running on - * @param string $server_uri the URI the CAS server is responding on - * @param bool $changeSessionID Allow phpCAS to change the session_id (Single - * Sign Out/handleLogoutRequests is based on that change) + * @param string $server_version the version of the CAS server + * @param string $server_hostname the hostname of the CAS server + * @param string $server_port the port the CAS server is running on + * @param string $server_uri the URI the CAS server is responding on + * @param bool $changeSessionID Allow phpCAS to change the session_id + * (Single Sign Out/handleLogoutRequests + * is based on that change) + * @param \SessionHandlerInterface $sessionHandler the session handler * * @return void a newly created CAS_Client object * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be @@ -387,7 +384,7 @@ class phpCAS * and phpCAS::setDebug()). */ public static function proxy($server_version, $server_hostname, - $server_port, $server_uri, $changeSessionID = true + $server_port, $server_uri, $changeSessionID = true, \SessionHandlerInterface $sessionHandler = null ) { phpCAS :: traceBegin(); if (is_object(self::$_PHPCAS_CLIENT)) { @@ -407,7 +404,7 @@ class phpCAS try { self::$_PHPCAS_CLIENT = new CAS_Client( $server_version, true, $server_hostname, $server_port, $server_uri, - $changeSessionID + $changeSessionID, $sessionHandler ); } catch (Exception $e) { phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); @@ -435,6 +432,24 @@ class phpCAS * @{ */ + /** + * Set/unset PSR-3 logger + * + * @param LoggerInterface $logger the PSR-3 logger used for logging, or + * null to stop logging. + * + * @return void + */ + public static function setLogger($logger = null) + { + if (empty(self::$_PHPCAS_DEBUG['unique_id'])) { + self::$_PHPCAS_DEBUG['unique_id'] = substr(strtoupper(md5(uniqid(''))), 0, 4); + } + self::$_PHPCAS_DEBUG['logger'] = $logger; + self::$_PHPCAS_DEBUG['indent'] = 0; + phpCAS :: trace('START ('.date("Y-m-d H:i:s").') phpCAS-' . PHPCAS_VERSION . ' ******************'); + } + /** * Set/unset debug mode * @@ -442,9 +457,13 @@ class phpCAS * to stop debugging. * * @return void + * + * @deprecated */ public static function setDebug($filename = '') { + trigger_error('phpCAS::setDebug() is deprecated in favor of phpCAS::setLogger().', E_USER_DEPRECATED); + if ($filename != false && gettype($filename) != 'string') { phpCAS :: error('type mismatched for parameter $dbg (should be false or the name of the log file)'); } @@ -518,14 +537,7 @@ class phpCAS $indent_str = "."; - if (!empty(self::$_PHPCAS_DEBUG['filename'])) { - // Check if file exists and modifiy file permissions to be only - // readable by the webserver - if (!file_exists(self::$_PHPCAS_DEBUG['filename'])) { - touch(self::$_PHPCAS_DEBUG['filename']); - // Chmod will fail on windows - @chmod(self::$_PHPCAS_DEBUG['filename'], 0600); - } + if (isset(self::$_PHPCAS_DEBUG['logger']) || !empty(self::$_PHPCAS_DEBUG['filename'])) { for ($i = 0; $i < self::$_PHPCAS_DEBUG['indent']; $i++) { $indent_str .= '| '; @@ -533,7 +545,20 @@ class phpCAS // allow for multiline output with proper identing. Usefull for // dumping cas answers etc. $str2 = str_replace("\n", "\n" . self::$_PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str, $str); - error_log(self::$_PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str . $str2 . "\n", 3, self::$_PHPCAS_DEBUG['filename']); + $str3 = self::$_PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str . $str2; + if (isset(self::$_PHPCAS_DEBUG['logger'])) { + self::$_PHPCAS_DEBUG['logger']->info($str3); + } + if (!empty(self::$_PHPCAS_DEBUG['filename'])) { + // Check if file exists and modifiy file permissions to be only + // readable by the webserver + if (!file_exists(self::$_PHPCAS_DEBUG['filename'])) { + touch(self::$_PHPCAS_DEBUG['filename']); + // Chmod will fail on windows + @chmod(self::$_PHPCAS_DEBUG['filename'], 0600); + } + error_log($str3 . "\n", 3, self::$_PHPCAS_DEBUG['filename']); + } } } @@ -567,8 +592,6 @@ class phpCAS } if (self::$_PHPCAS_VERBOSE) { echo "
\nphpCAS error: " . __CLASS__ . "::" . $function . '(): ' . htmlentities($msg) . " in " . $file . " on line " . $line . "
\n"; - } else { - echo "
\nError: ". DEFAULT_ERROR ."
\n"; } phpCAS :: trace($msg . ' in ' . $file . 'on line ' . $line ); phpCAS :: traceEnd(); @@ -1869,6 +1892,14 @@ class phpCAS } } + /** + * @return CAS_Client + */ + public static function getCasClient() + { + return self::$_PHPCAS_CLIENT; + } + /** * For testing purposes, use this method to set the client to a test double * diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/AuthenticationException.php b/lib/apereo/phpcas/source/CAS/AuthenticationException.php similarity index 94% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/AuthenticationException.php rename to lib/apereo/phpcas/source/CAS/AuthenticationException.php index 3b73685ff..803c88908 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/AuthenticationException.php +++ b/lib/apereo/phpcas/source/CAS/AuthenticationException.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/AuthenticationException.php * @category Authentication @@ -72,11 +72,15 @@ implements CAS_Exception phpCAS::traceBegin(); $lang = $client->getLangObj(); $client->printHTMLHeader($lang->getAuthenticationFailed()); - printf( - $lang->getYouWereNotAuthenticated(), - htmlentities($client->getURL()), - isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN']:'' - ); + + if (phpCAS::getVerbose()) { + printf( + $lang->getYouWereNotAuthenticated(), + htmlentities($client->getURL()), + $_SERVER['SERVER_ADMIN'] ?? '' + ); + } + phpCAS::trace($messages[] = 'CAS URL: '.$cas_url); phpCAS::trace($messages[] = 'Authentication failure: '.$failure); if ( $no_response ) { diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Autoload.php b/lib/apereo/phpcas/source/CAS/Autoload.php similarity index 74% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Autoload.php rename to lib/apereo/phpcas/source/CAS/Autoload.php index 5e9b140c7..29395d592 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Autoload.php +++ b/lib/apereo/phpcas/source/CAS/Autoload.php @@ -3,7 +3,7 @@ /** * Autoloader Class * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Autoload.php * @category Authentication @@ -26,18 +26,24 @@ function CAS_autoload($class) // Static to hold the Include Path to CAS static $include_path; // Check only for CAS classes - if (substr($class, 0, 4) !== 'CAS_') { + if (substr($class, 0, 4) !== 'CAS_' && substr($class, 0, 7) !== 'PhpCas\\') { return false; } + // Setup the include path if it's not already set from a previous call if (empty($include_path)) { - $include_path = array(dirname(dirname(__FILE__)), dirname(dirname(__FILE__)) . '/../test/' ); + $include_path = array(dirname(__DIR__)); } // Declare local variable to store the expected full path to the file - foreach ($include_path as $path) { - $file_path = $path . '/' . str_replace('_', '/', $class) . '.php'; + $class_path = str_replace('_', DIRECTORY_SEPARATOR, $class); + // PhpCas namespace mapping + if (substr($class_path, 0, 7) === 'PhpCas\\') { + $class_path = 'CAS' . DIRECTORY_SEPARATOR . substr($class_path, 7); + } + + $file_path = $path . DIRECTORY_SEPARATOR . $class_path . '.php'; $fp = @fopen($file_path, 'r', true); if ($fp) { fclose($fp); @@ -54,6 +60,7 @@ function CAS_autoload($class) return true; } } + $e = new Exception( 'Class ' . $class . ' could not be loaded from ' . $file_path . ', file does not exist (Path="' @@ -61,22 +68,22 @@ function CAS_autoload($class) ); $trace = $e->getTrace(); if (isset($trace[2]) && isset($trace[2]['function']) - && in_array($trace[2]['function'], array('class_exists', 'interface_exists')) + && in_array($trace[2]['function'], array('class_exists', 'interface_exists', 'trait_exists')) ) { return false; } if (isset($trace[1]) && isset($trace[1]['function']) - && in_array($trace[1]['function'], array('class_exists', 'interface_exists')) + && in_array($trace[1]['function'], array('class_exists', 'interface_exists', 'trait_exists')) ) { return false; } die ((string) $e); } -// set up __autoload -if (!(spl_autoload_functions()) - || !in_array('CAS_autoload', spl_autoload_functions()) -) { +// Set up autoload if not already configured by composer. +if (!class_exists('CAS_Client')) +{ + trigger_error('phpCAS autoloader is deprecated. Install phpCAS using composer instead.', E_USER_DEPRECATED); spl_autoload_register('CAS_autoload'); if (function_exists('__autoload') && !in_array('__autoload', spl_autoload_functions()) @@ -86,5 +93,3 @@ if (!(spl_autoload_functions()) spl_autoload_register('__autoload'); } } - -?> diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Client.php b/lib/apereo/phpcas/source/CAS/Client.php similarity index 79% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Client.php rename to lib/apereo/phpcas/source/CAS/Client.php index 338bd50c4..1a40f63e4 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Client.php +++ b/lib/apereo/phpcas/source/CAS/Client.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Client.php * @category Authentication @@ -27,6 +27,7 @@ * @author Brett Bieber * @author Joachim Fritschi * @author Adam Franco + * @author Tobias Schiebeck * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * @link https://wiki.jasig.org/display/CASC/phpCAS */ @@ -43,6 +44,7 @@ * @author Brett Bieber * @author Joachim Fritschi * @author Adam Franco + * @author Tobias Schiebeck * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * @link https://wiki.jasig.org/display/CASC/phpCAS * @@ -100,6 +102,10 @@ class CAS_Client */ public function printHTMLHeader($title) { + if (!phpCAS::getVerbose()) { + return; + } + $this->_htmlFilterOutput( str_replace( '__TITLE__', $title, @@ -128,16 +134,17 @@ class CAS_Client */ public function printHTMLFooter() { + if (!phpCAS::getVerbose()) { + return; + } + $lang = $this->getLangObj(); - $this->_htmlFilterOutput( - empty($this->_output_footer)? - (phpCAS::getVerbose())? - '
phpCAS __PHPCAS_VERSION__ ' - .$lang->getUsingServer() - .' __SERVER_BASE_URL__ (CAS __CAS_VERSION__)
' - :'' - :$this->_output_footer - ); + $message = empty($this->_output_footer) + ? '
phpCAS __PHPCAS_VERSION__ ' . $lang->getUsingServer() . + ' __SERVER_BASE_URL__ (CAS __CAS_VERSION__)
' + : $this->_output_footer; + + $this->_htmlFilterOutput($message); } /** @@ -149,9 +156,9 @@ class CAS_Client */ public function setHTMLHeader($header) { - // Argument Validation - if (gettype($header) != 'string') - throw new CAS_TypeMismatchException($header, '$header', 'string'); + // Argument Validation + if (gettype($header) != 'string') + throw new CAS_TypeMismatchException($header, '$header', 'string'); $this->_output_header = $header; } @@ -165,13 +172,28 @@ class CAS_Client */ public function setHTMLFooter($footer) { - // Argument Validation - if (gettype($footer) != 'string') - throw new CAS_TypeMismatchException($footer, '$footer', 'string'); + // Argument Validation + if (gettype($footer) != 'string') + throw new CAS_TypeMismatchException($footer, '$footer', 'string'); $this->_output_footer = $footer; } + /** + * Simple wrapper for printf function, that respects + * phpCAS verbosity setting. + * + * @param string $format + * @param string|int|float ...$values + * + * @see printf() + */ + private function printf(string $format, ...$values): void + { + if (phpCAS::getVerbose()) { + printf($format, ...$values); + } + } /** @} */ @@ -200,9 +222,9 @@ class CAS_Client */ public function setLang($lang) { - // Argument Validation - if (gettype($lang) != 'string') - throw new CAS_TypeMismatchException($lang, '$lang', 'string'); + // Argument Validation + if (gettype($lang) != 'string') + throw new CAS_TypeMismatchException($lang, '$lang', 'string'); phpCAS::traceBegin(); $obj = new $lang(); @@ -364,9 +386,9 @@ class CAS_Client */ public function setServerLoginURL($url) { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); return $this->_server['login_url'] = $url; } @@ -381,9 +403,9 @@ class CAS_Client */ public function setServerServiceValidateURL($url) { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); return $this->_server['service_validate_url'] = $url; } @@ -398,9 +420,9 @@ class CAS_Client */ public function setServerProxyValidateURL($url) { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); return $this->_server['proxy_validate_url'] = $url; } @@ -415,9 +437,9 @@ class CAS_Client */ public function setServerSamlValidateURL($url) { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); return $this->_server['saml_validate_url'] = $url; } @@ -556,9 +578,9 @@ class CAS_Client */ public function setServerLogoutURL($url) { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); return $this->_server['logout_url'] = $url; } @@ -888,14 +910,15 @@ class CAS_Client /** * CAS_Client constructor. * - * @param string $server_version the version of the CAS server - * @param bool $proxy true if the CAS client is a CAS proxy - * @param string $server_hostname the hostname of the CAS server - * @param int $server_port the port the CAS server is running on - * @param string $server_uri the URI the CAS server is responding on - * @param bool $changeSessionID Allow phpCAS to change the session_id - * (Single Sign Out/handleLogoutRequests - * is based on that change) + * @param string $server_version the version of the CAS server + * @param bool $proxy true if the CAS client is a CAS proxy + * @param string $server_hostname the hostname of the CAS server + * @param int $server_port the port the CAS server is running on + * @param string $server_uri the URI the CAS server is responding on + * @param bool $changeSessionID Allow phpCAS to change the session_id + * (Single Sign Out/handleLogoutRequests + * is based on that change) + * @param \SessionHandlerInterface $sessionHandler the session handler * * @return self a newly created CAS_Client object */ @@ -905,35 +928,50 @@ class CAS_Client $server_hostname, $server_port, $server_uri, - $changeSessionID = true + $changeSessionID = true, + \SessionHandlerInterface $sessionHandler = null ) { - // Argument validation + // Argument validation if (gettype($server_version) != 'string') - throw new CAS_TypeMismatchException($server_version, '$server_version', 'string'); + throw new CAS_TypeMismatchException($server_version, '$server_version', 'string'); if (gettype($proxy) != 'boolean') - throw new CAS_TypeMismatchException($proxy, '$proxy', 'boolean'); + throw new CAS_TypeMismatchException($proxy, '$proxy', 'boolean'); if (gettype($server_hostname) != 'string') - throw new CAS_TypeMismatchException($server_hostname, '$server_hostname', 'string'); + throw new CAS_TypeMismatchException($server_hostname, '$server_hostname', 'string'); if (gettype($server_port) != 'integer') - throw new CAS_TypeMismatchException($server_port, '$server_port', 'integer'); + throw new CAS_TypeMismatchException($server_port, '$server_port', 'integer'); if (gettype($server_uri) != 'string') - throw new CAS_TypeMismatchException($server_uri, '$server_uri', 'string'); + throw new CAS_TypeMismatchException($server_uri, '$server_uri', 'string'); if (gettype($changeSessionID) != 'boolean') - throw new CAS_TypeMismatchException($changeSessionID, '$changeSessionID', 'boolean'); + throw new CAS_TypeMismatchException($changeSessionID, '$changeSessionID', 'boolean'); + + if (empty($sessionHandler)) { + $sessionHandler = new CAS_Session_PhpSession; + } phpCAS::traceBegin(); // true : allow to change the session_id(), false session_id won't be - // change and logout won't be handle because of that + // changed and logout won't be handled because of that $this->_setChangeSessionID($changeSessionID); - // skip Session Handling for logout requests and if don't want it' - if (session_id()=="" && !$this->_isLogoutRequest()) { - session_start(); - phpCAS :: trace("Starting a new session " . session_id()); + $this->setSessionHandler($sessionHandler); + + if (!$this->_isLogoutRequest()) { + if (session_id() === "") { + // skip Session Handling for logout requests and if don't want it + session_start(); + phpCAS :: trace("Starting a new session " . session_id()); + } + // init phpCAS session array + if (!isset($_SESSION[static::PHPCAS_SESSION_PREFIX]) + || !is_array($_SESSION[static::PHPCAS_SESSION_PREFIX])) { + $_SESSION[static::PHPCAS_SESSION_PREFIX] = array(); + } } + // Only for debug purposes if ($this->isSessionAuthenticated()){ - phpCAS :: trace("Session is authenticated as: " . $_SESSION['phpCAS']['user']); + phpCAS :: trace("Session is authenticated as: " . $this->getSessionValue('user')); } else { phpCAS :: trace("Session is not authenticated"); } @@ -942,14 +980,12 @@ class CAS_Client // Make cookie handling available. if ($this->isProxy()) { - if (!isset($_SESSION['phpCAS'])) { - $_SESSION['phpCAS'] = array(); - } - if (!isset($_SESSION['phpCAS']['service_cookies'])) { - $_SESSION['phpCAS']['service_cookies'] = array(); + if (!$this->hasSessionValue('service_cookies')) { + $this->setSessionValue('service_cookies', array()); } + // TODO remove explicit call to $_SESSION $this->_serviceCookieJar = new CAS_CookieJar( - $_SESSION['phpCAS']['service_cookies'] + $_SESSION[static::PHPCAS_SESSION_PREFIX]['service_cookies'] ); } @@ -997,7 +1033,18 @@ class CAS_Client // set to callback mode if PgtIou and PgtId CGI GET parameters are provided if ( $this->isProxy() ) { - $this->_setCallbackMode(!empty($_GET['pgtIou'])&&!empty($_GET['pgtId'])); + if(!empty($_GET['pgtIou'])&&!empty($_GET['pgtId'])) { + $this->_setCallbackMode(true); + $this->_setCallbackModeUsingPost(false); + } elseif (!empty($_POST['pgtIou'])&&!empty($_POST['pgtId'])) { + $this->_setCallbackMode(true); + $this->_setCallbackModeUsingPost(true); + } else { + $this->_setCallbackMode(false); + $this->_setCallbackModeUsingPost(false); + } + + } if ( $this->_isCallbackMode() ) { @@ -1010,7 +1057,7 @@ class CAS_Client } else { //normal mode: get ticket and remove it from CGI parameters for // developers - $ticket = (isset($_GET['ticket']) ? $_GET['ticket'] : null); + $ticket = (isset($_GET['ticket']) ? $_GET['ticket'] : ''); if (preg_match('/^[SP]T-/', $ticket) ) { phpCAS::trace('Ticket \''.$ticket.'\' found'); $this->setTicket($ticket); @@ -1040,6 +1087,8 @@ class CAS_Client * @{ */ + /** The session prefix for phpCAS values */ + const PHPCAS_SESSION_PREFIX = 'phpCAS'; /** * @var bool A variable to whether phpcas will use its own session handling. Default = true @@ -1047,6 +1096,11 @@ class CAS_Client */ private $_change_session_id = true; + /** + * @var SessionHandlerInterface + */ + private $_sessionHandler; + /** * Set a parameter whether to allow phpCAS to change session_id * @@ -1069,6 +1123,149 @@ class CAS_Client return $this->_change_session_id; } + /** + * Set the session handler. + * + * @param \SessionHandlerInterface $sessionHandler + * + * @return bool + */ + public function setSessionHandler(\SessionHandlerInterface $sessionHandler) + { + $this->_sessionHandler = $sessionHandler; + if (session_status() !== PHP_SESSION_ACTIVE) { + return session_set_save_handler($this->_sessionHandler, true); + } + return true; + } + + /** + * Get a session value using the given key. + * + * @param string $key + * @param mixed $default default value if the key is not set + * + * @return mixed + */ + protected function getSessionValue($key, $default = null) + { + $this->validateSession($key); + + if (isset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key])) { + return $_SESSION[static::PHPCAS_SESSION_PREFIX][$key]; + } + + return $default; + } + + /** + * Determine whether a session value is set or not. + * + * To check if a session value is empty or not please use + * !!(getSessionValue($key)). + * + * @param string $key + * + * @return bool + */ + protected function hasSessionValue($key) + { + $this->validateSession($key); + + return isset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key]); + } + + /** + * Set a session value using the given key and value. + * + * @param string $key + * @param mixed $value + * + * @return string + */ + protected function setSessionValue($key, $value) + { + $this->validateSession($key); + + $_SESSION[static::PHPCAS_SESSION_PREFIX][$key] = $value; + } + + /** + * Remove a session value with the given key. + * + * @param string $key + */ + protected function removeSessionValue($key) + { + $this->validateSession($key); + + if (isset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key])) { + unset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key]); + return true; + } + + return false; + } + + /** + * Remove all phpCAS session values. + */ + protected function clearSessionValues() + { + unset($_SESSION[static::PHPCAS_SESSION_PREFIX]); + } + + /** + * Ensure $key is a string for session utils input + * + * @param string $key + * + * @return bool + */ + protected function validateSession($key) + { + if (!is_string($key)) { + throw new InvalidArgumentException('Session key must be a string.'); + } + + return true; + } + + /** + * Renaming the session + * + * @param string $ticket name of the ticket + * + * @return void + */ + protected function _renameSession($ticket) + { + phpCAS::traceBegin(); + if ($this->getChangeSessionID()) { + if (!empty($this->_user)) { + $old_session = $_SESSION; + phpCAS :: trace("Killing session: ". session_id()); + session_destroy(); + // set up a new session, of name based on the ticket + $session_id = $this->_sessionIdForTicket($ticket); + phpCAS :: trace("Starting session: ". $session_id); + session_id($session_id); + session_start(); + phpCAS :: trace("Restoring old session vars"); + $_SESSION = $old_session; + } else { + phpCAS :: trace ( + 'Session should only be renamed after successfull authentication' + ); + } + } else { + phpCAS :: trace( + "Skipping session rename since phpCAS is not handling the session." + ); + } + phpCAS::traceEnd(); + } + /** @} */ // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -1112,10 +1309,10 @@ class CAS_Client */ public function getUser() { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); + // Sequence validation + $this->ensureAuthenticationCallSuccessful(); - return $this->_getUser(); + return $this->_getUser(); } /** @@ -1128,7 +1325,7 @@ class CAS_Client */ private function _getUser() { - // This is likely a duplicate check that could be removed.... + // This is likely a duplicate check that could be removed.... if ( empty($this->_user) ) { phpCAS::error( 'this method should be used only after '.__CLASS__ @@ -1166,9 +1363,9 @@ class CAS_Client */ public function getAttributes() { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); - // This is likely a duplicate check that could be removed.... + // Sequence validation + $this->ensureAuthenticationCallSuccessful(); + // This is likely a duplicate check that could be removed.... if ( empty($this->_user) ) { // if no user is set, there shouldn't be any attributes also... phpCAS::error( @@ -1186,8 +1383,8 @@ class CAS_Client */ public function hasAttributes() { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); + // Sequence validation + $this->ensureAuthenticationCallSuccessful(); return !empty($this->_attributes); } @@ -1200,8 +1397,8 @@ class CAS_Client */ public function hasAttribute($key) { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); + // Sequence validation + $this->ensureAuthenticationCallSuccessful(); return $this->_hasAttribute($key); } @@ -1228,8 +1425,8 @@ class CAS_Client */ public function getAttribute($key) { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); + // Sequence validation + $this->ensureAuthenticationCallSuccessful(); if ($this->_hasAttribute($key)) { return $this->_attributes[$key]; @@ -1247,9 +1444,7 @@ class CAS_Client { phpCAS::traceBegin(); // Either way, the user is authenticated by CAS - if (isset( $_SESSION['phpCAS']['auth_checked'])) { - unset($_SESSION['phpCAS']['auth_checked']); - } + $this->removeSessionValue('auth_checked'); if ( $this->isAuthenticated(true) ) { phpCAS::trace('user already authenticated'); $res = true; @@ -1278,9 +1473,7 @@ class CAS_Client $res = true; } else { // the user is not authenticated, redirect to the CAS server - if (isset($_SESSION['phpCAS']['auth_checked'])) { - unset($_SESSION['phpCAS']['auth_checked']); - } + $this->removeSessionValue('auth_checked'); $this->redirectToCas(false/* no gateway */); // never reached $res = false; @@ -1306,8 +1499,8 @@ class CAS_Client */ public function setCacheTimesForAuthRecheck($n) { - if (gettype($n) != 'integer') - throw new CAS_TypeMismatchException($n, '$n', 'string'); + if (gettype($n) != 'integer') + throw new CAS_TypeMismatchException($n, '$n', 'string'); $this->_cache_times_for_auth_recheck = $n; } @@ -1322,34 +1515,31 @@ class CAS_Client public function checkAuthentication() { phpCAS::traceBegin(); + $res = false; // default if ( $this->isAuthenticated() ) { phpCAS::trace('user is authenticated'); /* The 'auth_checked' variable is removed just in case it's set. */ - unset($_SESSION['phpCAS']['auth_checked']); + $this->removeSessionValue('auth_checked'); $res = true; - } else if (isset($_SESSION['phpCAS']['auth_checked'])) { + } else if ($this->getSessionValue('auth_checked')) { // the previous request has redirected the client to the CAS server // with gateway=true - unset($_SESSION['phpCAS']['auth_checked']); - $res = false; + $this->removeSessionValue('auth_checked'); } else { // avoid a check against CAS on every request - if (!isset($_SESSION['phpCAS']['unauth_count'])) { - $_SESSION['phpCAS']['unauth_count'] = -2; // uninitialized - } + // we need to write this back to session later + $unauth_count = $this->getSessionValue('unauth_count', -2); - if (($_SESSION['phpCAS']['unauth_count'] != -2 + if (($unauth_count != -2 && $this->_cache_times_for_auth_recheck == -1) - || ($_SESSION['phpCAS']['unauth_count'] >= 0 - && $_SESSION['phpCAS']['unauth_count'] < $this->_cache_times_for_auth_recheck) + || ($unauth_count >= 0 + && $unauth_count < $this->_cache_times_for_auth_recheck) ) { - $res = false; - if ($this->_cache_times_for_auth_recheck != -1) { - $_SESSION['phpCAS']['unauth_count']++; + $unauth_count++; phpCAS::trace( 'user is not authenticated (cached for ' - .$_SESSION['phpCAS']['unauth_count'].' times of ' + .$unauth_count.' times of ' .$this->_cache_times_for_auth_recheck.')' ); } else { @@ -1357,13 +1547,13 @@ class CAS_Client 'user is not authenticated (cached for until login pressed)' ); } + $this->setSessionValue('unauth_count', $unauth_count); } else { - $_SESSION['phpCAS']['unauth_count'] = 0; - $_SESSION['phpCAS']['auth_checked'] = true; + $this->setSessionValue('unauth_count', 0); + $this->setSessionValue('auth_checked', true); phpCAS::trace('user is not authenticated (cache reset)'); $this->redirectToCas(true/* gateway */); // never reached - $res = false; } } phpCAS::traceEnd($res); @@ -1383,7 +1573,7 @@ class CAS_Client { phpCAS::traceBegin(); $res = false; - $validate_url = ''; + if ( $this->_wasPreviouslyAuthenticated() ) { if ($this->hasTicket()) { // User has a additional ticket but was already authenticated @@ -1417,6 +1607,10 @@ class CAS_Client $this->markAuthenticationCall($res); } else { if ($this->hasTicket()) { + $validate_url = ''; + $text_response = ''; + $tree_response = ''; + switch ($this->getServerVersion()) { case CAS_VERSION_1_0: // if a Service Ticket was given, validate it @@ -1429,7 +1623,7 @@ class CAS_Client phpCAS::trace( 'CAS 1.0 ticket `'.$this->getTicket().'\' was validated' ); - $_SESSION['phpCAS']['user'] = $this->_getUser(); + $this->setSessionValue('user', $this->_getUser()); $res = true; $logoutTicket = $this->getTicket(); break; @@ -1450,15 +1644,15 @@ class CAS_Client $validate_url, $text_response, $tree_response ); // idem phpCAS::trace('PGT `'.$this->_getPGT().'\' was validated'); - $_SESSION['phpCAS']['pgt'] = $this->_getPGT(); + $this->setSessionValue('pgt', $this->_getPGT()); } - $_SESSION['phpCAS']['user'] = $this->_getUser(); + $this->setSessionValue('user', $this->_getUser()); if (!empty($this->_attributes)) { - $_SESSION['phpCAS']['attributes'] = $this->_attributes; + $this->setSessionValue('attributes', $this->_attributes); } $proxies = $this->getProxies(); if (!empty($proxies)) { - $_SESSION['phpCAS']['proxies'] = $this->getProxies(); + $this->setSessionValue('proxies', $this->getProxies()); } $res = true; $logoutTicket = $this->getTicket(); @@ -1474,13 +1668,13 @@ class CAS_Client phpCAS::trace( 'SAML 1.1 ticket `'.$this->getTicket().'\' was validated' ); - $_SESSION['phpCAS']['user'] = $this->_getUser(); - $_SESSION['phpCAS']['attributes'] = $this->_attributes; + $this->setSessionValue('user', $this->_getUser()); + $this->setSessionValue('attributes', $this->_attributes); $res = true; $logoutTicket = $this->getTicket(); break; default: - phpCAS::trace('Protocoll error'); + phpCAS::trace('Protocol error'); break; } } else { @@ -1529,7 +1723,7 @@ class CAS_Client */ public function isSessionAuthenticated () { - return !empty($_SESSION['phpCAS']['user']); + return !!$this->getSessionValue('user'); } /** @@ -1557,50 +1751,50 @@ class CAS_Client if ( $this->isProxy() ) { // CAS proxy: username and PGT must be present if ( $this->isSessionAuthenticated() - && !empty($_SESSION['phpCAS']['pgt']) + && $this->getSessionValue('pgt') ) { // authentication already done - $this->_setUser($_SESSION['phpCAS']['user']); - if (isset($_SESSION['phpCAS']['attributes'])) { - $this->setAttributes($_SESSION['phpCAS']['attributes']); + $this->_setUser($this->getSessionValue('user')); + if ($this->hasSessionValue('attributes')) { + $this->setAttributes($this->getSessionValue('attributes')); } - $this->_setPGT($_SESSION['phpCAS']['pgt']); + $this->_setPGT($this->getSessionValue('pgt')); phpCAS::trace( - 'user = `'.$_SESSION['phpCAS']['user'].'\', PGT = `' - .$_SESSION['phpCAS']['pgt'].'\'' + 'user = `'.$this->getSessionValue('user').'\', PGT = `' + .$this->getSessionValue('pgt').'\'' ); // Include the list of proxies - if (isset($_SESSION['phpCAS']['proxies'])) { - $this->_setProxies($_SESSION['phpCAS']['proxies']); + if ($this->hasSessionValue('proxies')) { + $this->_setProxies($this->getSessionValue('proxies')); phpCAS::trace( 'proxies = "' - .implode('", "', $_SESSION['phpCAS']['proxies']).'"' + .implode('", "', $this->getSessionValue('proxies')).'"' ); } $auth = true; } elseif ( $this->isSessionAuthenticated() - && empty($_SESSION['phpCAS']['pgt']) + && !$this->getSessionValue('pgt') ) { // these two variables should be empty or not empty at the same time phpCAS::trace( - 'username found (`'.$_SESSION['phpCAS']['user'] + 'username found (`'.$this->getSessionValue('user') .'\') but PGT is empty' ); // unset all tickets to enforce authentication - unset($_SESSION['phpCAS']); + $this->clearSessionValues(); $this->setTicket(''); } elseif ( !$this->isSessionAuthenticated() - && !empty($_SESSION['phpCAS']['pgt']) + && $this->getSessionValue('pgt') ) { // these two variables should be empty or not empty at the same time phpCAS::trace( - 'PGT found (`'.$_SESSION['phpCAS']['pgt'] + 'PGT found (`'.$this->getSessionValue('pgt') .'\') but username is empty' ); // unset all tickets to enforce authentication - unset($_SESSION['phpCAS']); + $this->clearSessionValues(); $this->setTicket(''); } else { phpCAS::trace('neither user nor PGT found'); @@ -1609,18 +1803,18 @@ class CAS_Client // `simple' CAS client (not a proxy): username must be present if ( $this->isSessionAuthenticated() ) { // authentication already done - $this->_setUser($_SESSION['phpCAS']['user']); - if (isset($_SESSION['phpCAS']['attributes'])) { - $this->setAttributes($_SESSION['phpCAS']['attributes']); + $this->_setUser($this->getSessionValue('user')); + if ($this->hasSessionValue('attributes')) { + $this->setAttributes($this->getSessionValue('attributes')); } - phpCAS::trace('user = `'.$_SESSION['phpCAS']['user'].'\''); + phpCAS::trace('user = `'.$this->getSessionValue('user').'\''); // Include the list of proxies - if (isset($_SESSION['phpCAS']['proxies'])) { - $this->_setProxies($_SESSION['phpCAS']['proxies']); + if ($this->hasSessionValue('proxies')) { + $this->_setProxies($this->getSessionValue('proxies')); phpCAS::trace( 'proxies = "' - .implode('", "', $_SESSION['phpCAS']['proxies']).'"' + .implode('", "', $this->getSessionValue('proxies')).'"' ); } @@ -1657,7 +1851,7 @@ class CAS_Client phpCAS::trace("Redirect to : ".$cas_url); $lang = $this->getLangObj(); $this->printHTMLHeader($lang->getAuthenticationWanted()); - printf('

'. $lang->getShouldHaveBeenRedirected(). '

', $cas_url); + $this->printf('

'. $lang->getShouldHaveBeenRedirected(). '

', $cas_url); $this->printHTMLFooter(); phpCAS::traceExit(); throw new CAS_GracefullTerminationException(); @@ -1700,7 +1894,7 @@ class CAS_Client } $lang = $this->getLangObj(); $this->printHTMLHeader($lang->getLogout()); - printf('

'.$lang->getShouldHaveBeenRedirected(). '

', $cas_url); + $this->printf('

'.$lang->getShouldHaveBeenRedirected(). '

', $cas_url); $this->printHTMLFooter(); phpCAS::traceExit(); throw new CAS_GracefullTerminationException(); @@ -1944,7 +2138,7 @@ class CAS_Client if (gettype($validate_cn) != 'boolean') { throw new CAS_TypeMismatchException($validate_cn, '$validate_cn', 'boolean'); } - if ( !file_exists($cert) && $this->_requestImplementation !== 'CAS_TestHarness_DummyRequest'){ + if (!file_exists($cert)) { throw new CAS_InvalidArgumentException("Certificate file does not exist " . $this->_requestImplementation); } $this->_cas_server_ca_cert = $cert; @@ -1989,6 +2183,8 @@ class CAS_Client $validate_url .= '&renew=true'; } + $headers = ''; + $err_msg = ''; // open and read the URL if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) { phpCAS::trace( @@ -2065,6 +2261,8 @@ class CAS_Client $validate_url .= '&renew=true'; } + $headers = ''; + $err_msg = ''; // open and read the URL if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) { phpCAS::trace( @@ -2329,6 +2527,36 @@ class CAS_Client return $this->_callback_mode; } + /** + * @var bool a boolean to know if the CAS client is using POST parameters when in callback mode. + * Written by CAS_Client::_setCallbackModeUsingPost(), read by CAS_Client::_isCallbackModeUsingPost(). + * + * @hideinitializer + */ + private $_callback_mode_using_post = false; + + /** + * This method sets/unsets usage of POST parameters in callback mode (default/false is GET parameters) + * + * @param bool $callback_mode_using_post true to use POST, false to use GET (default). + * + * @return void + */ + private function _setCallbackModeUsingPost($callback_mode_using_post) + { + $this->_callback_mode_using_post = $callback_mode_using_post; + } + + /** + * This method returns true when the callback mode is using POST, false otherwise. + * + * @return bool A boolean. + */ + private function _isCallbackModeUsingPost() + { + return $this->_callback_mode_using_post; + } + /** * the URL that should be used for the PGT callback (in fact the URL of the * current request without any CGI parameter). Written and read by @@ -2369,11 +2597,11 @@ class CAS_Client */ public function setCallbackURL($url) { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); return $this->_callback_url = $url; } @@ -2387,23 +2615,35 @@ class CAS_Client private function _callback() { phpCAS::traceBegin(); - if (preg_match('/^PGTIOU-[\.\-\w]+$/', $_GET['pgtIou'])) { - if (preg_match('/^[PT]GT-[\.\-\w]+$/', $_GET['pgtId'])) { - $this->printHTMLHeader('phpCAS callback'); - $pgt_iou = $_GET['pgtIou']; - $pgt = $_GET['pgtId']; - phpCAS::trace('Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\')'); - echo '

Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\').

'; - $this->_storePGT($pgt, $pgt_iou); - $this->printHTMLFooter(); + if ($this->_isCallbackModeUsingPost()) { + $pgtId = $_POST['pgtId']; + $pgtIou = $_POST['pgtIou']; + } else { + $pgtId = $_GET['pgtId']; + $pgtIou = $_GET['pgtIou']; + } + if (preg_match('/^PGTIOU-[\.\-\w]+$/', $pgtIou)) { + if (preg_match('/^[PT]GT-[\.\-\w]+$/', $pgtId)) { + phpCAS::trace('Storing PGT `'.$pgtId.'\' (id=`'.$pgtIou.'\')'); + $this->_storePGT($pgtId, $pgtIou); + if ($this->isXmlResponse()) { + echo '' . "\r\n"; + echo ''; + phpCAS::traceExit("XML response sent"); + } else { + $this->printHTMLHeader('phpCAS callback'); + echo '

Storing PGT `'.$pgtId.'\' (id=`'.$pgtIou.'\').

'; + $this->printHTMLFooter(); + phpCAS::traceExit("HTML response sent"); + } phpCAS::traceExit("Successfull Callback"); } else { - phpCAS::error('PGT format invalid' . $_GET['pgtId']); - phpCAS::traceExit('PGT format invalid' . $_GET['pgtId']); + phpCAS::error('PGT format invalid' . $pgtId); + phpCAS::traceExit('PGT format invalid' . $pgtId); } } else { - phpCAS::error('PGTiou format invalid' . $_GET['pgtIou']); - phpCAS::traceExit('PGTiou format invalid' . $_GET['pgtIou']); + phpCAS::error('PGTiou format invalid' . $pgtIou); + phpCAS::traceExit('PGTiou format invalid' . $pgtIou); } // Flush the buffer to prevent from sending anything other then a 200 @@ -2413,6 +2653,23 @@ class CAS_Client throw new CAS_GracefullTerminationException(); } + /** + * Check if application/xml or text/xml is pressent in HTTP_ACCEPT header values + * when return value is complex and contains attached q parameters. + * Example: HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9 + * @return bool + */ + private function isXmlResponse() + { + if (!array_key_exists('HTTP_ACCEPT', $_SERVER)) { + return false; + } + if (strpos($_SERVER['HTTP_ACCEPT'], 'application/xml') === false && strpos($_SERVER['HTTP_ACCEPT'], 'text/xml') === false) { + return false; + } + + return true; + } /** @} */ @@ -2493,7 +2750,7 @@ class CAS_Client */ public function setPGTStorage($storage) { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); // check that the storage has not already been set @@ -2529,18 +2786,18 @@ class CAS_Client public function setPGTStorageDb( $dsn_or_pdo, $username='', $password='', $table='', $driver_options=null ) { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); - // Argument validation - if (!(is_object($dsn_or_pdo) && $dsn_or_pdo instanceof PDO) && !is_string($dsn_or_pdo)) - throw new CAS_TypeMismatchException($dsn_or_pdo, '$dsn_or_pdo', 'string or PDO object'); - if (gettype($username) != 'string') - throw new CAS_TypeMismatchException($username, '$username', 'string'); + // Argument validation + if (!(is_object($dsn_or_pdo) && $dsn_or_pdo instanceof PDO) && !is_string($dsn_or_pdo)) + throw new CAS_TypeMismatchException($dsn_or_pdo, '$dsn_or_pdo', 'string or PDO object'); + if (gettype($username) != 'string') + throw new CAS_TypeMismatchException($username, '$username', 'string'); if (gettype($password) != 'string') - throw new CAS_TypeMismatchException($password, '$password', 'string'); + throw new CAS_TypeMismatchException($password, '$password', 'string'); if (gettype($table) != 'string') - throw new CAS_TypeMismatchException($table, '$password', 'string'); + throw new CAS_TypeMismatchException($table, '$password', 'string'); // create the storage object $this->setPGTStorage( @@ -2560,12 +2817,12 @@ class CAS_Client */ public function setPGTStorageFile($path='') { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); - // Argument validation - if (gettype($path) != 'string') - throw new CAS_TypeMismatchException($path, '$path', 'string'); + // Argument validation + if (gettype($path) != 'string') + throw new CAS_TypeMismatchException($path, '$path', 'string'); // create the storage object $this->setPGTStorage(new CAS_PGTStorage_File($this, $path)); @@ -2647,9 +2904,9 @@ class CAS_Client */ public function retrievePT($target_service,&$err_code,&$err_msg) { - // Argument validation - if (gettype($target_service) != 'string') - throw new CAS_TypeMismatchException($target_service, '$target_service', 'string'); + // Argument validation + if (gettype($target_service) != 'string') + throw new CAS_TypeMismatchException($target_service, '$target_service', 'string'); phpCAS::traceBegin(); @@ -2663,6 +2920,8 @@ class CAS_Client $cas_url = $this->getServerProxyURL().'?targetService=' .urlencode($target_service).'&pgt='.$this->_getPGT(); + $headers = ''; + $cas_response = ''; // open and read the URL if ( !$this->_readURL($cas_url, $headers, $cas_response, $err_msg) ) { phpCAS::trace( @@ -2869,13 +3128,13 @@ class CAS_Client */ public function getProxiedService ($type) { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); + $this->ensureAuthenticationCallSuccessful(); - // Argument validation - if (gettype($type) != 'string') - throw new CAS_TypeMismatchException($type, '$type', 'string'); + // Argument validation + if (gettype($type) != 'string') + throw new CAS_TypeMismatchException($type, '$type', 'string'); switch ($type) { case PHPCAS_PROXIED_SERVICE_HTTP_GET: @@ -2920,9 +3179,9 @@ class CAS_Client */ public function initializeProxiedService (CAS_ProxiedService $proxiedService) { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); + $this->ensureAuthenticationCallSuccessful(); $url = $proxiedService->getServiceUrl(); if (!is_string($url)) { @@ -2955,13 +3214,13 @@ class CAS_Client */ public function serviceWeb($url,&$err_code,&$output) { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); + $this->ensureAuthenticationCallSuccessful(); - // Argument validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); try { $service = $this->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET); @@ -3005,17 +3264,17 @@ class CAS_Client */ public function serviceMail($url,$serviceUrl,$flags,&$err_code,&$err_msg,&$pt) { - // Sequence validation + // Sequence validation $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); + $this->ensureAuthenticationCallSuccessful(); - // Argument validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); if (gettype($serviceUrl) != 'string') - throw new CAS_TypeMismatchException($serviceUrl, '$serviceUrl', 'string'); + throw new CAS_TypeMismatchException($serviceUrl, '$serviceUrl', 'string'); if (gettype($flags) != 'integer') - throw new CAS_TypeMismatchException($flags, '$flags', 'string'); + throw new CAS_TypeMismatchException($flags, '$flags', 'string'); try { $service = $this->getProxiedService(PHPCAS_PROXIED_SERVICE_IMAP); @@ -3279,6 +3538,295 @@ class CAS_Client return $result; } + /** + * This method recursively parses the attribute XML. + * It also collapses name-value pairs into a single + * array entry. It parses all common formats of + * attributes and well formed XML files. + * + * @param string $root the DOM root element to be parsed + * @param string $namespace namespace of the elements + * + * @return an array of the parsed XML elements + * + * Formats tested: + * + * "Jasig Style" Attributes: + * + * + * + * jsmith + * + * RubyCAS + * Smith + * John + * CN=Staff,OU=Groups,DC=example,DC=edu + * CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu + * + * PGTIOU-84678-8a9d2sfa23casd + * + * + * + * "Jasig Style" Attributes (longer version): + * + * + * + * jsmith + * + * + * surname + * Smith + * + * + * givenName + * John + * + * + * memberOf + * ['CN=Staff,OU=Groups,DC=example,DC=edu', 'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu'] + * + * + * PGTIOU-84678-8a9d2sfa23casd + * + * + * + * "RubyCAS Style" attributes + * + * + * + * jsmith + * + * RubyCAS + * Smith + * John + * CN=Staff,OU=Groups,DC=example,DC=edu + * CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu + * + * PGTIOU-84678-8a9d2sfa23casd + * + * + * + * "Name-Value" attributes. + * + * Attribute format from these mailing list thread: + * http://jasig.275507.n4.nabble.com/CAS-attributes-and-how-they-appear-in-the-CAS-response-td264272.html + * Note: This is a less widely used format, but in use by at least two institutions. + * + * + * + * jsmith + * + * + * + * + * + * + * + * PGTIOU-84678-8a9d2sfa23casd + * + * + * + * result: + * + * Array ( + * [surname] => Smith + * [givenName] => John + * [memberOf] => Array ( + * [0] => CN=Staff, OU=Groups, DC=example, DC=edu + * [1] => CN=Spanish Department, OU=Departments, OU=Groups, DC=example, DC=edu + * ) + * ) + */ + private function _xml_to_array($root, $namespace = "cas") + { + $result = array(); + if ($root->hasAttributes()) { + $attrs = $root->attributes; + $pair = array(); + foreach ($attrs as $attr) { + if ($attr->name === "name") { + $pair['name'] = $attr->value; + } elseif ($attr->name === "value") { + $pair['value'] = $attr->value; + } else { + $result[$attr->name] = $attr->value; + } + if (array_key_exists('name', $pair) && array_key_exists('value', $pair)) { + $result[$pair['name']] = $pair['value']; + } + } + } + if ($root->hasChildNodes()) { + $children = $root->childNodes; + if ($children->length == 1) { + $child = $children->item(0); + if ($child->nodeType == XML_TEXT_NODE) { + $result['_value'] = $child->nodeValue; + return (count($result) == 1) ? $result['_value'] : $result; + } + } + $groups = array(); + foreach ($children as $child) { + $child_nodeName = str_ireplace($namespace . ":", "", $child->nodeName); + if (in_array($child_nodeName, array("user", "proxies", "proxyGrantingTicket"))) { + continue; + } + if (!isset($result[$child_nodeName])) { + $res = $this->_xml_to_array($child, $namespace); + if (!empty($res)) { + $result[$child_nodeName] = $this->_xml_to_array($child, $namespace); + } + } else { + if (!isset($groups[$child_nodeName])) { + $result[$child_nodeName] = array($result[$child_nodeName]); + $groups[$child_nodeName] = 1; + } + $result[$child_nodeName][] = $this->_xml_to_array($child, $namespace); + } + } + } + return $result; + } + + /** + * This method parses a "JSON-like array" of strings + * into an array of strings + * + * @param string $json_value the json-like string: + * e.g.: + * ['CN=Staff,OU=Groups,DC=example,DC=edu', 'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu'] + * + * @return array of strings Description + * e.g.: + * Array ( + * [0] => CN=Staff,OU=Groups,DC=example,DC=edu + * [1] => CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu + * ) + */ + private function _parse_json_like_array_value($json_value) + { + $parts = explode(",", trim($json_value, "[]")); + $out = array(); + $quote = ''; + foreach ($parts as $part) { + $part = trim($part); + if ($quote === '') { + $value = ""; + if ($this->_startsWith($part, '\'')) { + $quote = '\''; + } elseif ($this->_startsWith($part, '"')) { + $quote = '"'; + } else { + $out[] = $part; + } + $part = ltrim($part, $quote); + } + if ($quote !== '') { + $value .= $part; + if ($this->_endsWith($part, $quote)) { + $out[] = rtrim($value, $quote); + $quote = ''; + } else { + $value .= ", "; + }; + } + } + return $out; + } + + /** + * This method recursively removes unneccessary hirarchy levels in array-trees. + * into an array of strings + * + * @param array $arr the array to flatten + * e.g.: + * Array ( + * [attributes] => Array ( + * [attribute] => Array ( + * [0] => Array ( + * [name] => surname + * [value] => Smith + * ) + * [1] => Array ( + * [name] => givenName + * [value] => John + * ) + * [2] => Array ( + * [name] => memberOf + * [value] => ['CN=Staff,OU=Groups,DC=example,DC=edu', 'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu'] + * ) + * ) + * ) + * ) + * + * @return array the flattened array + * e.g.: + * Array ( + * [attribute] => Array ( + * [surname] => Smith + * [givenName] => John + * [memberOf] => Array ( + * [0] => CN=Staff, OU=Groups, DC=example, DC=edu + * [1] => CN=Spanish Department, OU=Departments, OU=Groups, DC=example, DC=edu + * ) + * ) + * ) + */ + private function _flatten_array($arr) + { + if (!is_array($arr)) { + if ($this->_startsWith($arr, '[') && $this->_endsWith($arr, ']')) { + return $this->_parse_json_like_array_value($arr); + } else { + return $arr; + } + } + $out = array(); + foreach ($arr as $key => $val) { + if (!is_array($val)) { + $out[$key] = $val; + } else { + switch (count($val)) { + case 1 : { + $key = key($val); + if (array_key_exists($key, $out)) { + $value = $out[$key]; + if (!is_array($value)) { + $out[$key] = array(); + $out[$key][] = $value; + } + $out[$key][] = $this->_flatten_array($val[$key]); + } else { + $out[$key] = $this->_flatten_array($val[$key]); + }; + break; + }; + case 2 : { + if (array_key_exists("name", $val) && array_key_exists("value", $val)) { + $key = $val['name']; + if (array_key_exists($key, $out)) { + $value = $out[$key]; + if (!is_array($value)) { + $out[$key] = array(); + $out[$key][] = $value; + } + $out[$key][] = $this->_flatten_array($val['value']); + } else { + $out[$key] = $this->_flatten_array($val['value']); + }; + } else { + $out[$key] = $this->_flatten_array($val); + } + break; + }; + default: { + $out[$key] = $this->_flatten_array($val); + } + } + } + } + return $out; + } /** * This method will parse the DOM and pull out the attributes from the XML @@ -3294,23 +3842,6 @@ class CAS_Client phpCAS::traceBegin(); $extra_attributes = array(); - - // "Jasig Style" Attributes: - // - // - // - // jsmith - // - // RubyCAS - // Smith - // John - // CN=Staff,OU=Groups,DC=example,DC=edu - // CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu - // - // PGTIOU-84678-8a9d2sfa23casd - // - // - // if ($this->_casAttributeParserCallbackFunction !== null && is_callable($this->_casAttributeParserCallbackFunction) ) { @@ -3320,111 +3851,19 @@ class CAS_Client $this->_casAttributeParserCallbackFunction, $this->_casAttributeParserCallbackArgs ); - } elseif ( $success_elements->item(0)->getElementsByTagName("attributes")->length != 0) { - $attr_nodes = $success_elements->item(0) - ->getElementsByTagName("attributes"); - phpCAS :: trace("Found nested jasig style attributes"); - if ($attr_nodes->item(0)->hasChildNodes()) { - // Nested Attributes - foreach ($attr_nodes->item(0)->childNodes as $attr_child) { - phpCAS :: trace( - "Attribute [".$attr_child->localName."] = " - .$attr_child->nodeValue - ); - $this->_addAttributeToArray( - $extra_attributes, $attr_child->localName, - $attr_child->nodeValue - ); - } - } } else { - // "RubyCAS Style" attributes - // - // - // - // jsmith - // - // RubyCAS - // Smith - // John - // CN=Staff,OU=Groups,DC=example,DC=edu - // CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu - // - // PGTIOU-84678-8a9d2sfa23casd - // - // - // - phpCAS :: trace("Testing for rubycas style attributes"); - $childnodes = $success_elements->item(0)->childNodes; - foreach ($childnodes as $attr_node) { - switch ($attr_node->localName) { - case 'user': - case 'proxies': - case 'proxyGrantingTicket': - break; - default: - if (strlen(trim($attr_node->nodeValue))) { - phpCAS :: trace( - "Attribute [".$attr_node->localName."] = ".$attr_node->nodeValue - ); - $this->_addAttributeToArray( - $extra_attributes, $attr_node->localName, - $attr_node->nodeValue - ); - } - } - } + phpCAS :: trace("Parse extra attributes: "); + $attributes = $this->_xml_to_array($success_elements->item(0)); + phpCAS :: trace(print_r($attributes,true). "\nFLATTEN Array: "); + $extra_attributes = $this->_flatten_array($attributes); + phpCAS :: trace(print_r($extra_attributes, true)."\nFILTER : "); + if (array_key_exists("attribute", $extra_attributes)) { + $extra_attributes = $extra_attributes["attribute"]; + } elseif (array_key_exists("attributes", $extra_attributes)) { + $extra_attributes = $extra_attributes["attributes"]; + }; + phpCAS :: trace(print_r($extra_attributes, true)."return"); } - - // "Name-Value" attributes. - // - // Attribute format from these mailing list thread: - // http://jasig.275507.n4.nabble.com/CAS-attributes-and-how-they-appear-in-the-CAS-response-td264272.html - // Note: This is a less widely used format, but in use by at least two institutions. - // - // - // - // jsmith - // - // - // - // - // - // - // - // PGTIOU-84678-8a9d2sfa23casd - // - // - // - if (!count($extra_attributes) - && $success_elements->item(0)->getElementsByTagName("attribute")->length != 0 - ) { - $attr_nodes = $success_elements->item(0) - ->getElementsByTagName("attribute"); - $firstAttr = $attr_nodes->item(0); - if (!$firstAttr->hasChildNodes() - && $firstAttr->hasAttribute('name') - && $firstAttr->hasAttribute('value') - ) { - phpCAS :: trace("Found Name-Value style attributes"); - // Nested Attributes - foreach ($attr_nodes as $attr_node) { - if ($attr_node->hasAttribute('name') - && $attr_node->hasAttribute('value') - ) { - phpCAS :: trace( - "Attribute [".$attr_node->getAttribute('name') - ."] = ".$attr_node->getAttribute('value') - ); - $this->_addAttributeToArray( - $extra_attributes, $attr_node->getAttribute('name'), - $attr_node->getAttribute('value') - ); - } - } - } - } - $this->setAttributes($extra_attributes); phpCAS::traceEnd(); return true; @@ -3489,9 +3928,9 @@ class CAS_Client */ public function setURL($url) { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); $this->_url = $url; } @@ -3512,8 +3951,8 @@ class CAS_Client $final_uri .= '://'; $final_uri .= $this->_getClientUrl(); - $request_uri = explode('?', $_SERVER['REQUEST_URI'], 2); - $final_uri .= $request_uri[0]; + $request_uri = explode('?', $_SERVER['REQUEST_URI'], 2); + $final_uri .= $request_uri[0]; if (isset($request_uri[1]) && $request_uri[1]) { $query_string= $this->_removeParameterFromQueryString('ticket', $request_uri[1]); @@ -3521,7 +3960,7 @@ class CAS_Client // If the query string still has anything left, // append it to the final URI if ($query_string !== '') { - $final_uri .= "?$query_string"; + $final_uri .= "?$query_string"; } } @@ -3541,9 +3980,9 @@ class CAS_Client */ public function setBaseURL($url) { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); + // Argument Validation + if (gettype($url) != 'string') + throw new CAS_TypeMismatchException($url, '$url', 'string'); return $this->_server['base_url'] = $url; } @@ -3646,38 +4085,29 @@ class CAS_Client } /** - * Renaming the session + * This method tests if a string starts with a given character. * - * @param string $ticket name of the ticket + * @param string $text text to test + * @param string $char character to test for * - * @return void + * @return bool true if the $text starts with $char */ - private function _renameSession($ticket) + private function _startsWith($text, $char) { - phpCAS::traceBegin(); - if ($this->getChangeSessionID()) { - if (!empty($this->_user)) { - $old_session = $_SESSION; - phpCAS :: trace("Killing session: ". session_id()); - session_destroy(); - // set up a new session, of name based on the ticket - $session_id = $this->_sessionIdForTicket($ticket); - phpCAS :: trace("Starting session: ". $session_id); - session_id($session_id); - session_start(); - phpCAS :: trace("Restoring old session vars"); - $_SESSION = $old_session; - } else { - phpCAS :: trace ( - 'Session should only be renamed after successfull authentication' - ); - } - } else { - phpCAS :: trace( - "Skipping session rename since phpCAS is not handling the session." - ); - } - phpCAS::traceEnd(); + return (strpos($text, $char) === 0); + } + + /** + * This method tests if a string ends with a given character + * + * @param string $text text to test + * @param string $char character to test for + * + * @return bool true if the $text ends with $char + */ + private function _endsWith($text, $char) + { + return (strpos(strrev($text), $char) === 0); } /** @@ -3747,7 +4177,7 @@ class CAS_Client phpCAS::traceBegin(); $lang = $this->getLangObj(); $this->printHTMLHeader($lang->getAuthenticationFailed()); - printf( + $this->printf( $lang->getYouWereNotAuthenticated(), htmlentities($this->getURL()), isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN']:'' ); @@ -3828,9 +4258,9 @@ class CAS_Client */ public function addRebroadcastNode($rebroadcastNodeUrl) { - // Argument validation - if ( !(bool)preg_match("/^(http|https):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i", $rebroadcastNodeUrl)) - throw new CAS_TypeMismatchException($rebroadcastNodeUrl, '$rebroadcastNodeUrl', 'url'); + // Argument validation + if ( !(bool)preg_match("/^(http|https):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i", $rebroadcastNodeUrl)) + throw new CAS_TypeMismatchException($rebroadcastNodeUrl, '$rebroadcastNodeUrl', 'url'); // Store the rebroadcast node and set flag $this->_rebroadcast = true; @@ -3852,8 +4282,8 @@ class CAS_Client */ public function addRebroadcastHeader($header) { - if (gettype($header) != 'string') - throw new CAS_TypeMismatchException($header, '$header', 'string'); + if (gettype($header) != 'string') + throw new CAS_TypeMismatchException($header, '$header', 'string'); $this->_rebroadcast_headers[] = $header; } diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/CookieJar.php b/lib/apereo/phpcas/source/CAS/CookieJar.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/CookieJar.php rename to lib/apereo/phpcas/source/CAS/CookieJar.php index 38f849dfe..b2439373a 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/CookieJar.php +++ b/lib/apereo/phpcas/source/CAS/CookieJar.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/CookieJar.php * @category Authentication @@ -231,6 +231,7 @@ class CAS_CookieJar case 'commenturl': case 'discard': case 'httponly': + case 'samesite': $cookie[$attributeNameLC] = $attributeValue; break; default: diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Exception.php b/lib/apereo/phpcas/source/CAS/Exception.php similarity index 98% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Exception.php rename to lib/apereo/phpcas/source/CAS/Exception.php index d956d1975..2ff7cd658 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Exception.php +++ b/lib/apereo/phpcas/source/CAS/Exception.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Exception.php * @category Authentication @@ -56,4 +56,4 @@ interface CAS_Exception { } -?> \ No newline at end of file +?> diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/GracefullTerminationException.php b/lib/apereo/phpcas/source/CAS/GracefullTerminationException.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/GracefullTerminationException.php rename to lib/apereo/phpcas/source/CAS/GracefullTerminationException.php index d1d035c39..29aa638cd 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/GracefullTerminationException.php +++ b/lib/apereo/phpcas/source/CAS/GracefullTerminationException.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/GracefullTerminationException.php * @category Authentication @@ -83,4 +83,4 @@ implements CAS_Exception } } -?> \ No newline at end of file +?> diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/InvalidArgumentException.php b/lib/apereo/phpcas/source/CAS/InvalidArgumentException.php similarity index 98% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/InvalidArgumentException.php rename to lib/apereo/phpcas/source/CAS/InvalidArgumentException.php index ba43d39f8..99be2ac32 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/InvalidArgumentException.php +++ b/lib/apereo/phpcas/source/CAS/InvalidArgumentException.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/InvalidArgumentException.php * @category Authentication @@ -43,4 +43,4 @@ implements CAS_Exception { } -?> \ No newline at end of file +?> diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Catalan.php b/lib/apereo/phpcas/source/CAS/Languages/Catalan.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Catalan.php rename to lib/apereo/phpcas/source/CAS/Languages/Catalan.php index a0b64d8eb..1ead905fc 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Catalan.php +++ b/lib/apereo/phpcas/source/CAS/Languages/Catalan.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/Catalan.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php b/lib/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php rename to lib/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php index bb665937e..5e33cb650 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php +++ b/lib/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/ChineseSimplified.php * @category Authentication @@ -111,4 +111,4 @@ class CAS_Languages_ChineseSimplified implements CAS_Languages_LanguageInterface { return '服务器 %s 不可用(%s)。'; } -} \ No newline at end of file +} diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/English.php b/lib/apereo/phpcas/source/CAS/Languages/English.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/English.php rename to lib/apereo/phpcas/source/CAS/Languages/English.php index 002c1ba49..cb13bde93 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/English.php +++ b/lib/apereo/phpcas/source/CAS/Languages/English.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/English.php * @category Authentication @@ -111,4 +111,4 @@ class CAS_Languages_English implements CAS_Languages_LanguageInterface { return 'The service `%s\' is not available (%s).'; } -} \ No newline at end of file +} diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/French.php b/lib/apereo/phpcas/source/CAS/Languages/French.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/French.php rename to lib/apereo/phpcas/source/CAS/Languages/French.php index b99847a7f..14f65aba2 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/French.php +++ b/lib/apereo/phpcas/source/CAS/Languages/French.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/French.php * @category Authentication @@ -113,4 +113,4 @@ class CAS_Languages_French implements CAS_Languages_LanguageInterface } } -?> \ No newline at end of file +?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/Galego.php b/lib/apereo/phpcas/source/CAS/Languages/Galego.php new file mode 100644 index 000000000..d5bf40455 --- /dev/null +++ b/lib/apereo/phpcas/source/CAS/Languages/Galego.php @@ -0,0 +1,117 @@ +aquí para continuar'; + } + + /** + * Get authentication failed string + * + * @return string authentication failed + */ + public function getAuthenticationFailed() + { + return 'Autenticación CAS errada!'; + } + + /** + * Get the your were not authenticated string + * + * @return string not authenticated + */ + public function getYouWereNotAuthenticated() + { + return ' +

Non estás autenticado

Podes volver tentalo facendo click aquí.

Se o problema persiste debería contactar con el administrador deste sitio.

'; + } + + /** + * Get the service unavailable string + * + * @return string service unavailable + */ + public function getServiceUnavailable() + { + return 'O servizo `%s\' non está dispoñible (%s).'; + } +} +?> diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/German.php b/lib/apereo/phpcas/source/CAS/Languages/German.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/German.php rename to lib/apereo/phpcas/source/CAS/Languages/German.php index ed3150a80..b718b1452 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/German.php +++ b/lib/apereo/phpcas/source/CAS/Languages/German.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/German.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Greek.php b/lib/apereo/phpcas/source/CAS/Languages/Greek.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Greek.php rename to lib/apereo/phpcas/source/CAS/Languages/Greek.php index 888ce2416..1cfb107e4 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Greek.php +++ b/lib/apereo/phpcas/source/CAS/Languages/Greek.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/Greek.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Japanese.php b/lib/apereo/phpcas/source/CAS/Languages/Japanese.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Japanese.php rename to lib/apereo/phpcas/source/CAS/Languages/Japanese.php index a15bf17b1..568148458 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Japanese.php +++ b/lib/apereo/phpcas/source/CAS/Languages/Japanese.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/Japanese.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/LanguageInterface.php b/lib/apereo/phpcas/source/CAS/Languages/LanguageInterface.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/LanguageInterface.php rename to lib/apereo/phpcas/source/CAS/Languages/LanguageInterface.php index 5de93aa7b..dfb0ac514 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/LanguageInterface.php +++ b/lib/apereo/phpcas/source/CAS/Languages/LanguageInterface.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/LanguageInterface.php * @category Authentication @@ -93,4 +93,4 @@ interface CAS_Languages_LanguageInterface public function getServiceUnavailable(); } -?> \ No newline at end of file +?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/Portuguese.php b/lib/apereo/phpcas/source/CAS/Languages/Portuguese.php new file mode 100644 index 000000000..a927cad62 --- /dev/null +++ b/lib/apereo/phpcas/source/CAS/Languages/Portuguese.php @@ -0,0 +1,114 @@ + + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 + * @link https://apereo.atlassian.net/wiki/spaces/CASC/pages/103252517/phpCAS + */ + +/** + * Portuguese language class + * + * @class CAS_Languages_Portuguese + * @category Authentication + * @package PhpCAS + * @author Sherwin Harris + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 + * @link https://apereo.atlassian.net/wiki/spaces/CASC/pages/103252517/phpCAS + * + * @sa @link internalLang Internationalization @endlink + * @ingroup internalLang + */ +class CAS_Languages_Portuguese implements CAS_Languages_LanguageInterface +{ + /** + * Get the using server string + * + * @return string using server + */ + public function getUsingServer() + { + return 'Usando o servidor'; + } + + /** + * Get authentication wanted string + * + * @return string authentication wanted + */ + public function getAuthenticationWanted() + { + return 'A autenticação do servidor CAS desejado!'; + } + + /** + * Get logout string + * + * @return string logout + */ + public function getLogout() + { + return 'Saida do servidor CAS desejado!'; + } + + /** + * Get the should have been redirected string + * + * @return string should have been redirected + */ + public function getShouldHaveBeenRedirected() + { + return 'Você já deve ter sido redirecionado para o servidor CAS. Clique aqui para continuar'; + } + + /** + * Get authentication failed string + * + * @return string authentication failed + */ + public function getAuthenticationFailed() + { + return 'A autenticação do servidor CAS falheu!'; + } + + /** + * Get the your were not authenticated string + * + * @return string not authenticated + */ + public function getYouWereNotAuthenticated() + { + return '

Você não foi autenticado.

Você pode enviar sua solicitação novamente clicando aqui.

Se o problema persistir, você pode entrar em contato com o administrador deste site.

'; + } + + /** + * Get the service unavailable string + * + * @return string service unavailable + */ + public function getServiceUnavailable() + { + return 'O serviço `%s\' não está disponível (%s).'; + } +} diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Spanish.php b/lib/apereo/phpcas/source/CAS/Languages/Spanish.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Spanish.php rename to lib/apereo/phpcas/source/CAS/Languages/Spanish.php index 5675a41d8..c6ea50e74 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Languages/Spanish.php +++ b/lib/apereo/phpcas/source/CAS/Languages/Spanish.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Language/Spanish.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php rename to lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php index ef8309795..d4d7680de 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php +++ b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php @@ -18,7 +18,7 @@ * limitations under the License. * * - * PHP Version 5 + * PHP Version 7 * * @file CAS/OutOfSequenceBeforeAuthenticationCallException.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php rename to lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php index f1ea7e244..6c2c39c58 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php +++ b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php @@ -18,7 +18,7 @@ * limitations under the License. * * - * PHP Version 5 + * PHP Version 7 * * @file CAS/OutOfSequenceBeforeClientException.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php rename to lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php index 8038542ed..799155521 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php +++ b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php @@ -18,7 +18,7 @@ * limitations under the License. * * - * PHP Version 5 + * PHP Version 7 * * @file CAS/OutOfSequenceBeforeProxyException.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceException.php similarity index 98% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceException.php rename to lib/apereo/phpcas/source/CAS/OutOfSequenceException.php index d101811b6..d6f7d88fc 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/OutOfSequenceException.php +++ b/lib/apereo/phpcas/source/CAS/OutOfSequenceException.php @@ -18,7 +18,7 @@ * limitations under the License. * * - * PHP Version 5 + * PHP Version 7 * * @file CAS/OutOfSequenceException.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php b/lib/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php rename to lib/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php index 0f3471118..a93568d60 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php +++ b/lib/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/PGTStorage/AbstractStorage.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/Db.php b/lib/apereo/phpcas/source/CAS/PGTStorage/Db.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/Db.php rename to lib/apereo/phpcas/source/CAS/PGTStorage/Db.php index 383d11dc7..2efe5a3e8 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/Db.php +++ b/lib/apereo/phpcas/source/CAS/PGTStorage/Db.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/PGTStorage/Db.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/File.php b/lib/apereo/phpcas/source/CAS/PGTStorage/File.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/File.php rename to lib/apereo/phpcas/source/CAS/PGTStorage/File.php index 6504ec599..fbacd3b7d 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/PGTStorage/File.php +++ b/lib/apereo/phpcas/source/CAS/PGTStorage/File.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/PGTStorage/AbstractStorage.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService.php b/lib/apereo/phpcas/source/CAS/ProxiedService.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService.php rename to lib/apereo/phpcas/source/CAS/ProxiedService.php index d70ca9c12..2673ee955 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Abstract.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Abstract.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Abstract.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Abstract.php index fade9e70b..0801c723b 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Abstract.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Abstract.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Abstract.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Exception.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Exception.php similarity index 98% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Exception.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Exception.php index 5a1e69622..0f87413dd 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Exception.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Exception.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Exception.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Http.php index 7c9824fab..4240b061a 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Http.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Http.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php index 61abfd84f..8d55edd50 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Http/Abstract.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php index 78e35de16..a459d55ae 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Http/Get.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php index 7d4ecd3c0..344c43987 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Http/Post.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Imap.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Imap.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Imap.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Imap.php index 385aae73b..c4b47401d 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Imap.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Imap.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Imap.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Testable.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Testable.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Testable.php rename to lib/apereo/phpcas/source/CAS/ProxiedService/Testable.php index 51f076762..3ce44fd16 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxiedService/Testable.php +++ b/lib/apereo/phpcas/source/CAS/ProxiedService/Testable.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxiedService/Testabel.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain.php b/lib/apereo/phpcas/source/CAS/ProxyChain.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain.php rename to lib/apereo/phpcas/source/CAS/ProxyChain.php index 2594d141e..e200724ce 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain.php +++ b/lib/apereo/phpcas/source/CAS/ProxyChain.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxyChain.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php b/lib/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php rename to lib/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php index cafd0e743..988ddbb3c 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php +++ b/lib/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxyChain/AllowedList.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Any.php b/lib/apereo/phpcas/source/CAS/ProxyChain/Any.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Any.php rename to lib/apereo/phpcas/source/CAS/ProxyChain/Any.php index 0cd92f74e..fe18c5fbf 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Any.php +++ b/lib/apereo/phpcas/source/CAS/ProxyChain/Any.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxyChain/Any.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Interface.php b/lib/apereo/phpcas/source/CAS/ProxyChain/Interface.php similarity index 98% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Interface.php rename to lib/apereo/phpcas/source/CAS/ProxyChain/Interface.php index d247115db..b1d688174 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Interface.php +++ b/lib/apereo/phpcas/source/CAS/ProxyChain/Interface.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxyChain/Interface.php * @category Authentication @@ -50,4 +50,4 @@ interface CAS_ProxyChain_Interface */ public function matches(array $list); -} \ No newline at end of file +} diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Trusted.php b/lib/apereo/phpcas/source/CAS/ProxyChain/Trusted.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Trusted.php rename to lib/apereo/phpcas/source/CAS/ProxyChain/Trusted.php index 7fa612967..e67d70852 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyChain/Trusted.php +++ b/lib/apereo/phpcas/source/CAS/ProxyChain/Trusted.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/ProxyChain/Trusted.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyTicketException.php b/lib/apereo/phpcas/source/CAS/ProxyTicketException.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyTicketException.php rename to lib/apereo/phpcas/source/CAS/ProxyTicketException.php index 723304666..2f825b421 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/ProxyTicketException.php +++ b/lib/apereo/phpcas/source/CAS/ProxyTicketException.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @class CAS/ProxyTicketException.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/AbstractRequest.php b/lib/apereo/phpcas/source/CAS/Request/AbstractRequest.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/AbstractRequest.php rename to lib/apereo/phpcas/source/CAS/Request/AbstractRequest.php index 130024bf1..4f9013ee2 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/AbstractRequest.php +++ b/lib/apereo/phpcas/source/CAS/Request/AbstractRequest.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Request/AbstractRequest.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php b/lib/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php rename to lib/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php index 919c9561d..850f6f0e4 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php +++ b/lib/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Request/AbstractRequest.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/CurlRequest.php b/lib/apereo/phpcas/source/CAS/Request/CurlRequest.php similarity index 93% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/CurlRequest.php rename to lib/apereo/phpcas/source/CAS/Request/CurlRequest.php index 70057712e..3eaa0d3c1 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/CurlRequest.php +++ b/lib/apereo/phpcas/source/CAS/Request/CurlRequest.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Request/CurlRequest.php * @category Authentication @@ -106,14 +106,7 @@ implements CAS_Request_RequestInterface *********************************************************/ $ch = curl_init($this->url); - if (version_compare(PHP_VERSION, '5.1.3', '>=')) { - //only avaible in php5 - curl_setopt_array($ch, $this->_curlOptions); - } else { - foreach ($this->_curlOptions as $key => $value) { - curl_setopt($ch, $key, $value); - } - } + curl_setopt_array($ch, $this->_curlOptions); /********************************************************* * Set SSL configuration @@ -179,7 +172,7 @@ implements CAS_Request_RequestInterface * * @return void */ - private function _storeResponseBody ($body) + public function _storeResponseBody ($body) { $this->storeResponseBody($body); } @@ -192,7 +185,7 @@ implements CAS_Request_RequestInterface * * @return int */ - private function _curlReadHeaders ($ch, $header) + public function _curlReadHeaders ($ch, $header) { $this->storeResponseHeader($header); return strlen($header); diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/Exception.php b/lib/apereo/phpcas/source/CAS/Request/Exception.php similarity index 98% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/Exception.php rename to lib/apereo/phpcas/source/CAS/Request/Exception.php index 14ff3c6b0..dd5a2a55a 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/Exception.php +++ b/lib/apereo/phpcas/source/CAS/Request/Exception.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Request/Exception.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php b/lib/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php rename to lib/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php index f3298274d..41002c777 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php +++ b/lib/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Request/MultiRequestInterface.php * @category Authentication diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/RequestInterface.php b/lib/apereo/phpcas/source/CAS/Request/RequestInterface.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/RequestInterface.php rename to lib/apereo/phpcas/source/CAS/Request/RequestInterface.php index cc11ba43d..b8e8772e9 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/Request/RequestInterface.php +++ b/lib/apereo/phpcas/source/CAS/Request/RequestInterface.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/Request/RequestInterface.php * @category Authentication diff --git a/lib/apereo/phpcas/source/CAS/Session/PhpSession.php b/lib/apereo/phpcas/source/CAS/Session/PhpSession.php new file mode 100644 index 000000000..031cbbc70 --- /dev/null +++ b/lib/apereo/phpcas/source/CAS/Session/PhpSession.php @@ -0,0 +1,45 @@ + + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 + * @link https://wiki.jasig.org/display/CASC/phpCAS + */ + +/** + * Empty class used as a default implementation for phpCAS. + * + * Implements the standard PHP session handler without no alterations. + * + * @class CAS_Session_PhpSession + * @category Authentication + * @package PhpCAS + * @author Adam Franco + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 + * @link https://wiki.jasig.org/display/CASC/phpCAS + */ +class CAS_Session_PhpSession extends SessionHandler implements SessionHandlerInterface +{ +} diff --git a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/TypeMismatchException.php b/lib/apereo/phpcas/source/CAS/TypeMismatchException.php similarity index 99% rename from datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/TypeMismatchException.php rename to lib/apereo/phpcas/source/CAS/TypeMismatchException.php index 4a13c2df4..72bdc87a1 100644 --- a/datamodels/2.x/authent-cas/vendor/apereo/phpcas/source/CAS/TypeMismatchException.php +++ b/lib/apereo/phpcas/source/CAS/TypeMismatchException.php @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * PHP Version 5 + * PHP Version 7 * * @file CAS/InvalidArgumentException.php * @category Authentication diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index a8b55a462..5a9242f94 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -99,6 +99,53 @@ return array( 'BulkExportMissingParameterException' => $baseDir . '/core/bulkexport.class.inc.php', 'BulkExportResult' => $baseDir . '/core/bulkexport.class.inc.php', 'BulkExportResultGC' => $baseDir . '/core/bulkexport.class.inc.php', + 'CAS_AuthenticationException' => $vendorDir . '/apereo/phpcas/source/CAS/AuthenticationException.php', + 'CAS_Client' => $vendorDir . '/apereo/phpcas/source/CAS/Client.php', + 'CAS_CookieJar' => $vendorDir . '/apereo/phpcas/source/CAS/CookieJar.php', + 'CAS_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/Exception.php', + 'CAS_GracefullTerminationException' => $vendorDir . '/apereo/phpcas/source/CAS/GracefullTerminationException.php', + 'CAS_InvalidArgumentException' => $vendorDir . '/apereo/phpcas/source/CAS/InvalidArgumentException.php', + 'CAS_Languages_Catalan' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Catalan.php', + 'CAS_Languages_ChineseSimplified' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php', + 'CAS_Languages_English' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/English.php', + 'CAS_Languages_French' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/French.php', + 'CAS_Languages_Galego' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Galego.php', + 'CAS_Languages_German' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/German.php', + 'CAS_Languages_Greek' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Greek.php', + 'CAS_Languages_Japanese' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Japanese.php', + 'CAS_Languages_LanguageInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/LanguageInterface.php', + 'CAS_Languages_Portuguese' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Portuguese.php', + 'CAS_Languages_Spanish' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Spanish.php', + 'CAS_OutOfSequenceBeforeAuthenticationCallException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php', + 'CAS_OutOfSequenceBeforeClientException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php', + 'CAS_OutOfSequenceBeforeProxyException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php', + 'CAS_OutOfSequenceException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceException.php', + 'CAS_PGTStorage_AbstractStorage' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php', + 'CAS_PGTStorage_Db' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/Db.php', + 'CAS_PGTStorage_File' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/File.php', + 'CAS_ProxiedService' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService.php', + 'CAS_ProxiedService_Abstract' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Abstract.php', + 'CAS_ProxiedService_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Exception.php', + 'CAS_ProxiedService_Http' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http.php', + 'CAS_ProxiedService_Http_Abstract' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php', + 'CAS_ProxiedService_Http_Get' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php', + 'CAS_ProxiedService_Http_Post' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php', + 'CAS_ProxiedService_Imap' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Imap.php', + 'CAS_ProxiedService_Testable' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Testable.php', + 'CAS_ProxyChain' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain.php', + 'CAS_ProxyChain_AllowedList' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php', + 'CAS_ProxyChain_Any' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Any.php', + 'CAS_ProxyChain_Interface' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Interface.php', + 'CAS_ProxyChain_Trusted' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Trusted.php', + 'CAS_ProxyTicketException' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyTicketException.php', + 'CAS_Request_AbstractRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/AbstractRequest.php', + 'CAS_Request_CurlMultiRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php', + 'CAS_Request_CurlRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/CurlRequest.php', + 'CAS_Request_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/Request/Exception.php', + 'CAS_Request_MultiRequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php', + 'CAS_Request_RequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/RequestInterface.php', + 'CAS_Session_PhpSession' => $vendorDir . '/apereo/phpcas/source/CAS/Session/PhpSession.php', + 'CAS_TypeMismatchException' => $vendorDir . '/apereo/phpcas/source/CAS/TypeMismatchException.php', 'CLILikeWebPage' => $baseDir . '/sources/Application/WebPage/CLILikeWebPage.php', 'CLIPage' => $baseDir . '/sources/Application/WebPage/CLIPage.php', 'CMDBChange' => $baseDir . '/core/cmdbchange.class.inc.php', @@ -748,7 +795,6 @@ return array( 'Laminas\\ServiceManager\\Proxy\\LazyServiceFactory' => $vendorDir . '/laminas/laminas-servicemanager/src/Proxy/LazyServiceFactory.php', 'Laminas\\ServiceManager\\ServiceLocatorInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php', 'Laminas\\ServiceManager\\ServiceManager' => $vendorDir . '/laminas/laminas-servicemanager/src/ServiceManager.php', - 'Laminas\\ServiceManager\\Test\\CommonPluginManagerTrait' => $vendorDir . '/laminas/laminas-servicemanager/src/Test/CommonPluginManagerTrait.php', 'Laminas\\ServiceManager\\Tool\\ConfigDumper' => $vendorDir . '/laminas/laminas-servicemanager/src/Tool/ConfigDumper.php', 'Laminas\\ServiceManager\\Tool\\ConfigDumperCommand' => $vendorDir . '/laminas/laminas-servicemanager/src/Tool/ConfigDumperCommand.php', 'Laminas\\ServiceManager\\Tool\\FactoryCreator' => $vendorDir . '/laminas/laminas-servicemanager/src/Tool/FactoryCreator.php', @@ -1591,14 +1637,6 @@ return array( 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\SodiumVault' => $vendorDir . '/symfony/framework-bundle/Secrets/SodiumVault.php', 'Symfony\\Bundle\\FrameworkBundle\\Session\\DeprecatedSessionFactory' => $vendorDir . '/symfony/framework-bundle/Session/DeprecatedSessionFactory.php', 'Symfony\\Bundle\\FrameworkBundle\\Session\\ServiceSessionFactory' => $vendorDir . '/symfony/framework-bundle/Session/ServiceSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\BrowserKitAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/BrowserKitAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\DomCrawlerAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase' => $vendorDir . '/symfony/framework-bundle/Test/KernelTestCase.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/MailerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestBrowserToken' => $vendorDir . '/symfony/framework-bundle/Test/TestBrowserToken.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestContainer' => $vendorDir . '/symfony/framework-bundle/Test/TestContainer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/WebTestAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase' => $vendorDir . '/symfony/framework-bundle/Test/WebTestCase.php', 'Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator' => $vendorDir . '/symfony/framework-bundle/Translation/Translator.php', 'Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer' => $vendorDir . '/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php', 'Symfony\\Bundle\\TwigBundle\\Command\\LintCommand' => $vendorDir . '/symfony/twig-bundle/Command/LintCommand.php', @@ -2232,16 +2270,6 @@ return array( 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageFactoryInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseFormatSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsUnprocessable' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', 'Symfony\\Component\\HttpFoundation\\UrlHelper' => $vendorDir . '/symfony/http-foundation/UrlHelper.php', 'Symfony\\Component\\HttpKernel\\Attribute\\ArgumentInterface' => $vendorDir . '/symfony/http-kernel/Attribute/ArgumentInterface.php', 'Symfony\\Component\\HttpKernel\\Attribute\\AsController' => $vendorDir . '/symfony/http-kernel/Attribute/AsController.php', @@ -2530,7 +2558,6 @@ return array( 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => $vendorDir . '/symfony/var-dumper/Exception/ThrowingCasterException.php', 'Symfony\\Component\\VarDumper\\Server\\Connection' => $vendorDir . '/symfony/var-dumper/Server/Connection.php', 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => $vendorDir . '/symfony/var-dumper/Server/DumpServer.php', - 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => $vendorDir . '/symfony/var-dumper/Test/VarDumperTestTrait.php', 'Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php', 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/var-exporter/Exception/ClassNotFoundException.php', 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/var-exporter/Exception/ExceptionInterface.php', @@ -2894,6 +2921,7 @@ return array( 'ormStopWatch' => $baseDir . '/core/ormstopwatch.class.inc.php', 'ormStyle' => $baseDir . '/core/ormStyle.class.inc.php', 'ormTagSet' => $baseDir . '/core/ormtagset.class.inc.php', + 'phpCAS' => $vendorDir . '/apereo/phpcas/source/CAS.php', 'privUITransaction' => $baseDir . '/application/transaction.class.inc.php', 'privUITransactionFile' => $baseDir . '/application/transaction.class.inc.php', 'privUITransactionSession' => $baseDir . '/application/transaction.class.inc.php', diff --git a/lib/composer/autoload_files.php b/lib/composer/autoload_files.php index 59b9cb0e2..9ca87aae9 100644 --- a/lib/composer/autoload_files.php +++ b/lib/composer/autoload_files.php @@ -14,9 +14,9 @@ return array( '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', + 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => $vendorDir . '/laminas/laminas-servicemanager/src/autoload.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', - 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => $vendorDir . '/laminas/laminas-servicemanager/src/autoload.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', diff --git a/lib/composer/autoload_psr4.php b/lib/composer/autoload_psr4.php index 0a5c0937f..eb2c95ace 100644 --- a/lib/composer/autoload_psr4.php +++ b/lib/composer/autoload_psr4.php @@ -47,7 +47,7 @@ return array( 'ScssPhp\\ScssPhp\\' => array($vendorDir . '/scssphp/scssphp/src'), 'Sabberworm\\CSS\\' => array($vendorDir . '/sabberworm/php-css-parser/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index 4bf9631eb..1873d23bb 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -15,9 +15,9 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', + 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/autoload.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', - 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/autoload.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', @@ -275,8 +275,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f ), 'Psr\\Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - 1 => __DIR__ . '/..' . '/psr/http-factory/src', + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', ), 'Psr\\Http\\Client\\' => array ( @@ -464,6 +464,53 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'BulkExportMissingParameterException' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', 'BulkExportResult' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', 'BulkExportResultGC' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', + 'CAS_AuthenticationException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/AuthenticationException.php', + 'CAS_Client' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Client.php', + 'CAS_CookieJar' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/CookieJar.php', + 'CAS_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Exception.php', + 'CAS_GracefullTerminationException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/GracefullTerminationException.php', + 'CAS_InvalidArgumentException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/InvalidArgumentException.php', + 'CAS_Languages_Catalan' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Catalan.php', + 'CAS_Languages_ChineseSimplified' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php', + 'CAS_Languages_English' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/English.php', + 'CAS_Languages_French' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/French.php', + 'CAS_Languages_Galego' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Galego.php', + 'CAS_Languages_German' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/German.php', + 'CAS_Languages_Greek' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Greek.php', + 'CAS_Languages_Japanese' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Japanese.php', + 'CAS_Languages_LanguageInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/LanguageInterface.php', + 'CAS_Languages_Portuguese' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Portuguese.php', + 'CAS_Languages_Spanish' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Spanish.php', + 'CAS_OutOfSequenceBeforeAuthenticationCallException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php', + 'CAS_OutOfSequenceBeforeClientException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php', + 'CAS_OutOfSequenceBeforeProxyException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php', + 'CAS_OutOfSequenceException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceException.php', + 'CAS_PGTStorage_AbstractStorage' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php', + 'CAS_PGTStorage_Db' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/Db.php', + 'CAS_PGTStorage_File' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/File.php', + 'CAS_ProxiedService' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService.php', + 'CAS_ProxiedService_Abstract' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Abstract.php', + 'CAS_ProxiedService_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Exception.php', + 'CAS_ProxiedService_Http' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http.php', + 'CAS_ProxiedService_Http_Abstract' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php', + 'CAS_ProxiedService_Http_Get' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php', + 'CAS_ProxiedService_Http_Post' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php', + 'CAS_ProxiedService_Imap' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Imap.php', + 'CAS_ProxiedService_Testable' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Testable.php', + 'CAS_ProxyChain' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain.php', + 'CAS_ProxyChain_AllowedList' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php', + 'CAS_ProxyChain_Any' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Any.php', + 'CAS_ProxyChain_Interface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Interface.php', + 'CAS_ProxyChain_Trusted' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Trusted.php', + 'CAS_ProxyTicketException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyTicketException.php', + 'CAS_Request_AbstractRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/AbstractRequest.php', + 'CAS_Request_CurlMultiRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php', + 'CAS_Request_CurlRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/CurlRequest.php', + 'CAS_Request_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/Exception.php', + 'CAS_Request_MultiRequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php', + 'CAS_Request_RequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/RequestInterface.php', + 'CAS_Session_PhpSession' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Session/PhpSession.php', + 'CAS_TypeMismatchException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/TypeMismatchException.php', 'CLILikeWebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/CLILikeWebPage.php', 'CLIPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/CLIPage.php', 'CMDBChange' => __DIR__ . '/../..' . '/core/cmdbchange.class.inc.php', @@ -1113,7 +1160,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Laminas\\ServiceManager\\Proxy\\LazyServiceFactory' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Proxy/LazyServiceFactory.php', 'Laminas\\ServiceManager\\ServiceLocatorInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php', 'Laminas\\ServiceManager\\ServiceManager' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/ServiceManager.php', - 'Laminas\\ServiceManager\\Test\\CommonPluginManagerTrait' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Test/CommonPluginManagerTrait.php', 'Laminas\\ServiceManager\\Tool\\ConfigDumper' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Tool/ConfigDumper.php', 'Laminas\\ServiceManager\\Tool\\ConfigDumperCommand' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Tool/ConfigDumperCommand.php', 'Laminas\\ServiceManager\\Tool\\FactoryCreator' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Tool/FactoryCreator.php', @@ -1956,14 +2002,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\SodiumVault' => __DIR__ . '/..' . '/symfony/framework-bundle/Secrets/SodiumVault.php', 'Symfony\\Bundle\\FrameworkBundle\\Session\\DeprecatedSessionFactory' => __DIR__ . '/..' . '/symfony/framework-bundle/Session/DeprecatedSessionFactory.php', 'Symfony\\Bundle\\FrameworkBundle\\Session\\ServiceSessionFactory' => __DIR__ . '/..' . '/symfony/framework-bundle/Session/ServiceSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\BrowserKitAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/BrowserKitAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\DomCrawlerAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/KernelTestCase.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/MailerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestBrowserToken' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/TestBrowserToken.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestContainer' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/TestContainer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/WebTestAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/WebTestCase.php', 'Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator' => __DIR__ . '/..' . '/symfony/framework-bundle/Translation/Translator.php', 'Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer' => __DIR__ . '/..' . '/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php', 'Symfony\\Bundle\\TwigBundle\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/twig-bundle/Command/LintCommand.php', @@ -2597,16 +2635,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageFactoryInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseFormatSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsUnprocessable' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', 'Symfony\\Component\\HttpFoundation\\UrlHelper' => __DIR__ . '/..' . '/symfony/http-foundation/UrlHelper.php', 'Symfony\\Component\\HttpKernel\\Attribute\\ArgumentInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Attribute/ArgumentInterface.php', 'Symfony\\Component\\HttpKernel\\Attribute\\AsController' => __DIR__ . '/..' . '/symfony/http-kernel/Attribute/AsController.php', @@ -2895,7 +2923,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => __DIR__ . '/..' . '/symfony/var-dumper/Exception/ThrowingCasterException.php', 'Symfony\\Component\\VarDumper\\Server\\Connection' => __DIR__ . '/..' . '/symfony/var-dumper/Server/Connection.php', 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => __DIR__ . '/..' . '/symfony/var-dumper/Server/DumpServer.php', - 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => __DIR__ . '/..' . '/symfony/var-dumper/Test/VarDumperTestTrait.php', 'Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php', 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ClassNotFoundException.php', 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ExceptionInterface.php', @@ -3259,6 +3286,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'ormStopWatch' => __DIR__ . '/../..' . '/core/ormstopwatch.class.inc.php', 'ormStyle' => __DIR__ . '/../..' . '/core/ormStyle.class.inc.php', 'ormTagSet' => __DIR__ . '/../..' . '/core/ormtagset.class.inc.php', + 'phpCAS' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS.php', 'privUITransaction' => __DIR__ . '/../..' . '/application/transaction.class.inc.php', 'privUITransactionFile' => __DIR__ . '/../..' . '/application/transaction.class.inc.php', 'privUITransactionSession' => __DIR__ . '/../..' . '/application/transaction.class.inc.php', diff --git a/lib/composer/installed.json b/lib/composer/installed.json index dab446558..1da81febc 100644 --- a/lib/composer/installed.json +++ b/lib/composer/installed.json @@ -1,5 +1,76 @@ { "packages": [ + { + "name": "apereo/phpcas", + "version": "1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/apereo/phpCAS.git", + "reference": "d6f5797fb568726f34c8e48741776d81e4a2646b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apereo/phpCAS/zipball/d6f5797fb568726f34c8e48741776d81e4a2646b", + "reference": "d6f5797fb568726f34c8e48741776d81e4a2646b", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-dom": "*", + "php": ">=7.1.0", + "psr/log": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "monolog/monolog": "^1.0.0 || ^2.0.0", + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": ">=7.5" + }, + "time": "2022-05-03T21:12:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "source/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Joachim Fritschi", + "email": "jfritschi@freenet.de", + "homepage": "https://github.com/jfritschi" + }, + { + "name": "Adam Franco", + "homepage": "https://github.com/adamfranco" + }, + { + "name": "Henry Pan", + "homepage": "https://github.com/phy25" + } + ], + "description": "Provides a simple API for authenticating users against a CAS server", + "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", + "keywords": [ + "apereo", + "cas", + "jasig" + ], + "support": { + "issues": "https://github.com/apereo/phpCAS/issues", + "source": "https://github.com/apereo/phpCAS/tree/1.5.0" + }, + "install-path": "../apereo/phpcas" + }, { "name": "combodo/tcpdf", "version": "6.4.4", diff --git a/lib/composer/installed.php b/lib/composer/installed.php index bf72adbe8..d00198d33 100644 --- a/lib/composer/installed.php +++ b/lib/composer/installed.php @@ -5,18 +5,27 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '30021d92368e2bfb13e4b166967b9a1a43796904', + 'reference' => '26c252d9d80ccb11f766f04b068cb9de1921eebc', 'name' => 'combodo/itop', 'dev' => true, ), 'versions' => array( + 'apereo/phpcas' => array( + 'pretty_version' => '1.5.0', + 'version' => '1.5.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../apereo/phpcas', + 'aliases' => array(), + 'reference' => 'd6f5797fb568726f34c8e48741776d81e4a2646b', + 'dev_requirement' => false, + ), 'combodo/itop' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '30021d92368e2bfb13e4b166967b9a1a43796904', + 'reference' => '26c252d9d80ccb11f766f04b068cb9de1921eebc', 'dev_requirement' => false, ), 'combodo/tcpdf' => array( diff --git a/lib/composer/platform_check.php b/lib/composer/platform_check.php index 4a3b7b6a6..2e6a23f9c 100644 --- a/lib/composer/platform_check.php +++ b/lib/composer/platform_check.php @@ -9,6 +9,7 @@ if (!(PHP_VERSION_ID >= 70400)) { } $missingExtensions = array(); +extension_loaded('curl') || $missingExtensions[] = 'curl'; extension_loaded('dom') || $missingExtensions[] = 'dom'; extension_loaded('gd') || $missingExtensions[] = 'gd'; extension_loaded('iconv') || $missingExtensions[] = 'iconv';