From 16ab7ecb8b96449b088142c0b0af65ce4a6975dd Mon Sep 17 00:00:00 2001
From: Tom Misilo <tmisilo@gmail.com>
Date: Fri, 27 Sep 2013 13:07:00 -0400
Subject: [PATCH] VUFIND-422 fixes. Updated to be merged into master

---
 composer.json                                 |    7 +-
 composer.lock                                 |   56 +-
 config/vufind/config.ini                      |   48 +-
 module/VuFind/config/module.config.php        |    3 +-
 module/VuFind/src/VuFind/Auth/CAS.php         |  284 ++
 vendor/autoload.php                           |    2 +-
 vendor/composer/autoload_classmap.php         |   45 +-
 vendor/composer/autoload_real.php             |    6 +-
 vendor/composer/installed.json                |   53 +
 vendor/jasig/phpcas/.buildpath                |    5 +
 vendor/jasig/phpcas/.gitignore                |    6 +
 vendor/jasig/phpcas/.project                  |   22 +
 vendor/jasig/phpcas/.travis.yml               |    9 +
 vendor/jasig/phpcas/CAS.php                   |   30 +
 vendor/jasig/phpcas/LICENSE                   |  201 +
 vendor/jasig/phpcas/NOTICE                    |   81 +
 vendor/jasig/phpcas/README.md                 |   31 +
 vendor/jasig/phpcas/composer.json             |   24 +
 vendor/jasig/phpcas/docs/Building             |   34 +
 vendor/jasig/phpcas/docs/Upgrading            |  100 +
 .../phpcas/docs/examples/config.example.php   |  104 +
 .../examples/create_pgt_storage_db_table.php  |   53 +
 vendor/jasig/phpcas/docs/examples/example.css |   10 +
 .../docs/examples/example_advanced_saml11.php |   80 +
 .../docs/examples/example_custom_urls.php     |   68 +
 .../phpcas/docs/examples/example_gateway.php  |   69 +
 .../docs/examples/example_hardening.php       |   83 +
 .../phpcas/docs/examples/example_html.php     |   74 +
 .../phpcas/docs/examples/example_lang.php     |   61 +
 .../phpcas/docs/examples/example_logout.php   |   62 +
 .../examples/example_no_ssl_cn_validation.php |   66 +
 .../docs/examples/example_pgt_storage_db.php  |   72 +
 .../examples/example_pgt_storage_file.php     |   72 +
 .../docs/examples/example_proxy_GET.php       |   96 +
 .../docs/examples/example_proxy_POST.php      |  101 +
 .../examples/example_proxy_rebroadcast.php    |   61 +
 .../examples/example_proxy_serviceWeb.php     |   69 +
 .../example_proxy_serviceWeb_chaining.php     |   69 +
 .../phpcas/docs/examples/example_service.php  |   94 +
 .../docs/examples/example_service_POST.php    |  103 +
 .../examples/example_service_that_proxies.php |  104 +
 .../phpcas/docs/examples/example_simple.php   |   61 +
 .../phpcas/docs/examples/script_info.php      |   20 +
 .../jasig/phpcas/docs/images/esup-portail.png |  Bin 0 -> 2621 bytes
 vendor/jasig/phpcas/docs/images/jasig.png     |  Bin 0 -> 2384 bytes
 vendor/jasig/phpcas/docs/images/phpcas.png    |  Bin 0 -> 6771 bytes
 vendor/jasig/phpcas/docs/index.html           |   19 +
 vendor/jasig/phpcas/source/CAS.php            | 1887 ++++++++
 .../source/CAS/AuthenticationException.php    |  107 +
 vendor/jasig/phpcas/source/CAS/Autoload.php   |  105 +
 vendor/jasig/phpcas/source/CAS/Client.php     | 3824 +++++++++++++++++
 vendor/jasig/phpcas/source/CAS/CookieJar.php  |  385 ++
 vendor/jasig/phpcas/source/CAS/Exception.php  |   59 +
 .../CAS/GracefullTerminationException.php     |   86 +
 .../source/CAS/InvalidArgumentException.php   |   46 +
 .../phpcas/source/CAS/Languages/Catalan.php   |  114 +
 .../phpcas/source/CAS/Languages/English.php   |  114 +
 .../phpcas/source/CAS/Languages/French.php    |  116 +
 .../phpcas/source/CAS/Languages/German.php    |  116 +
 .../phpcas/source/CAS/Languages/Greek.php     |  115 +
 .../phpcas/source/CAS/Languages/Japanese.php  |  113 +
 .../CAS/Languages/LanguageInterface.php       |   96 +
 .../phpcas/source/CAS/Languages/Spanish.php   |  117 +
 ...uenceBeforeAuthenticationCallException.php |   56 +
 .../OutOfSequenceBeforeClientException.php    |   58 +
 .../CAS/OutOfSequenceBeforeProxyException.php |   59 +
 .../source/CAS/OutOfSequenceException.php     |   49 +
 .../source/CAS/PGTStorage/AbstractStorage.php |  222 +
 .../jasig/phpcas/source/CAS/PGTStorage/Db.php |  440 ++
 .../phpcas/source/CAS/PGTStorage/File.php     |  259 ++
 .../phpcas/source/CAS/ProxiedService.php      |   72 +
 .../source/CAS/ProxiedService/Abstract.php    |  149 +
 .../source/CAS/ProxiedService/Exception.php   |   46 +
 .../phpcas/source/CAS/ProxiedService/Http.php |   91 +
 .../CAS/ProxiedService/Http/Abstract.php      |  360 ++
 .../source/CAS/ProxiedService/Http/Get.php    |   85 +
 .../source/CAS/ProxiedService/Http/Post.php   |  152 +
 .../phpcas/source/CAS/ProxiedService/Imap.php |  280 ++
 .../source/CAS/ProxiedService/Testable.php    |   75 +
 vendor/jasig/phpcas/source/CAS/ProxyChain.php |  127 +
 .../source/CAS/ProxyChain/AllowedList.php     |  119 +
 .../phpcas/source/CAS/ProxyChain/Any.php      |   64 +
 .../source/CAS/ProxyChain/Interface.php       |   53 +
 .../phpcas/source/CAS/ProxyChain/Trusted.php  |   59 +
 .../source/CAS/ProxyTicketException.php       |   71 +
 .../source/CAS/Request/AbstractRequest.php    |  379 ++
 .../source/CAS/Request/CurlMultiRequest.php   |  146 +
 .../phpcas/source/CAS/Request/CurlRequest.php |  199 +
 .../phpcas/source/CAS/Request/Exception.php   |   45 +
 .../CAS/Request/MultiRequestInterface.php     |   83 +
 .../source/CAS/Request/RequestInterface.php   |  179 +
 .../source/CAS/TypeMismatchException.php      |   70 +
 .../test/CAS/TestHarness/BasicResponse.php    |  467 ++
 .../CAS/TestHarness/DummyMultiRequest.php     |  128 +
 .../test/CAS/TestHarness/DummyRequest.php     |  116 +
 .../CAS/TestHarness/ResponseInterface.php     |  136 +
 .../test/CAS/Tests/AuthenticationTest.php     |  143 +
 .../test/CAS/Tests/Cas20AttributesTest.php    |  382 ++
 .../phpcas/test/CAS/Tests/CookieJarTest.php   |  919 ++++
 .../test/CAS/Tests/MultiRequestTest.php       |  164 +
 .../phpcas/test/CAS/Tests/ProxyChainsTest.php |  411 ++
 .../CAS/Tests/ProxyTicketValidationTest.php   |  464 ++
 .../phpcas/test/CAS/Tests/ServiceMailTest.php |  340 ++
 .../CAS/Tests/ServiceTicketValidationTest.php |  205 +
 .../phpcas/test/CAS/Tests/ServiceWebTest.php  |  521 +++
 vendor/jasig/phpcas/test/README.txt           |   42 +
 vendor/jasig/phpcas/test/TestSuite.php        |  102 +
 vendor/jasig/phpcas/utils/Doxyfile            |  209 +
 vendor/jasig/phpcas/utils/ant_doxygen.jar     |  Bin 0 -> 11519 bytes
 .../phpcas/utils/build-example.properties     |   30 +
 vendor/jasig/phpcas/utils/build.xml           |  395 ++
 vendor/jasig/phpcas/utils/makepackage.php     |   75 +
 vendor/jasig/phpcas/utils/version.properties  |    6 +
 113 files changed, 19410 insertions(+), 10 deletions(-)
 create mode 100644 module/VuFind/src/VuFind/Auth/CAS.php
 create mode 100644 vendor/jasig/phpcas/.buildpath
 create mode 100644 vendor/jasig/phpcas/.gitignore
 create mode 100644 vendor/jasig/phpcas/.project
 create mode 100644 vendor/jasig/phpcas/.travis.yml
 create mode 100644 vendor/jasig/phpcas/CAS.php
 create mode 100644 vendor/jasig/phpcas/LICENSE
 create mode 100644 vendor/jasig/phpcas/NOTICE
 create mode 100644 vendor/jasig/phpcas/README.md
 create mode 100644 vendor/jasig/phpcas/composer.json
 create mode 100644 vendor/jasig/phpcas/docs/Building
 create mode 100644 vendor/jasig/phpcas/docs/Upgrading
 create mode 100644 vendor/jasig/phpcas/docs/examples/config.example.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/create_pgt_storage_db_table.php
 create mode 100755 vendor/jasig/phpcas/docs/examples/example.css
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_advanced_saml11.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_custom_urls.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_gateway.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_hardening.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_html.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_lang.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_logout.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_no_ssl_cn_validation.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_pgt_storage_db.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_pgt_storage_file.php
 create mode 100755 vendor/jasig/phpcas/docs/examples/example_proxy_GET.php
 create mode 100755 vendor/jasig/phpcas/docs/examples/example_proxy_POST.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_proxy_rebroadcast.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb_chaining.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_service.php
 create mode 100755 vendor/jasig/phpcas/docs/examples/example_service_POST.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_service_that_proxies.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/example_simple.php
 create mode 100644 vendor/jasig/phpcas/docs/examples/script_info.php
 create mode 100644 vendor/jasig/phpcas/docs/images/esup-portail.png
 create mode 100644 vendor/jasig/phpcas/docs/images/jasig.png
 create mode 100644 vendor/jasig/phpcas/docs/images/phpcas.png
 create mode 100644 vendor/jasig/phpcas/docs/index.html
 create mode 100644 vendor/jasig/phpcas/source/CAS.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/AuthenticationException.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Autoload.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Client.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/CookieJar.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Exception.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/GracefullTerminationException.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/InvalidArgumentException.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/Catalan.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/English.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/French.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/German.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/Greek.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/Japanese.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/LanguageInterface.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/Languages/Spanish.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeClientException.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/OutOfSequenceException.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/PGTStorage/AbstractStorage.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/PGTStorage/Db.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/PGTStorage/File.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Abstract.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Exception.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Http.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Abstract.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Get.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Post.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Imap.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxiedService/Testable.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/ProxyChain.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/ProxyChain/AllowedList.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/ProxyChain/Any.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/ProxyChain/Interface.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/ProxyChain/Trusted.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/ProxyTicketException.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Request/AbstractRequest.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Request/CurlMultiRequest.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Request/CurlRequest.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Request/Exception.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Request/MultiRequestInterface.php
 create mode 100755 vendor/jasig/phpcas/source/CAS/Request/RequestInterface.php
 create mode 100644 vendor/jasig/phpcas/source/CAS/TypeMismatchException.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/TestHarness/BasicResponse.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/TestHarness/DummyMultiRequest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/TestHarness/DummyRequest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/TestHarness/ResponseInterface.php
 create mode 100644 vendor/jasig/phpcas/test/CAS/Tests/AuthenticationTest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/Tests/Cas20AttributesTest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/Tests/CookieJarTest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/Tests/MultiRequestTest.php
 create mode 100644 vendor/jasig/phpcas/test/CAS/Tests/ProxyChainsTest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/Tests/ProxyTicketValidationTest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/Tests/ServiceMailTest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/Tests/ServiceTicketValidationTest.php
 create mode 100755 vendor/jasig/phpcas/test/CAS/Tests/ServiceWebTest.php
 create mode 100755 vendor/jasig/phpcas/test/README.txt
 create mode 100755 vendor/jasig/phpcas/test/TestSuite.php
 create mode 100644 vendor/jasig/phpcas/utils/Doxyfile
 create mode 100644 vendor/jasig/phpcas/utils/ant_doxygen.jar
 create mode 100644 vendor/jasig/phpcas/utils/build-example.properties
 create mode 100644 vendor/jasig/phpcas/utils/build.xml
 create mode 100644 vendor/jasig/phpcas/utils/makepackage.php
 create mode 100644 vendor/jasig/phpcas/utils/version.properties

diff --git a/composer.json b/composer.json
index 8d0b6aa9aaa..fbe979a0166 100644
--- a/composer.json
+++ b/composer.json
@@ -21,6 +21,10 @@
             "type": "vcs",
             "url": "https://github.com/summon/Summon.php"
         },
+        {
+            "type": "vcs",
+            "url": "https://github.com/Jasig/phpCAS"
+        },
         {
             "type": "package",
             "package": {
@@ -61,6 +65,7 @@
         "symfony/yaml": "*",
         "zendframework/zendframework": "2.2.4",
         "zendframework/zendrest": "2.*",
-        "zendframework/zendservice-amazon": "2.*"
+        "zendframework/zendservice-amazon": "2.*",
+        "jasig/phpCAS": "dev-master"
     }
 }
diff --git a/composer.lock b/composer.lock
index cda8b49042d..35ad7a4c5cc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -3,7 +3,7 @@
         "This file locks the dependencies of your project to a known state",
         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
     ],
-    "hash": "3a96cca5a1467ae59946ca4a60ea154b",
+    "hash": "912400ee83b7a6b04d6e1ccc398e5ea4",
     "packages": [
         {
             "name": "aferrandini/phpqrcode",
@@ -49,6 +49,57 @@
             ],
             "time": "2013-07-08 09:39:08"
         },
+        {
+            "name": "jasig/phpcas",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Jasig/phpCAS.git",
+                "reference": "13c17276481a5fb55de2ce4c0cf513197fb1ee24"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Jasig/phpCAS/zipball/13c17276481a5fb55de2ce4c0cf513197fb1ee24",
+                "reference": "13c17276481a5fb55de2ce4c0cf513197fb1ee24",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.0.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~3.7.10"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "source/"
+                ]
+            },
+            "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": [
+                "cas",
+                "jasig"
+            ],
+            "support": {
+                "source": "https://github.com/Jasig/phpCAS/tree/master",
+                "issues": "https://github.com/Jasig/phpCAS/issues"
+            },
+            "time": "2013-07-25 07:36:06"
+        },
         {
             "name": "johnwohlers/sip2",
             "version": "dev-master",
@@ -642,7 +693,8 @@
         "aferrandini/phpqrcode": 20,
         "johnwohlers/sip2": 20,
         "mobileesp/mdetect": 20,
-        "serialssolutions/summon": 20
+        "serialssolutions/summon": 20,
+        "jasig/phpcas": 20
     },
     "platform": [
 
diff --git a/config/vufind/config.ini b/config/vufind/config.ini
index c7ce24018e8..2178442463e 100644
--- a/config/vufind/config.ini
+++ b/config/vufind/config.ini
@@ -156,13 +156,14 @@ title_level_holds_mode = "disabled"
 
 ; This section allows you to determine how the users will authenticate.
 ; You can use an LDAP directory, the local ILS, the VuFind database (Database),
-; Shibboleth, SIP2 or some combination of these (via the MultiAuth option).
+; Shibboleth, SIP2, CAS or some combination of these (via the MultiAuth option).
 [Authentication]
 ;method          = LDAP
 ;method         = ILS
 method         = Database
 ;method         = Shibboleth
 ;method         = SIP2
+;method         = CAS
 ;method         = MultiAuth
 
 ; This setting only applies when method is set to ILS.  It determines which
@@ -356,6 +357,51 @@ database          = mysql://root@localhost/vufind
 ;college = HTTP_COLLEGE
 ;major = HTTP_MAJOR
 ;home_library = HTTP_HOME_LIBRARY
+;
+; CAS is optional.  This section only needs to exist if the
+; Authentication Method is set to CAS.
+;[CAS]
+
+; Required: the attribute CAS uses to uniquely identify users.
+;username              = uid
+
+; Required: CAS Hostname.
+;server                = cas.myuniversity.edu
+
+; Required: CAS port.
+;port                 = 443
+
+; Required: CAS context.
+;context                 = /cas
+
+; Required: CAS Certificate Path.
+;CACert = /etc/pki/cert/cert.crt
+
+; Required: CAS login URL.
+;login                 = https://cas.myuniversity.edu/cas/login
+
+
+; Required: CAS logout URL.
+;logout                = https://cas.myuniversity.edu/cas/logout
+
+; Optional: CAS logging.
+;debug              = false
+;log                = /tmp/casdebug
+
+; Optional: URL to forward to after CAS login (if omitted,
+; defaultLoggedInModule from [Site] section will be used).
+;target                = http://lib.myuniversity.edu/vufind/MyResearch/Home
+
+; Some or all of the following entries may be uncommented to map CAS
+; attributes to user database columns:
+;cat_username = acctSyncUserID
+;cat_password = catPassword
+;email = mail
+;firstname = givenName
+;lastname = sn
+;college = college
+;major = major1
+;home_library = library
 
 ; External Content is Optional.
 ; To use multiple, separate with a comma.  Priority will be given by the order listed
diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php
index c199341bccc..e55b344b263 100644
--- a/module/VuFind/config/module.config.php
+++ b/module/VuFind/config/module.config.php
@@ -382,6 +382,7 @@ $config = array(
                     'ldap' => 'VuFind\Auth\LDAP',
                     'multiauth' => 'VuFind\Auth\MultiAuth',
                     'shibboleth' => 'VuFind\Auth\Shibboleth',
+                    'cas' => 'VuFind\Auth\CAS',
                     'sip2' => 'VuFind\Auth\SIP2',
                 ),
                 'aliases' => array(
@@ -1144,4 +1145,4 @@ $config['router']['routes']['home'] = array(
     )
 );
 
-return $config;
\ No newline at end of file
+return $config;
diff --git a/module/VuFind/src/VuFind/Auth/CAS.php b/module/VuFind/src/VuFind/Auth/CAS.php
new file mode 100644
index 00000000000..e4c42a8470e
--- /dev/null
+++ b/module/VuFind/src/VuFind/Auth/CAS.php
@@ -0,0 +1,284 @@
+<?php
+/**
+ * CAS authentication module.
+ *
+ * PHP version 5
+ *
+ * Copyright (C) Villanova University 2010.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @category VuFind2
+ * @package  Authentication
+ * @author   Franck Borel <franck.borel@gbv.de>
+ * @author   Demian Katz <demian.katz@villanova.edu>
+ * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
+ * @link     http://www.vufind.org  Main Page
+ */
+namespace VuFind\Auth;
+use VuFind\Exception\Auth as AuthException;
+
+/**
+ * CAS authentication module.
+ *
+ * @category VuFind2
+ * @package  Authentication
+ * @author   Tom Misilo <tmisilo@gmail.com>
+ * @author   Franck Borel <franck.borel@gbv.de>
+ * @author   Demian Katz <demian.katz@villanova.edu>
+ * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
+ * @link     http://www.vufind.org  Main Page
+ */
+class CAS extends AbstractBase
+{
+    /**
+     * Already Setup phpCAS
+     *
+     * @var boolean
+     */
+    protected $phpCASSetup = FALSE;
+
+    /**
+     * Validate configuration parameters.  This is a support method for getConfig(),
+     * so the configuration MUST be accessed using $this->config; do not call
+     * $this->getConfig() from within this method!
+     *
+     * @throws AuthException
+     * @return void
+     */
+    
+
+    protected function validateConfig()
+    {
+        $cas = $this->config->CAS;
+        // Throw an exception if the required username setting is missing.
+        if (!isset($cas->username) || empty($cas->username)) {
+            throw new AuthException(
+                "CAS username is missing in your configuration file."
+            );
+        }
+
+        // Throw an exception if the required server setting is missing.
+        if (!isset($cas->server)) {
+            throw new AuthException(
+                'CAS server configuration parameter is not set.'
+            );
+        }
+
+        // Throw an exception if the required port setting is missing.
+        if (!isset($cas->port)) {
+            throw new AuthException(
+                'CAS port configuration parameter is not set.'
+            );
+        }
+
+        // Throw an exception if the required context setting is missing.
+        if (!isset($cas->context)) {
+            throw new AuthException(
+                'CAS context configuration parameter is not set.'
+            );
+        }
+
+        // Throw an exception if the required CACert setting is missing.
+        if (!isset($cas->CACert)) {
+            throw new AuthException(
+                'CAS CACert configuration parameter is not set.'
+            );
+        }
+
+        // Throw an exception if the required login setting is missing.
+        if (!isset($cas->login)) {
+            throw new AuthException(
+                'CAS login configuration parameter is not set.'
+            );
+        }
+
+        // Throw an exception if the required logout setting is missing.
+        if (!isset($cas->logout)) {
+            throw new AuthException(
+                'CAS logout configuration parameter is not set.'
+            );
+        }
+    }
+
+    /**
+     * Attempt to authenticate the current user.  Throws exception if login fails.
+     *
+     * @param \Zend\Http\PhpEnvironment\Request $request Request object containing
+     * account credentials.
+     *
+     * @throws AuthException
+     * @return \VuFind\Db\Row\User Object representing logged-in user.
+     */
+    public function authenticate($request)
+    {
+        // Configure phpCAS
+        $cas = $this->getConfig()->CAS;
+        $casauth = $this->setupCAS();
+        $casauth->forceAuthentication();        
+
+
+        // Check if username is set.
+        $username = $casauth->getAttribute($cas->username);
+        if (empty($username)) {
+            throw new AuthException('authentication_error_admin');
+        }
+
+        // If we made it this far, we should log in the user!
+        $user = $this->getUserTable()->getByUsername($username);
+
+
+        // Has the user configured attributes to use for populating the user table?
+        $attribsToCheck = array(
+            "cat_username", "cat_password", "email", "lastname", "firstname", 
+            "college", "major", "home_library"
+        );
+        foreach ($attribsToCheck as $attribute) {
+            if (isset($cas->$attribute)) {
+                $value = $casauth->getAttribute($cas->$attribute);
+                if ($attribute != 'cat_password') {
+                    $user->$attribute = $value;
+                } else {
+                   $catPassword = $value;
+                }
+            }
+        }
+
+        // Save credentials if applicable:
+        if (!empty ($catPassword) && !empty($user->cat_username)) {
+           $user->saveCredentials($user->cat_username, $catPassword);
+
+        }
+
+        // Save and return the user object:
+        $user->save();
+        return $user;
+    }
+
+    /**
+     * Get the URL to establish a session (needed when the internal VuFind login
+     * form is inadequate).  Returns false when no session initiator is needed.
+     *
+     * @param string $target Full URL where external authentication method should
+     * send user to after login (some drivers may override this).
+     *
+     * @return bool|string
+     */
+    public function getSessionInitiator($target)
+    {
+        $config = $this->getConfig();
+        if (isset($config->CAS->target)) {
+            $casTarget = $config->CAS->target;
+        } else {
+            $casTarget = $target;
+        }
+        $sessionInitiator = $config->CAS->login
+            . '?service=' . urlencode($casTarget);
+
+        return $sessionInitiator;
+    }
+
+    /**
+     * Has the user's login expired?
+     *
+     * @return bool
+     */
+    public function isExpired()
+    {
+        $config = $this->getConfig();
+        if (isset($config->CAS->username)
+            && isset($config->CAS->logout)
+        ) {
+             $casauth = $this->setupCAS();
+           if($casauth->checkAuthentication() !== TRUE) {
+              return empty($username);
+           }
+        }
+        return false;
+    }
+
+    /**
+     * Perform cleanup at logout time.
+     *
+     * @param string $url URL to redirect user to after logging out.
+     *
+     * @return string     Redirect URL (usually same as $url, but modified in
+     * some authentication modules).
+     */
+    public function logout($url)
+    {
+        // If single log-out is enabled, use a special URL:
+        $config = $this->getConfig();
+        if (isset($config->CAS->logout)
+            && !empty($config->CAS->logout)
+        ) {
+            $url = $config->CAS->logout . '?service=' . urlencode($url);
+        }
+
+        // Send back the redirect URL (possibly modified):
+        return $url;
+    }
+
+    /**
+     * Extract required user attributes from the configuration.
+     *
+     * @return array      Only username and attribute-related values
+     */
+    protected function getRequiredAttributes()
+    {
+        // Special case -- store username as-is to establish return array:
+        $sortedUserAttributes = array();
+
+        // Now extract user attribute values:
+        $cas = $this->getConfig()->CAS;
+        foreach ($cas as $key => $value) {
+            if (preg_match("/userattribute_[0-9]{1,}/", $key)) {
+                $valueKey = 'userattribute_value_' . substr($key, 14);
+                $sortedUserAttributes[$value] = isset($cas->$valueKey)
+                    ? $cas->$valueKey : null;
+
+                // Throw an exception if attributes are missing/empty.
+                if (empty($sortedUserAttributes[$value])) {
+                    throw new AuthException(
+                        "User attribute value of " . $value. " is missing!"
+                    );
+                }
+            }
+        }
+
+        return $sortedUserAttributes;
+    }
+    /**
+     * Establishes phpCAS Configuration and Enables the phpCAS Client
+     *
+     * @return object     Returns phpCAS Object
+     */
+    protected function setupCAS()
+    {
+       $casauth = new \phpCAS();
+
+       // Check to see if phpCAS has already been setup. If it has, than skip as client can only be called once.
+       if (!$this->phpCASSetup) {
+           $cas = $this->getConfig()->CAS;
+           if (isset($cas->log) && !empty($cas->log) && isset($cas->debug) && ($cas->debug)) {
+               $casauth->setDebug($cas->log);
+           }
+           $casauth->client(SAML_VERSION_1_1, $cas->server, (int)$cas->port, $cas->context, FALSE);
+           $casauth->setCasServerCACert($cas->CACert);
+           $this->phpCASSetup = TRUE;
+       }
+       
+       return $casauth;
+    }
+}
diff --git a/vendor/autoload.php b/vendor/autoload.php
index ffb9f4bf257..b61cea966f3 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInit8ebfbe0172ac5af231c5e492fc1e6383::getLoader();
+return ComposerAutoloaderInit67cab821955a746708c64afc7d720bfb::getLoader();
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index c54c94816de..6f709fded3c 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -7,6 +7,49 @@ $baseDir = dirname($vendorDir);
 
 return array(
     'Archive_Tar' => $vendorDir . '/pear-pear.php.net/Archive_Tar/Archive/Tar.php',
+    'CAS_AuthenticationException' => $vendorDir . '/jasig/phpcas/source/CAS/AuthenticationException.php',
+    'CAS_Client' => $vendorDir . '/jasig/phpcas/source/CAS/Client.php',
+    'CAS_CookieJar' => $vendorDir . '/jasig/phpcas/source/CAS/CookieJar.php',
+    'CAS_Exception' => $vendorDir . '/jasig/phpcas/source/CAS/Exception.php',
+    'CAS_GracefullTerminationException' => $vendorDir . '/jasig/phpcas/source/CAS/GracefullTerminationException.php',
+    'CAS_InvalidArgumentException' => $vendorDir . '/jasig/phpcas/source/CAS/InvalidArgumentException.php',
+    'CAS_Languages_Catalan' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Catalan.php',
+    'CAS_Languages_English' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/English.php',
+    'CAS_Languages_French' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/French.php',
+    'CAS_Languages_German' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/German.php',
+    'CAS_Languages_Greek' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Greek.php',
+    'CAS_Languages_Japanese' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Japanese.php',
+    'CAS_Languages_LanguageInterface' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/LanguageInterface.php',
+    'CAS_Languages_Spanish' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Spanish.php',
+    'CAS_OutOfSequenceBeforeAuthenticationCallException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php',
+    'CAS_OutOfSequenceBeforeClientException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceBeforeClientException.php',
+    'CAS_OutOfSequenceBeforeProxyException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php',
+    'CAS_OutOfSequenceException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceException.php',
+    'CAS_PGTStorage_AbstractStorage' => $vendorDir . '/jasig/phpcas/source/CAS/PGTStorage/AbstractStorage.php',
+    'CAS_PGTStorage_Db' => $vendorDir . '/jasig/phpcas/source/CAS/PGTStorage/Db.php',
+    'CAS_PGTStorage_File' => $vendorDir . '/jasig/phpcas/source/CAS/PGTStorage/File.php',
+    'CAS_ProxiedService' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService.php',
+    'CAS_ProxiedService_Abstract' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Abstract.php',
+    'CAS_ProxiedService_Exception' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Exception.php',
+    'CAS_ProxiedService_Http' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http.php',
+    'CAS_ProxiedService_Http_Abstract' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http/Abstract.php',
+    'CAS_ProxiedService_Http_Get' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http/Get.php',
+    'CAS_ProxiedService_Http_Post' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http/Post.php',
+    'CAS_ProxiedService_Imap' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Imap.php',
+    'CAS_ProxiedService_Testable' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Testable.php',
+    'CAS_ProxyChain' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain.php',
+    'CAS_ProxyChain_AllowedList' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/AllowedList.php',
+    'CAS_ProxyChain_Any' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/Any.php',
+    'CAS_ProxyChain_Interface' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/Interface.php',
+    'CAS_ProxyChain_Trusted' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/Trusted.php',
+    'CAS_ProxyTicketException' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyTicketException.php',
+    'CAS_Request_AbstractRequest' => $vendorDir . '/jasig/phpcas/source/CAS/Request/AbstractRequest.php',
+    'CAS_Request_CurlMultiRequest' => $vendorDir . '/jasig/phpcas/source/CAS/Request/CurlMultiRequest.php',
+    'CAS_Request_CurlRequest' => $vendorDir . '/jasig/phpcas/source/CAS/Request/CurlRequest.php',
+    'CAS_Request_Exception' => $vendorDir . '/jasig/phpcas/source/CAS/Request/Exception.php',
+    'CAS_Request_MultiRequestInterface' => $vendorDir . '/jasig/phpcas/source/CAS/Request/MultiRequestInterface.php',
+    'CAS_Request_RequestInterface' => $vendorDir . '/jasig/phpcas/source/CAS/Request/RequestInterface.php',
+    'CAS_TypeMismatchException' => $vendorDir . '/jasig/phpcas/source/CAS/TypeMismatchException.php',
     'Console_Getopt' => $vendorDir . '/pear-pear.php.net/Console_Getopt/Console/Getopt.php',
     'File_MARC' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC.php',
     'File_MARCBASE' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARCBASE.php',
@@ -15,7 +58,6 @@ return array(
     'File_MARC_Data_Field' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Data_Field.php',
     'File_MARC_Exception' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Exception.php',
     'File_MARC_Field' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Field.php',
-    'File_MARC_Lint' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Lint.php',
     'File_MARC_Lint_CodeData' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Lint/CodeData.php',
     'File_MARC_List' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/List.php',
     'File_MARC_Record' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Record.php',
@@ -103,6 +145,7 @@ return array(
     'Validate' => $vendorDir . '/pear-pear.php.net/Validate/Validate.php',
     'Validate_ISPN' => $vendorDir . '/pear-pear.php.net/Validate_ISPN/Validate/ISPN.php',
     'XML_Util' => $vendorDir . '/pear-pear.php.net/XML_Util/XML/Util.php',
+    'phpCAS' => $vendorDir . '/jasig/phpcas/source/CAS.php',
     'sip2' => $vendorDir . '/johnwohlers/sip2/sip2.class.php',
     'uagent_info' => $vendorDir . '/mobileesp/mdetect/mdetect.php',
 );
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 37c06aaed4e..9fcd6284149 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit8ebfbe0172ac5af231c5e492fc1e6383
+class ComposerAutoloaderInit67cab821955a746708c64afc7d720bfb
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit8ebfbe0172ac5af231c5e492fc1e6383
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInit8ebfbe0172ac5af231c5e492fc1e6383', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit67cab821955a746708c64afc7d720bfb', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit8ebfbe0172ac5af231c5e492fc1e6383', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit67cab821955a746708c64afc7d720bfb', 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 6cadac496fa..a051d1928e3 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -657,5 +657,58 @@
             "source": "https://github.com/summon/Summon.php/tree/master",
             "issues": "https://github.com/summon/Summon.php/issues"
         }
+    },
+    {
+        "name": "jasig/phpcas",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/Jasig/phpCAS.git",
+            "reference": "13c17276481a5fb55de2ce4c0cf513197fb1ee24"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/Jasig/phpCAS/zipball/13c17276481a5fb55de2ce4c0cf513197fb1ee24",
+            "reference": "13c17276481a5fb55de2ce4c0cf513197fb1ee24",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.0.0"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "~3.7.10"
+        },
+        "time": "2013-07-25 07:36:06",
+        "type": "library",
+        "installation-source": "source",
+        "autoload": {
+            "classmap": [
+                "source/"
+            ]
+        },
+        "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": [
+            "cas",
+            "jasig"
+        ],
+        "support": {
+            "source": "https://github.com/Jasig/phpCAS/tree/master",
+            "issues": "https://github.com/Jasig/phpCAS/issues"
+        }
     }
 ]
diff --git a/vendor/jasig/phpcas/.buildpath b/vendor/jasig/phpcas/.buildpath
new file mode 100644
index 00000000000..8bcb4b5fd61
--- /dev/null
+++ b/vendor/jasig/phpcas/.buildpath
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<buildpath>
+	<buildpathentry kind="src" path=""/>
+	<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
+</buildpath>
diff --git a/vendor/jasig/phpcas/.gitignore b/vendor/jasig/phpcas/.gitignore
new file mode 100644
index 00000000000..52af6659bfc
--- /dev/null
+++ b/vendor/jasig/phpcas/.gitignore
@@ -0,0 +1,6 @@
+docs/examples/config.php
+utils/build.properties
+utils/dist/
+utils/tmp/
+utils/starting_HEAD
+/.settings
diff --git a/vendor/jasig/phpcas/.project b/vendor/jasig/phpcas/.project
new file mode 100644
index 00000000000..b3514ecb179
--- /dev/null
+++ b/vendor/jasig/phpcas/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>phpcas-devel</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	<buildCommand>
+		<name>org.eclipse.wst.validation.validationbuilder</name>
+		<arguments>
+		</arguments>
+	</buildCommand>
+	<buildCommand>
+		<name>org.eclipse.dltk.core.scriptbuilder</name>
+		<arguments>
+		</arguments>
+	</buildCommand>
+	</buildSpec>
+	<natures>
+	<nature>org.eclipse.php.core.PHPNature</nature>
+	</natures>
+</projectDescription>
diff --git a/vendor/jasig/phpcas/.travis.yml b/vendor/jasig/phpcas/.travis.yml
new file mode 100644
index 00000000000..8cbeadf2e5b
--- /dev/null
+++ b/vendor/jasig/phpcas/.travis.yml
@@ -0,0 +1,9 @@
+language: php
+php:
+  - "5.3"
+  - "5.4"
+  - "5.5"
+script:
+  - cd test
+  - phpunit TestSuite.php
+  
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/CAS.php b/vendor/jasig/phpcas/CAS.php
new file mode 100644
index 00000000000..8cd549ea35c
--- /dev/null
+++ b/vendor/jasig/phpcas/CAS.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *  PHP Version 5
+ *
+ * @file     CAS.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+require_once dirname(__FILE__).'/source/CAS.php';
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/LICENSE b/vendor/jasig/phpcas/LICENSE
new file mode 100644
index 00000000000..261eeb9e9f8
--- /dev/null
+++ b/vendor/jasig/phpcas/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/vendor/jasig/phpcas/NOTICE b/vendor/jasig/phpcas/NOTICE
new file mode 100644
index 00000000000..70d9ffcd4c5
--- /dev/null
+++ b/vendor/jasig/phpcas/NOTICE
@@ -0,0 +1,81 @@
+Copyright 2007-2011, JA-SIG, Inc.
+This project includes software developed by Jasig.
+http://www.jasig.org/
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at:
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+===========================================================================
+
+Copyright © 2003-2007, The ESUP-Portail consortium
+
+Requirements for sources originally licensed under the New BSD License:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+- Neither the name of JA-SIG, Inc. nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+===========================================================================
+
+Copyright (c) 2009, Regents of the University of Nebraska
+All rights reserved.
+
+Requirements for CAS_Autloader originally licensed under the New BSD License:
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list
+of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+Neither the name of the University of Nebraska nor the names of its contributors
+may be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/jasig/phpcas/README.md b/vendor/jasig/phpcas/README.md
new file mode 100644
index 00000000000..12a5c2c3f5a
--- /dev/null
+++ b/vendor/jasig/phpcas/README.md
@@ -0,0 +1,31 @@
+phpCAS
+=======
+
+phpCAS is an authentication library that allows PHP applications to easily authenticate
+users via a Central Authentication Service (CAS) server.
+
+Please see the phpCAS website for more information:
+
+https://wiki.jasig.org/display/CASC/phpCAS
+
+[![Build Status](https://travis-ci.org/Jasig/phpCAS.png)](https://travis-ci.org/Jasig/phpCAS)
+
+
+LICENSE
+-------
+
+Copyright 2007-2011, JA-SIG, Inc.
+This project includes software developed by Jasig.
+http://www.jasig.org/
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at:
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/vendor/jasig/phpcas/composer.json b/vendor/jasig/phpcas/composer.json
new file mode 100644
index 00000000000..4231168110a
--- /dev/null
+++ b/vendor/jasig/phpcas/composer.json
@@ -0,0 +1,24 @@
+{
+    "name": "jasig/phpcas",
+    "description": "Provides a simple API for authenticating users against a CAS server",
+    "keywords": ["cas", "jasig"],
+    "homepage": "https://wiki.jasig.org/display/CASC/phpCAS",
+    "type": "library",
+    "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"}
+    ],
+    "require": {
+        "php": ">=5.0.0"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "~3.7.10"
+    },
+    "autoload": {
+        "classmap": [
+            "source/"
+        ]
+    }
+
+}
diff --git a/vendor/jasig/phpcas/docs/Building b/vendor/jasig/phpcas/docs/Building
new file mode 100644
index 00000000000..1b4a5c329ef
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/Building
@@ -0,0 +1,34 @@
+########################################
+### Build process for phpCAS package ###
+########################################
+
+1. Prepare your own build config:
+
+go to the utils/ dir and copy build-example.properties to a
+build.properties file and adjust the path for all needed binaries. You need
+at least php and doxygen for package creation. Git is needed as a developer with
+commit priviledges and upload right for the distribution package.
+
+2. Install necessary php packages:
+
+Install the pear package PEAR_PackageFileManager2 via the command
+
+"pear install PEAR_PackageFileManager2"
+
+
+3. Run the "ant" tasks to build the phpCAS package and other developer tasks:
+
+ant dist      # create a local package
+ant clean     # clear local packages and temporary files
+ant prepare   # The default action, tags, packages, and commits to the local git repository
+ant push      # Push the new commits and tags to the origin repository (github)
+ant upload    # Upload to jasig
+ant makeCurrentSymlink # Set the symbolic link on the jasig site for the most current packages
+ant revert    # To revert any "ant prepare" actions before they are pushed to the github repo
+
+The ant prepare target is equivalent to ant tag && ant dist && ant markdev.
+
+To revert the commits and tag additions added in the ant tag and ant markdev
+targets, use the new ant revert target. This should not be done after pushing.
+Running ant prepare is safe and can be followed by ant revert to get rid of the
+added commits and tag in your local repository.
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/docs/Upgrading b/vendor/jasig/phpcas/docs/Upgrading
new file mode 100644
index 00000000000..27df91f4db0
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/Upgrading
@@ -0,0 +1,100 @@
+################################
+### Upgrading 1.3.1 -> 1.3.2 ###
+################################
+
+Due to the missing validation of the CN of the SSL certifcate it may be that
+phpcas fails validation of CAS server certicates that do not match the IP/DNS
+name you use in the phpcas client() or proxy() setup.
+If this happens a quick workaround to change the setup to the old but unsecure
+behaviour. This can be seen in the no_ssl_cn_validation example.
+This is not a recommended setting and is no a secure setup!
+
+################################
+### Upgrading 1.2.x -> 1.3.0 ###
+################################
+
+
+------------------------------------------------------------------
+1. Changing of the default debug.log permissions:
+------------------------------------------------------------------
+
+The default debug log is now created with 0600 permissions to be only readable
+by the webserver
+
+-------------------------------------------------------
+2. Changing of the behaviour of proxied applications:
+-------------------------------------------------------
+
+If your application is being proxied (Another casified application is using
+proxy tickets to access your service you need to change your configuration. The
+new default configuration is now to deny any proxied use of your service unless
+it is exlicitly allowed:
+
+If you want your service to be proxied you have to enable it (default disabled)
+and define an accepable list of proxies that are allowed to proxy your service.
+
+Add each allowed proxy definition object. For the normal CAS_ProxyChain
+class, the constructor takes an array of proxies to match. The list is in
+reverse just as seen from the service. Proxies have to be defined in reverse
+from the service to the user. If a user hits service A and gets proxied via
+B to service C the list of acceptable on C would be array(B,A). The definition
+of an individual proxy can be either a string or a regexp (preg_match is used)
+that will be matched against the proxy list supplied by the cas server
+when validating the proxy tickets. The strings are compared starting from
+the beginning and must fully match with the proxies in the list.
+
+Examples:
+      phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+              'https://app.example.com/'
+          )));
+or
+      phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+              '/^https:\/\/app[0-9]\.example\.com\/rest\//',
+              'http://client.example.com/'
+          )));
+
+For quick testing or in certain production screnarios you might want to
+allow allow any other valid service to proxy your service. To do so, add
+the "Any" chain:
+
+      phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+
+THIS SETTING IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY
+ IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER
+ ON THIS SERVICE.
+
+
+----------------------------------------------------------------
+3. Changing of the default PGT file storage location in proxy mode:
+----------------------------------------------------------------
+
+The default storage of the sensitive PGT session files is the
+session_save_path() now. This is a php environment dependent dir which is also
+used for storing your php session data. The default permissions are also changed
+to 0600 to be only readable by the webserver.
+
+
+
+
+------------------------------------------------------------------
+4. The setPGTStorageFile() function has changed it parameters.
+------------------------------------------------------------------
+
+The setPGTStorageFile() function no longer needs an storage "format" argument.
+Since the format functionality was never implemented it has now been dropped
+and only the path argument is necessary.
+
+------------------------------------------------------------------
+5. The startSession boolean in the constructor has been changed to
+changeSessionID
+------------------------------------------------------------------
+
+The last parameter of the constructor for has been changed from "start session"
+to "change session ID". This has no negative effects on existion integrations
+but will allow integration with other frameworks to take advantage of single
+sign-out if they switch to "true". phpCAS will then rename the session id
+(keeping all vars) and be able to single sign-out users.
+
+
+
+
diff --git a/vendor/jasig/phpcas/docs/examples/config.example.php b/vendor/jasig/phpcas/docs/examples/config.example.php
new file mode 100644
index 00000000000..2ada01ca127
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/config.example.php
@@ -0,0 +1,104 @@
+<?php
+
+/**
+ * The purpose of this central config file is configuring all examples
+ * in one place with minimal work for your working environment
+ * Just configure all the items in this config according to your environment
+ * and rename the file to config.php
+ *
+ * PHP Version 5
+ *
+ * @file     config.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+$phpcas_path = '../../source/';
+
+///////////////////////////////////////
+// Basic Config of the phpCAS client //
+///////////////////////////////////////
+
+// Full Hostname of your CAS Server
+$cas_host = 'cas.example.com';
+
+// Context of the CAS Server
+$cas_context = '/cas';
+
+// Port of your CAS server. Normally for a https server it's 443
+$cas_port = 443;
+
+// Path to the ca chain that issued the cas server certificate
+$cas_server_ca_cert_path = '/path/to/cachain.pem';
+
+//////////////////////////////////////////
+// Advanced Config for special purposes //
+//////////////////////////////////////////
+
+// The "real" hosts of clustered cas server that send SAML logout messages
+// Assumes the cas server is load balanced across multiple hosts
+$cas_real_hosts = array('cas-real-1.example.com', 'cas-real-2.example.com');
+
+// Client config for cookie hardening
+$client_domain = '127.0.0.1';
+$client_path = 'phpcas';
+$client_secure = true;
+$client_httpOnly = true;
+$client_lifetime = 0;
+
+// Database config for PGT Storage
+$db = 'pgsql:host=localhost;dbname=phpcas';
+//$db = 'mysql:host=localhost;dbname=phpcas';
+$db_user = 'phpcasuser';
+$db_password = 'mysupersecretpass';
+$db_table = 'phpcastabel';
+$driver_options = '';
+
+///////////////////////////////////////////
+// End Configuration -- Don't edit below //
+///////////////////////////////////////////
+
+// Generating the URLS for the local cas example services for proxy testing
+if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
+    $curbase = 'https://' . $_SERVER['SERVER_NAME'];
+} else {
+    $curbase = 'http://' . $_SERVER['SERVER_NAME'];
+}
+if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
+    $curbase .= ':' . $_SERVER['SERVER_PORT'];
+}
+
+$curdir = dirname($_SERVER['REQUEST_URI']) . "/";
+
+// CAS client nodes for rebroadcasting pgtIou/pgtId and logoutRequest
+$rebroadcast_node_1 = 'http://cas-client-1.example.com';
+$rebroadcast_node_2 = 'http://cas-client-2.example.com';
+
+// access to a single service
+$serviceUrl = $curbase . $curdir . 'example_service.php';
+// access to a second service
+$serviceUrl2 = $curbase . $curdir . 'example_service_that_proxies.php';
+
+$pgtBase = preg_quote(preg_replace('/^http:/', 'https:', $curbase . $curdir), '/');
+$pgtUrlRegexp = '/^' . $pgtBase . '.*$/';
+
+$cas_url = 'https://' . $cas_host;
+if ($cas_port != '443') {
+    $cas_url = $cas_url . ':' . $cas_port;
+}
+$cas_url = $cas_url . $cas_context;
+
+// Set the session-name to be unique to the current script so that the client script
+// doesn't share its session with a proxied script.
+// This is just useful when running the example code, but not normally.
+session_name(
+    'session_for:'
+    . preg_replace('/[^a-z0-9-]/i', '_', basename($_SERVER['SCRIPT_NAME']))
+);
+// Set an UTF-8 encoding header for internation characters (User attributes)
+header('Content-Type: text/html; charset=utf-8');
+?>
diff --git a/vendor/jasig/phpcas/docs/examples/create_pgt_storage_db_table.php b/vendor/jasig/phpcas/docs/examples/create_pgt_storage_db_table.php
new file mode 100644
index 00000000000..5c424c6bf66
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/create_pgt_storage_db_table.php
@@ -0,0 +1,53 @@
+<?php
+
+/**
+ *  Script that generates a default table for PGT/PGTiou storage. This script
+ *  assumes a database with proper permissions exists and we are habe
+ *  permissions to create a table.
+ *  All database settings have to be set in the config.php file. Or the
+ *  CAS_PGTStorage_Db() options:
+ *  $db, $db_user, $db_password, $db_table, $driver_options
+ *  have to filled out directly. Option examples can be found in the
+ *  config.example.php
+ *
+ * PHP Version 5
+ *
+ * @file     create_pgt_storage_table.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+
+// Dummy client because we need a 'client' object
+$client = new CAS_Client(
+    CAS_VERSION_2_0, true, $cas_host, $cas_port, $cas_context, false
+);
+
+// Set the torage object
+$cas_obj = new CAS_PGTStorage_Db(
+    $client, $db, $db_user, $db_password, $db_table, $driver_options
+);
+$cas_obj->init();
+$cas_obj->createTable();
+?>
+<html>
+  <head>
+    <title>phpCAS PGT db storage table creation</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+<body>
+<div class="success">
+<?php
+echo 'Table <b>' . $db_table . '</b> successfully created in database <b>' . $db . '</b>';
+?>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/docs/examples/example.css b/vendor/jasig/phpcas/docs/examples/example.css
new file mode 100755
index 00000000000..bf7f6c4853f
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example.css
@@ -0,0 +1,10 @@
+.error {
+	border: 1px solid #aa0000;
+	color: #aa0000;
+	padding: 5px;
+}
+.success {
+	border: 1px solid #00aa00;
+	color: #00aa00;
+	padding: 5px;
+}
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/docs/examples/example_advanced_saml11.php b/vendor/jasig/phpcas/docs/examples/example_advanced_saml11.php
new file mode 100644
index 00000000000..82a35234443
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_advanced_saml11.php
@@ -0,0 +1,80 @@
+<?php
+
+/**
+ * Advanced example for SAML with attributes and single logout
+ *
+ * PHP Version 5
+ *
+ * @file     example_advanced_saml11.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(SAML_VERSION_1_1, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+// phpCAS::setNoCasServerValidation();
+
+// Handle SAML logout requests that emanate from the CAS host exclusively.
+// Failure to restrict SAML logout requests to authorized hosts could
+// allow denial of service attacks where at the least the server is
+// tied up parsing bogus XML messages.
+phpCAS::handleLogoutRequests(true, $cas_real_hosts);
+
+// Force CAS authentication on any page that includes this file
+phpCAS::forceAuthentication();
+
+// Some small code triggered by the logout button
+if (isset($_REQUEST['logout'])) {
+    phpCAS::logout();
+}
+?>
+<html>
+  <head>
+    <title>Advanced SAML 1.1 example</title>
+  </head>
+  <body>
+<h2>Advanced SAML 1.1 example</h2>
+<?php require 'script_info.php' ?>
+
+Authentication succeeded for user
+<strong><?php echo phpCAS::getUser(); ?></strong>.
+
+<h3>User Attributes</h3>
+<ul>
+<?php
+foreach (phpCAS::getAttributes() as $key => $value) {
+    if (is_array($value)) {
+        echo '<li>', $key, ':<ol>';
+        foreach ($value as $item) {
+            echo '<li><strong>', $item, '</strong></li>';
+        }
+        echo '</ol></li>';
+    } else {
+        echo '<li>', $key, ': <strong>', $value, '</strong></li>' . PHP_EOL;
+    }
+}
+    ?>
+</ul>
+<p><a href="?logout=">Logout</a></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/docs/examples/example_custom_urls.php b/vendor/jasig/phpcas/docs/examples/example_custom_urls.php
new file mode 100644
index 00000000000..01809737252
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_custom_urls.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * Example for overriding validation urls
+ *
+ * PHP Version 5
+ *
+ * @file     example_custom_urls.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// Override the validation url for any (ST and PT) CAS 2.0 validation
+phpCAS::setServerProxyValidateURL('https://cas.example.org:1443/proxyValidate');
+// Override the validation url for any CAS 1.0 validation
+//phpCAS::setServerServiceValidateURL('https://cas.example.org:1443/serviceValidate');
+//Override the validation url for any SAML11 validation
+//phpCAS::setServerSamlValidateURL('https://cas.example.org:1443/samlValidate');
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// logout if desired
+if (isset($_REQUEST['logout'])) {
+    phpCAS::logout();
+}
+
+// for this test, simply print that the authentication was successfull
+?>
+<html>
+  <head>
+    <title>phpCAS simple client</title>
+  </head>
+  <body>
+    <h1>Successfull Authentication!</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
+    <p><a href="?logout=">Logout</a></p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_gateway.php b/vendor/jasig/phpcas/docs/examples/example_gateway.php
new file mode 100644
index 00000000000..25be1a2ec22
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_gateway.php
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ * Example that uses the CAS gateway feature
+ *
+ * PHP Version 5
+ *
+ * @file     example_gateway.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+if (isset($_REQUEST['logout'])) {
+    phpCAS::logout();
+}
+if (isset($_REQUEST['login'])) {
+    phpCAS::forceAuthentication();
+}
+
+// check CAS authentication
+$auth = phpCAS::checkAuthentication();
+
+?>
+<html>
+  <head>
+    <title>phpCAS simple client</title>
+  </head>
+  <body>
+<?php
+if ($auth) {
+    // for this test, simply print that the authentication was successfull
+        ?>
+    <h1>Successfull Authentication!</h1>
+    <?php include 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <p><a href="?logout=">Logout</a></p><?php
+} else {
+                                        ?>
+    <h1>Guest mode</h1>
+    <p><a href="?login=">Login</a></p><?php
+}
+                                      ?>
+    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_hardening.php b/vendor/jasig/phpcas/docs/examples/example_hardening.php
new file mode 100644
index 00000000000..4f407c496f3
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_hardening.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * Advanced example for hardening the phpcas client
+ *
+ * PHP Version 5
+ *
+ * @file     example_hardening.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Harden session cookie to prevent some attacks on the cookie (e.g. XSS)
+session_set_cookie_params($client_lifetime, $client_path, $client_domain, $client_secure, $client_httpOnly);
+
+// Initialize phpCAS
+phpCAS::client(SAML_VERSION_1_1, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+// phpCAS::setNoCasServerValidation();
+
+// Handle SAML logout requests that emanate from the CAS host exclusively.
+// Failure to restrict SAML logout requests to authorized hosts could
+// allow denial of service attacks where at the least the server is
+// tied up parsing bogus XML messages.
+phpCAS::handleLogoutRequests(true, $cas_real_hosts);
+
+// Force CAS authentication on any page that includes this file
+phpCAS::forceAuthentication();
+
+// Some small code triggered by the logout button
+if (isset($_REQUEST['logout'])) {
+    phpCAS::logout();
+}
+?>
+<html>
+  <head>
+    <title>Advanced SAML 1.1 example</title>
+  </head>
+  <body>
+<h2>Advanced SAML 1.1 example</h2>
+<?php require 'script_info.php' ?>
+
+Authentication succeeded for user
+<strong><?php echo phpCAS::getUser(); ?></strong>.
+
+<h3>User Attributes</h3>
+<ul>
+<?php
+foreach (phpCAS::getAttributes() as $key => $value) {
+    if (is_array($value)) {
+        echo '<li>', $key, ':<ol>';
+        foreach ($value as $item) {
+            echo '<li><strong>', $item, '</strong></li>';
+        }
+        echo '</ol></li>';
+    } else {
+        echo '<li>', $key, ': <strong>', $value, '</strong></li>' . PHP_EOL;
+    }
+}
+    ?>
+</ul>
+<p><a href="?logout=">Logout</a></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/docs/examples/example_html.php b/vendor/jasig/phpcas/docs/examples/example_html.php
new file mode 100644
index 00000000000..204a83f17f8
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_html.php
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * Example that changes html of phpcas messages
+ *
+ * PHP Version 5
+ *
+ * @file     example_html.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// customize HTML output
+phpCAS::setHTMLHeader(
+    '<html>
+  <head>
+    <title>__TITLE__</title>
+  </head>
+  <body>
+  <h1>__TITLE__</h1>'
+);
+phpCAS::setHTMLFooter(
+    '<hr>
+    <address>
+      phpCAS __PHPCAS_VERSION__,
+      CAS __CAS_VERSION__ (__SERVER_BASE_URL__)
+    </address>
+  </body>
+</html>'
+);
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// for this test, simply print that the authentication was successfull
+?>
+<html>
+  <head>
+    <title>phpCAS simple client with HTML output customization</title>
+  </head>
+  <body>
+    <h1>Successfull Authentication!</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_lang.php b/vendor/jasig/phpcas/docs/examples/example_lang.php
new file mode 100644
index 00000000000..1e1225790f1
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_lang.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ *  Example that changes language of phpcas pages
+ *
+ * PHP Version 5
+ *
+ * @file     example_lang.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// set the language to french
+phpCAS::setLang(PHPCAS_LANG_FRENCH);
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+// for this test, simply print that the authentication was successfull
+?>
+<html>
+  <head>
+    <title>Exemple d'internationalisation de phpCAS</title>
+  </head>
+  <body>
+    <h1>Authentification r&eacute;ussie&nbsp;!</h1>
+    <?php require 'script_info.php' ?>
+    <p>L'utilisateur connect&eacute; est <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <p>La version de phpCAS est <b><?php echo phpCAS::getVersion(); ?></b>.</p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_logout.php b/vendor/jasig/phpcas/docs/examples/example_logout.php
new file mode 100644
index 00000000000..4eb156272db
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_logout.php
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ *  Example for handling logout requests
+ *
+ * PHP Version 5
+ *
+ * @file     example_logout.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// handle incoming logout requests
+phpCAS::handleLogoutRequests();
+
+// Or as an advanced featue handle SAML logout requests that emanate from the
+// CAS host exclusively.
+// Failure to restrict SAML logout requests to authorized hosts could
+// allow denial of service attacks where at the least the server is
+// tied up parsing bogus XML messages.
+// phpCAS::handleLogoutRequests(true, $cas_real_hosts);
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// for this test, simply print that the authentication was successfull
+?>
+<html>
+  <head>
+    <title>phpCAS simple client</title>
+  </head>
+  <body>
+    <h1>Successfull Authentication!</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_no_ssl_cn_validation.php b/vendor/jasig/phpcas/docs/examples/example_no_ssl_cn_validation.php
new file mode 100644
index 00000000000..b16e1e4c096
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_no_ssl_cn_validation.php
@@ -0,0 +1,66 @@
+<?php
+
+/**
+ *   Example for diabling SSL CN valdiation
+ *
+ * PHP Version 5
+ *
+ * @file     example_simple.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+// phpCAS::setNoCasServerValidation();
+// You can also disable the validation of the certficate CN. This means the
+// certificate must be valid but the CN of the certificate must not match the
+// IP or hostname you are using to access the server
+phpCAS::setCasServerCACert($cas_server_ca_cert_path, false);
+
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// logout if desired
+if (isset($_REQUEST['logout'])) {
+	phpCAS::logout();
+}
+
+// for this test, simply print that the authentication was successfull
+?>
+<html>
+  <head>
+    <title>phpCAS simple client</title>
+  </head>
+  <body>
+    <h1>Successfull Authentication!</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
+    <p><a href="?logout=">Logout</a></p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_pgt_storage_db.php b/vendor/jasig/phpcas/docs/examples/example_pgt_storage_db.php
new file mode 100644
index 00000000000..f759a0e9dfd
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_pgt_storage_db.php
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ *  Example that changes the storage of the pgt tickets
+ *
+ * PHP Version 5
+ *
+ * @file     example_pgt_storage_db.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// set PGT storage to file in plain format in the same directory as session files
+phpCAS::setPGTStorageDB($db, $db_user, $db_password, $db_table);
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxy example with PGT storage to a database</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>phpCAS proxy example with PGT storage to file</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <h2>Response from service <?php echo $serviceUrl; ?></h2>
+<?php
+flush();
+// call a service and change the color depending on the result
+if (phpCAS::serviceWeb($serviceUrl, $err_code, $output)) {
+    echo '<div class="success">';
+} else {
+    echo '<div class="error">';
+}
+echo $output;
+echo '</div>';
+                                                             ?>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_pgt_storage_file.php b/vendor/jasig/phpcas/docs/examples/example_pgt_storage_file.php
new file mode 100644
index 00000000000..908892e8c3b
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_pgt_storage_file.php
@@ -0,0 +1,72 @@
+<?php
+
+/**
+*  Example that changes the storage of the pgt tickets to file
+*
+* PHP Version 5
+*
+* @file     example_pgt_storage_db.php
+* @category Authentication
+* @package  PhpCAS
+* @author   Joachim Fritschi <jfritschi@freenet.de>
+* @author   Adam Franco <afranco@middlebury.edu>
+* @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+* @link     https://wiki.jasig.org/display/CASC/phpCAS
+*/
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// set PGT storage to file in plain format in the same directory as session files
+phpCAS::setPGTStorageFile(session_save_path());
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxy example with PGT storage to file</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>phpCAS proxy example with PGT storage to file</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <h2>Response from service <?php echo $serviceUrl; ?></h2>
+<?php
+  flush();
+  // call a service and change the color depending on the result
+if ( phpCAS::serviceWeb($serviceUrl, $err_code, $output) ) {
+    echo '<div class="success">';
+} else {
+    echo '<div class="error">';
+}
+  echo $output;
+  echo '</div>';
+?>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_proxy_GET.php b/vendor/jasig/phpcas/docs/examples/example_proxy_GET.php
new file mode 100755
index 00000000000..ba46e34719f
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_proxy_GET.php
@@ -0,0 +1,96 @@
+<?php
+
+/**
+ *  Example for a proxy that makes a GET request.
+ *
+ * PHP Version 5
+ *
+ * @file     example_proxy_GET.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxy example #2</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>phpCAS proxied proxy example</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <h2>Response from service <?php echo $serviceUrl; ?></h2>
+<?php
+flush();
+
+// call a service and change the color depending on the result
+try {
+    $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
+    $service->setUrl($serviceUrl);
+    $service->send();
+    if ($service->getResponseStatusCode() == 200) {
+        echo '<div class="success">';
+        echo $service->getResponseBody();
+        echo '</div>';
+    } else {
+        // The service responded with an error code 404, 500, etc.
+        echo '<div class="error">';
+        echo 'The service responded with a '
+        . $service->getResponseStatusCode() . ' error.';
+        echo '</div>';
+    }
+} catch (CAS_ProxyTicketException $e) {
+    if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE) {
+        echo '<div class="error">';
+        echo "Your login has timed out. You need to log in again.";
+        echo '</div>';
+    } else {
+        // Other proxy ticket errors are from bad request format (shouldn't happen)
+        // or CAS server failure (unlikely) so lets just stop if we hit those.
+        throw $e;
+    }
+} catch (CAS_ProxiedService_Exception $e) {
+    // Something prevented the service request from being sent or received.
+    // We didn't even get a valid error response (404, 500, etc), so this
+    // might be caused by a network error or a DNS resolution failure.
+    // We could handle it in some way, but for now we will just stop.
+    throw $e;
+}
+
+                                                             ?>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_proxy_POST.php b/vendor/jasig/phpcas/docs/examples/example_proxy_POST.php
new file mode 100755
index 00000000000..6e032267639
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_proxy_POST.php
@@ -0,0 +1,101 @@
+<?php
+
+/**
+ *  Example for a proxy that makes a POST request.
+ *
+ * PHP Version 5
+ *
+ * @file     example_proxy_POST.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+$serviceUrl = $curbase . $curdir . 'example_service_POST.php';
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxy POST example</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>phpCAS proxy POST example</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <h2>Response from service <?php echo $serviceUrl; ?></h2>
+<?php
+flush();
+
+// call a service and change the color depending on the result
+try {
+    $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_POST);
+    $service->setUrl($serviceUrl);
+    $service->setContentType('application/x-www-form-urlencoded');
+    $service->setBody('favorite_color=blue');
+    $service->send();
+    if ($service->getResponseStatusCode() == 200) {
+        echo '<div class="success">';
+        echo $service->getResponseBody();
+        echo '</div>';
+    } else {
+        // The service responded with an error code 404, 500, etc.
+        echo '<div class="error">';
+        echo 'The service responded with a '
+        . $service->getResponseStatusCode() . ' error.';
+        echo $service->getResponseBody();
+        echo '</div>';
+    }
+} catch (CAS_ProxyTicketException $e) {
+    if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE) {
+        echo '<div class="error">';
+        echo "Your login has timed out. You need to log in again.";
+        echo '</div>';
+    } else {
+        // Other proxy ticket errors are from bad request format (shouldn't happen)
+        // or CAS server failure (unlikely) so lets just stop if we hit those.
+        throw $e;
+    }
+} catch (CAS_ProxiedService_Exception $e) {
+    // Something prevented the service request from being sent or received.
+    // We didn't even get a valid error response (404, 500, etc), so this
+    // might be caused by a network error or a DNS resolution failure.
+    // We could handle it in some way, but for now we will just stop.
+    throw $e;
+}
+
+                                                             ?>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_proxy_rebroadcast.php b/vendor/jasig/phpcas/docs/examples/example_proxy_rebroadcast.php
new file mode 100644
index 00000000000..453e860ca6c
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_proxy_rebroadcast.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ *  Example for a proxy that rebroadcasts all PGTs to different servers in the
+ *  cluster
+ *
+ * PHP Version 5
+ *
+ * @file     example_proxy_rebroadcast.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// Set the nodes for rebroadcasting pgtIou/pgtId and logoutRequest
+phpCAS::addRebroadcastNode($rebroadcast_node_1);
+phpCAS::addRebroadcastNode($rebroadcast_node_2);
+
+// handle incoming logout requests
+phpCAS::handleLogoutRequests();
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxy rebroadcast example</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>phpCAS proxy rebroadcast example</h1>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb.php b/vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb.php
new file mode 100644
index 00000000000..69d1e7e3666
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb.php
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ * Example for a proxy with session usage
+ *
+ * PHP Version 5
+ *
+ * @file     example_proxy_GET.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxied proxy example (with sessioning)</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>phpCAS proxied proxy example (with sessioning)</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <h2>Response from service <?php echo $serviceUrl; ?></h2>
+<?php
+flush();
+// call a service and change the color depending on the result
+if (phpCAS::serviceWeb($serviceUrl, $err_code, $output)) {
+    echo '<div class="success">';
+} else {
+    echo '<div class="error">';
+}
+echo $output;
+echo '</div>';
+                                                             ?>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb_chaining.php b/vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb_chaining.php
new file mode 100644
index 00000000000..b4b8de8d10d
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_proxy_serviceWeb_chaining.php
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ *  Example for a proxy with session usage
+ *
+ * PHP Version 5
+ *
+ * @file     example_proxy_serviceWeb_chaining.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxy example #2</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>phpCAS proxied proxy example</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <h2>Response from service <?php echo $serviceUrl2; ?></h2>
+<?php
+flush();
+// call a service and change the color depending on the result
+if (phpCAS::serviceWeb($serviceUrl2, $err_code, $output)) {
+    echo '<div class="success">';
+} else {
+    echo '<div class="error">';
+}
+echo $output;
+echo '</div>';
+                                                              ?>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/example_service.php b/vendor/jasig/phpcas/docs/examples/example_service.php
new file mode 100644
index 00000000000..9af528db729
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_service.php
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * Example for proxied service with session support
+ *
+ * PHP Version 5
+ *
+ * @file     example_service.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// If you want your service to be proxied you have to enable it (default
+// disabled) and define an accepable list of proxies that are allowed to
+// proxy your service.
+//
+// Add each allowed proxy definition object. For the normal CAS_ProxyChain
+// class, the constructor takes an array of proxies to match. The list is in
+// reverse just as seen from the service. Proxies have to be defined in reverse
+// from the service to the user. If a user hits service A and gets proxied via
+// B to service C the list of acceptable on C would be array(B,A). The definition
+// of an individual proxy can be either a string or a regexp (preg_match is used)
+// that will be matched against the proxy list supplied by the cas server
+// when validating the proxy tickets. The strings are compared starting from
+// the beginning and must fully match with the proxies in the list.
+// Example:
+// 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+// 				'https://app.example.com/'
+// 			)));
+// 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+// 				'/^https:\/\/app[0-9]\.example\.com\/rest\//',
+// 				'http://client.example.com/'
+// 			)));
+phpCAS::allowProxyChain(new CAS_ProxyChain(array($pgtUrlRegexp)));
+phpCAS::allowProxyChain(
+    new CAS_ProxyChain(
+        array('/^' . $pgtBase . 'example_service_that_proxies.php$/',
+            '/^' . $pgtBase . 'example_proxy_serviceWeb_chaining.php$/'
+        )
+    )
+);
+
+// For quick testing or in certain production screnarios you might want to
+// allow allow any other valid service to proxy your service. To do so, add
+// the "Any" chain:
+// 		phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+// THIS SETTING IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY
+// IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER
+// ON THIS SERVICE.
+//phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+print '<h1>I am a service that can be proxied.</h1>';
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+require 'script_info.php';
+
+// for this test, simply print that the authentication was successfull
+echo '<p>The user\'s login is <b>' . phpCAS::getUser() . '</b>.</p>';
+
+// increment the number of requests of the session and print it
+if (!isset($_SESSION['n'])) {
+    $_SESSION['n'] = 0;
+}
+echo '<p>request #' . (++$_SESSION['n']) . '</p>';
+
+?>
diff --git a/vendor/jasig/phpcas/docs/examples/example_service_POST.php b/vendor/jasig/phpcas/docs/examples/example_service_POST.php
new file mode 100755
index 00000000000..31f3d5fae6c
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_service_POST.php
@@ -0,0 +1,103 @@
+<?php
+
+/**
+ *   Example for proxied service with session support and POST support
+ *
+ * PHP Version 5
+ *
+ * @file     example_service_POST.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// If you want your service to be proxied you have to enable it (default
+// disabled) and define an accepable list of proxies that are allowed to
+// proxy your service.
+//
+// Add each allowed proxy definition object. For the normal CAS_ProxyChain
+// class, the constructor takes an array of proxies to match. The list is in
+// reverse just as seen from the service. Proxies have to be defined in reverse
+// from the service to the user. If a user hits service A and gets proxied via
+// B to service C the list of acceptable on C would be array(B,A). The definition
+// of an individual proxy can be either a string or a regexp (preg_match is used)
+// that will be matched against the proxy list supplied by the cas server
+// when validating the proxy tickets. The strings are compared starting from
+// the beginning and must fully match with the proxies in the list.
+// Example:
+// 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+// 				'https://app.example.com/'
+// 			)));
+// 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+// 				'/^https:\/\/app[0-9]\.example\.com\/rest\//',
+// 				'http://client.example.com/'
+// 			)));
+phpCAS::allowProxyChain(new CAS_ProxyChain(array($pgtUrlRegexp)));
+
+// For quick testing or in certain production screnarios you might want to
+// allow allow any other valid service to proxy your service. To do so, add
+// the "Any" chain:
+// 		phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+// THIS SETTING IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY
+// IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER
+// ON THIS SERVICE.
+//phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+    header('HTTP/1.1 400 Bad Request');
+    print
+        "<h1>I only respond to POST requests. This is a "
+        . $_SERVER['REQUEST_METHOD'] . " request.</h1>";
+    exit;
+}
+if (empty($_POST['favorite_color'])) {
+    header('HTTP/1.1 400 Bad Request');
+    print '<h1>You must post a <strong>favorite_color</strong>.</h1>';
+    exit;
+}
+
+print '<h1>I am a service that responds to POST requests.</h1>';
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+require 'script_info.php';
+
+// for this test, simply print that the authentication was successfull
+echo '<p>The user\'s login is <b>' . phpCAS::getUser() . '</b>.</p>';
+
+print
+    '<h1>Your favorite color is ' . htmlentities($_POST['favorite_color'])
+    . '</h1>';
+
+// increment the number of requests of the session and print it
+if (!isset($_SESSION['n'])) {
+    $_SESSION['n'] = 0;
+}
+echo '<p>request #' . (++$_SESSION['n']) . '</p>';
+
diff --git a/vendor/jasig/phpcas/docs/examples/example_service_that_proxies.php b/vendor/jasig/phpcas/docs/examples/example_service_that_proxies.php
new file mode 100644
index 00000000000..dc83b7b7f91
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_service_that_proxies.php
@@ -0,0 +1,104 @@
+<?php
+
+/**
+ *  Example for a proxied proxy
+ *
+ * PHP Version 5
+ *
+ * @file     example_service_that_proxies.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// If you want your service to be proxied you have to enable it (default
+// disabled) and define an accepable list of proxies that are allowed to
+// proxy your service.
+//
+// Add each allowed proxy definition object. For the normal CAS_ProxyChain
+// class, the constructor takes an array of proxies to match. The list is in
+// reverse just as seen from the service. Proxies have to be defined in reverse
+// from the service to the user. If a user hits service A and gets proxied via
+// B to service C the list of acceptable on C would be array(B,A). The definition
+// of an individual proxy can be either a string or a regexp (preg_match is used)
+// that will be matched against the proxy list supplied by the cas server
+// when validating the proxy tickets. The strings are compared starting from
+// the beginning and must fully match with the proxies in the list.
+// Example:
+// 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+// 				'https://app.example.com/'
+// 			)));
+// 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+// 				'/^https:\/\/app[0-9]\.example\.com\/rest\//',
+// 				'http://client.example.com/'
+// 			)));
+phpCAS::allowProxyChain(new CAS_ProxyChain(array($pgtUrlRegexp)));
+
+// For quick testing or in certain production screnarios you might want to
+// allow allow any other valid service to proxy your service. To do so, add
+// the "Any" chain:
+// 		phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+// THIS SETTING IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY
+// IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER
+// ON THIS SERVICE.
+//phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// moreover, a PGT was retrieved from the CAS server that will
+// permit to gain accesses to new services.
+
+
+
+?>
+<html>
+  <head>
+    <title>phpCAS proxied proxy service example</title>
+    <link rel="stylesheet" type='text/css' href='example.css'/>
+  </head>
+  <body>
+    <h1>I am a service that can be proxied. In turn, I proxy another service.</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <h2>Response from service <?php echo $serviceUrl; ?></h2>
+<?php
+  flush();
+  // call a service and change the color depending on the result
+if ( phpCAS::serviceWeb($serviceUrl, $err_code, $output) ) {
+    echo '<div class="success">';
+} else {
+    echo '<div class="error">';
+}
+  echo $output;
+  echo '</div>';
+?>
+  </body>
+</html>
+
diff --git a/vendor/jasig/phpcas/docs/examples/example_simple.php b/vendor/jasig/phpcas/docs/examples/example_simple.php
new file mode 100644
index 00000000000..c0a11c55386
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/example_simple.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ *   Example for a simple cas 2.0 client
+ *
+ * PHP Version 5
+ *
+ * @file     example_simple.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+// Load the settings from the central config file
+require_once 'config.php';
+// Load the CAS lib
+require_once $phpcas_path . '/CAS.php';
+
+// Uncomment to enable debugging
+phpCAS::setDebug();
+
+// Initialize phpCAS
+phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
+
+// For production use set the CA certificate that is the issuer of the cert
+// on the CAS server and uncomment the line below
+// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
+
+// For quick testing you can disable SSL validation of the CAS server.
+// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
+// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
+phpCAS::setNoCasServerValidation();
+
+// force CAS authentication
+phpCAS::forceAuthentication();
+
+// at this step, the user has been authenticated by the CAS server
+// and the user's login name can be read with phpCAS::getUser().
+
+// logout if desired
+if (isset($_REQUEST['logout'])) {
+	phpCAS::logout();
+}
+
+// for this test, simply print that the authentication was successfull
+?>
+<html>
+  <head>
+    <title>phpCAS simple client</title>
+  </head>
+  <body>
+    <h1>Successfull Authentication!</h1>
+    <?php require 'script_info.php' ?>
+    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
+    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
+    <p><a href="?logout=">Logout</a></p>
+  </body>
+</html>
diff --git a/vendor/jasig/phpcas/docs/examples/script_info.php b/vendor/jasig/phpcas/docs/examples/script_info.php
new file mode 100644
index 00000000000..0a6c954aaf1
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/examples/script_info.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ *  Small script to add some info about the example script that is running.
+ *  Adds some info that makes it easier to distinguish different proxy sessions
+ *
+ * PHP Version 5
+ *
+ * @file     script_info.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */ ?>
+    <dl style='border: 1px dotted; padding: 5px;'>
+      <dt>Current script</dt><dd><?php print basename($_SERVER['SCRIPT_NAME']); ?></dd>
+      <dt>session_name():</dt><dd> <?php print session_name(); ?></dd>
+      <dt>session_id():</dt><dd> <?php print session_id(); ?></dd>
+    </dl>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/docs/images/esup-portail.png b/vendor/jasig/phpcas/docs/images/esup-portail.png
new file mode 100644
index 0000000000000000000000000000000000000000..ed6e6661b6612ac6571e0d0eafe7991e3da75eb3
GIT binary patch
literal 2621
zcmds2dpK148vZe+q>xLAw!2-aq%7N|2peS@rV=}fLR#pdX}d&8Lc8`<Tbpivu3cTa
zsbsWAQCl*bg>nfg4N=*QI)_lE*7?@_bIzaVzw<ojd!DuC`R4b1@Atm%x7Lhc18=RW
zik=EWNR{K^<_(`hxZIRkaGxLRWQGt6ZSeGQr<tH=8q+jM(*#W;CZi~t!ZbzF6hTvn
zIm8r=F^x$Y6EsFlElJTNrb&_}37SMqD?!l&rU{ZJ2%12EL?enum_{Ux2pT~G*Z>V!
z&<xdxnZpF8D3YQGibBj-$S|fbNnwJ*h+zSTB&JA`A_<B_3@NB3Fh!6QK~Mw&j?hXW
zOd*m&1chKKum&(74J?5coWWqg257*7X2b|$atIP*0%OGJgRzj2Bqj+=B1SH-fJ1`B
z1c3<z>VXv0Vnkv@U<C5O51<L%U<c?25}*)R0~nA7mQV^jU@%|<G+-gdIp!F02!bRL
zV<hN<v5*l2Ng(hQ<N^ygBoRR(@DZE_1ArHlgVCTCtOP%RCUk=xzzGC{LSPMGKpHxM
z7Vv<<fDO=ySrJnW$B;uH*cccI`d}<%1UxA6r-6|xUodQx*{6I-3@N$q%zEWkG92aZ
zFx!?3W+=-wFw2+IVid?H0W@I2mcTsFBp(Ie{0~B;6!{b(1r+Pe+a!M%{ts`k$NwtM
z1?M%w3TEu_@Q*=At%kW2>iET>2(ddjZZ19vxl;cXd*9g2I+NpZ#>d~c-lxrG$L0`s
z+g4FX`NCkme=cjNUl@FaP+jf3E?s}sUn8NX_N{+vH`m-xCR18%?B#ny_+r<!f8UbY
z+FCc8CUoZ}HywR5{%oz4lepG-I#2uM(mX%Iex2tB)$;dtJf9pn5y4L^vAc3W$(mKb
zGgoLoG^$*o@M@28$-N@G{={LCqhV#?x8`Eow?X4}x{bl{-BBJZ3OD^(7oypALMvH&
zBR5Q|%quLy<mf`t!;#5E?`ZX}t>WOZ$<>m$#Mb7}vmeT$7U~rYvKK457ilDgzc?LH
z>To-~%=p-p(xiEvz^2e}@cf6gh@O=F{N0s5-0&21R<XKMDkXUn%_=cQ2JI4sJiqav
z9M=@lOnOi|cQl+U^YKld9rE``#=ZU1Uw_r_to>EG%0=_+vq$E)J(pYD(d^f{jgCt$
zboojOc*`?PYn7)b)<%99xW3{YxAG4Ip6Cg;vos-def)eIWA4Fx*UZ_a`3CQuMNiCh
zXY77JS^dK;E7_@LnP0iRIH)my|8FBI_jeCp-QTu`Ke08SWrwY>Yh!j!-#wl0?OzI_
zjB-+cF;_bld+g?-#~E7`8@)f8)dj^gFCWN1*5RO4w&JAcfgAQN8iXjn=!jsR%*AQo
zk;hkyY(2;0J4P3D{}esbW{*mAfSvEMw|8U2E=!_ue#(p1KRs)xy=ty19<#Qvwr%3?
zTJxg6WMiLATx-h(^}<V*lHu5yb=B`h%f8coRi)p3KI0TOBugpn{Q`+@WV-ILe6dy1
z<p4)_LzClP#Z8?(K5>Me!2#Exik#2cJ>s^x<3es^hx+HK69clOwH%{Jtz<Jxiwd_(
zy4S;F@VT9zxqVt?k*v(72L6|9oozafB{7msPbWr;H=FxgtPGUAZja)v6lR{Ysb6~f
zaZ;0*x-q?LlFf<FjgQYuYabJxxPN%(!fUS!N<Yt3xW0Ax)(*~FsY`08!^`xj+Wn|2
z!Efb^gv0f!;+lt!ou(Pd3RCJ)Hr5uUZw<$+O@0&(OS@w<!r8*rYgaDwwDG%CU^Nuz
z`ygnFj8r!g-XdLRc?O^5_c-s<2w0rx6kF$CCn9pH=JmQ)I%ZXEvARJmX}+L!#%xLS
z-Ny7cc}6L*o@`;mDu)I(dxjz&x@Jt4PorDo28t~2?n>+_{Oy2t0ek$r?#9gG%G}hM
z-4&Z!T#ZxfE;w724?AOVU!+EjV6o3lpV_AOKX0!YvHUfn*xGz*Ti%?H>|uLh{F5>6
zc7fD3Zq=SIk4(}spL2X<0&$_yJ3Zgf8soJ`uT{Qp(2L3OJ$ZM}`W()h(bTAtX>%JR
znnR|%UcGG(>r&JFqx1VB%^BYM7j4s2!vmbY1l$R1-!LS+IkdND!S-8T^D8bis5Y2N
zxp8H-q(E8`n<(kSaalXgJ6LH)jdDUAcXm1Z4wdp_bi0l0xh8>lVwgQn9=L30rOmn1
zd+O|1U=>Fol}0Hzq<Ssh^6GUnRT!<HQYAiItCbzUZ*IN4&bEDXFIf%lnkeQ7%10_w
z%ZJ9p=19rvE7$TSKlOJ=4)a^cy1ms8{1vB0@0^kLwhUZ-Gk@N>!rqmCRaO3MtnV~v
zEYp&TGbi3@+;rGAIJV_#5<hLEw_vJf(PrMEf{Ts^e>kg-GwWDBbkDbqms^`m63v2(
z!ul*9^V+MuS^9rRy;eCrwdgX-Va^eyZ%NfM)ius1g`Gc7N*=OYEw32mcPL7w;|~aW
zwkJDR?E~NSW3#o2Dj}PSZ>zs(oe^evsHj;`V3Ve`IQ+5t%RtBA+LKOMp3`*8o~g3Z
zz9w0=wFgNFl@d<Rd~REj?6jfjdbj-LsJ8d_WZ8I*hz?HZkIyWLX;0t&v48p}T$`SG
zM*9daU_jB%^0Aq_#rkRIcx|MP|7F=a)T-EIX!MCLZ7^78-LiC%$)lx7;TUiIMk^1Q
qU7EJa=y!vvouBUg=kISpL^X1By5g;<Q0>e7^>W;KZa04nO8pnJqDyuF

literal 0
HcmV?d00001

diff --git a/vendor/jasig/phpcas/docs/images/jasig.png b/vendor/jasig/phpcas/docs/images/jasig.png
new file mode 100644
index 0000000000000000000000000000000000000000..38952bd2f72dba1b6cd6d9fe0ee5ac9dd191ce87
GIT binary patch
literal 2384
zcmZ9Odpr~R8^=eHODMVL(&-Q_x5#a7$03oL<Cd_d5^@YPCTx}@GILq1D3`K>32jnX
zjBt>#?VyD=#9R`VOEx7Oo%8#>ey`W>kLP(_-}m?XJm0^b*XNV*8~BWjl$sO(0FZHY
zaq`@)RlDIUA-bEFjaCot7D>2^Ukm^s+xa6zdZI|zcA2QFlY@7B(GtWUiszzYc*^p4
z4baSu;;`*7nX)CV><0u<`aQF7gSjqlxU;@bfd(J(dwuX=F`a6cE9^8UY0;x%Ty2gm
zZQtxdQcn<SFz!ZPyk?faMcv#&p)jV~RwRcf7R13uxnun7Z7{YrLdKoB@lILR*2&Jk
zq?k!+l;J<9mAcGDjZ9MQL*oC7{{PjPY%TlkJ;|RZZZ1C`wW;nHxu6KRNZ#q{in-ap
zjF^DL^B+mGevA}SI{$-U<}AgDM1GDc^v4}7U87_(D6LV*=xT-U!0qJ%RDrG|bY}~9
z*&Gu<lVuw(=S^rHh0qn99eLGSa9s>Qd{k-4Y+kaP4={dwNoTC&yt4Del-}neXqCx1
zUBx{jmov!=S3r~Qlar({51s7QdrylfMuKtr*3$ahnbEIk*Ev0pU@D}IWDTRe@Ad%C
zfgH+ln>d6V;6O&=pI-T>Zso$3v@4)?i&C)%S5Dxo88G40cm8Q&Ootsj(1;us1v!wJ
z>drMTZhHHhllsh4)6jMuMWH|6Cv!hw{D$3Rr4-i`8LB>KPP=*u-n&4Z2%xgK(<QaO
zoXBP^@!MsQi$zc*C&{Ygz2f8R$()7bga)U-0()O&p#Y4e5FWJA`kZcJ@sl)WN}sXH
z2PO$o1DYUg+T6^4essfpmN@{2ix%8}n@SIq2St}EATb(303eebK8Vc<Bd#;&*_%w=
z#wUdR8?UM9dUWaMzs6%<z%7sO%pf$x_xM$kjIpbkYt1h#vUxU3Stsb|)>FXPNob+L
zwZMCp%=CF}mR27&)9CxwrrgL{jI|LDYFFONZ`iEpfCbA5V*sSN5)lB-Igljgy868i
zr0z)>SNdtV{pp%2M@jkFtdH=apwtRSl211fMi;rs6fS3`Z&D?CH`3dW{Lv28QGo}M
zsXgZG;4)QOmV=BCmwgGR!_ta)iLWeb_8uSZoYYKr1VF69i3QP5LScQy#}@ad*5brb
zT~=&n1N=ztUxzL79l1f%^1oBHDh}0zy;{PoLuiTu^F}Wtp@{<Xx>L{Au|;*A;0sC)
z^*U7Lx|j9U7yT>oYCwTgYMdvsoVMZ?fOcCn5*~d)v};(c{{lNpuI2Epfi7y6dQ@d^
zPru_sy&pyP@n>XGHhpUv#^5A`{i}qsR$F&Cg7{jKKX;a&@b-ohgnrJ0A)hONUO0ii
z^KG9rd<s*a;0!H+`^CXN-myG_azEhpvzpSqWOR2l=@_lSM5>UVflx?s7&)6Ze~tD&
z<?eR)`PKwSGvQ$P0JrUw9L-erG`}~MSs@J@V5Rg$HnZkEnrJ11Dz?%Ay`5Vv7gC0+
zBV1+Kt(AjTG%OKa0M-r-*<y2971E3TX|*-}>Jtajb%l=@_5G>WMX}rXKXUgn!lGJ6
zZ8$|}aTi&qk9Vz!HOYmGZu!0=5yFU!y%!j^V2|ZQs0BVMEomA<d+#|_m!*xr`2Mi6
zSN#IJ0f$=Gmuw1C37hE2J0Hv0nnBR=xIx3I;dozG`3cMe?jy<Ej@STd<02w$Mq~v+
z#Wa;3J{>T`()z%&_FTPqXVw`IHc@}ZN{5|5jk%tviR3P@{Z5A0&reN#&wd~*c1PX{
zml6CnHw^21Q&Wpt1V6S)=>N&?mi?X$)8q}O{Lu+qgilINLva2dO%l8NK>Fap?@01w
z&`!FYq2%-=hYn~o&E2llRWo^&)G<wd4kLX-uYVubdWdY5SalieU7OkcN|5;b*jd$z
zLsu@`HE`L#Gs+kq;&N)_Ra+mH-yUxpo=u2d^Hw02mEMfTq)+STg|~rVKdTkY`?P;p
z+t;3m7G24>C^fMyLW>2Oe8TONupXohnm4Q#1-0P9v!^5hV$<p^?b}Ia7@#oGUzLO9
z$$M92I|u$XhAU;5#KAOJf;UP7?&6eh6^gB|Ha5U3pCo=By&S)3mS8KMCfP|e|3zpZ
zcX2MSia^hk$c>i0S^(Btah>}@msqGJ1hgGcF17zf(?QcgJtNa5h22P(>Njq`D|v$l
zMHyd(IJaQ49vqa>c*YFf@Kh(@y<QuDnD8fiTM@N+mWDnXiI?~HEP!yc1Y%+EuOmpo
zGmtMi^2(R|WhQrsuQL|crq8QTceG3GB%nt36k~c;PGxha8$hzvU-S=8maWW5Q405q
z54iT{w8;!fmbqJ8Lr<HC@?Jmo_I<{!E_O6CjP*~A?aW0f^Mzk`mMEjKw?fm&*I)ir
zeFSXxWQdO3<T^E<nSPCw7r!mP@;-r80jHP-7!Hq6Yo<y>T<p^lH|eZkQbBJr?cLYD
znO8Oa6`2E!Ls+~?d2dynMR&~|OeIBgi5b@CIjd{OWu?#mS$@~_JK=<<rq)Y3?TDHA
z{g4xq0fiuK5>_H+{0(b|${m`4v9c86AkU3e9v6FkVCLVQ?{hpJ1QD;&qmg}cmTZ*3
z8lU_O6~+SI?(AJx=OXP2ZZ!|QNE(M43GHuak?+TYE}sl3R8&52kYYzHvC>b_U{<k<
z1>LK9>Gvs9_}`JCV;uyIiq9~T#Q9(eAT_kf<2la%os)?G3q8#9;Z-66xf%ySd56g6
z++2kadf(U#JadHT=&F*`;wA2V*4<bfRsaT7`XUJ4Z)n@8Lvhg<-;pX30TnF~U7ujs
zA{OFf^NmAm5E9CWW;R;dH{B0@ZA_6<+s0;M|E$D7&~5jQC+;@sK6LzyP{@u39@PKD
z0cr?Z*IXl~@Yz12D3It2+odx7dK$)p7^xz8GXl7j6-BOmM{=IsOttUo>Ra!BISswk
z+keu}wc8r?h+)b;#XhAC*(PZooy%B2+oJ14lSgCmg6?S<@GAKJyM3sL&$a^9Hv2|i
zUFkAc%d~}Sp*%irq5O}C?+QG!^<N<${<`ZWw%<epcA|QC!~e4rnsM>Fl5f{I1c@*H
x*A|f19!VPs|K&fXM1B5oX54vzlC$342fj8wLuVK*>{=v%>uIplvtKW#{0&y?&jtVh

literal 0
HcmV?d00001

diff --git a/vendor/jasig/phpcas/docs/images/phpcas.png b/vendor/jasig/phpcas/docs/images/phpcas.png
new file mode 100644
index 0000000000000000000000000000000000000000..bb3d8f06b8817205c9463107a25b549c074bd83a
GIT binary patch
literal 6771
zcmbVR^-~;88zi^{cMT39Xb8>`+})kvfgr)*umCyST@QD6cMI<B5L^y9G{|@Fzwm9<
z%>1ymGhMyi{XAP6rm8H1iB5(N2M32KCo8EATf1RH5)~dcn{2p5z!tQhvU)CXa2R<1
zjd!yfe$Q}lWQ=l>Vw#?rXPMrb_)A^G0d0w=d-I<<tI7^n+d9B=Ynx4Aht{$EtA{&R
zp2l1Ke>hU3p+DiU3GhBApr}Zht7-HEGGF5bf_S(8qP^$({o5KzQIfheCTN$A7hS$w
zDs=tp!I$U+xzA_~ogS4wORqsZXPy4uR{jqYj&FBVK0}??qZ*ITiwKt|Z?zpz&;8c_
ze`4<3(Wi8OCp{_<8XA(wKwCKSr<9<e;GIx)Z=2ugjKCar@T8dHUFXpN54{;2T6e%%
z7wGqfwEKowju_1wjrI#_d0jfnk?XBL2+X7c)~#HenW-I)k&%(6N*LW6&d<*`R{;w@
zR)z>v4X_W<Bvl9eT@ssB@A1dDgnwr(AgT>_XCm5X+hd5b%lB()6S<ZqvLHd+DSIcp
zoiTVkS@O~keYt^{bGBCq{_^f{yE>#7nMOAoX^|yPb4vOZP{c{=z1lN&*wd$c2?5q@
z!>4W`7@r}ybR)dElOjGNjJG0NZNW`#A=h90O7rN2eu$-{%VRCiT~N#J<^^b%yIK6b
zn%+jJUvaK{OCDLShJ0>pzPI`Eq;L5nNmqkmF_XP|YE0wr{>QpH2ECQ|ewpch8P(^*
z4&lKOc(?r}duP3N?WH+iryes>GE%SSPmvv>^G)$_w<tCDgt77=V2_?Hz5qam7y-&C
zCmH)3Um{Ac^3g{#pR<cU)e+(Pr2aDjgA?E44504={k`CdUf_zNML%V$azP{J%p3J(
zq@_b!poSd<Fj!5ld|xulwVFmP&-uBE$4*s<N}Rs`G(!wT56GeAsm$#EWL`IBwiiL0
z@8Th4;fOJ^PUh<QV|vG)Cas;e&Xk|&)4z<l{aeAxSN*rjxVX5HPNa{E?U`5mv^D-*
z%ZKj(2BLqrNKlmwkSoGac!hEgnRO-n|4Ibk2o90)JOm*>4@(|-Ar=X9nKVP*h;xT+
z8%2OneC6?;TOouc$nv_PhD){KqVc2K+6esZOlEK-U74$x{irbmhu)-|k3LS<*$V9-
z#<&DNzm{UlHFq*IOOvaICN2S(7~axhE3KA|*==~T)6~?4Gt&k7z148@+vhu#%mUQE
z<B;B7&~}gHkw73tvCRb>-8uuH|3JvKtqrs=AMjRz;-5(XWL8pS1elwf_xFF@6+vb?
zI4LC0GJ4VVRe`-D85gp<i($_Z=Ts(h8azf;Ine^NP=W(_Q*fm2*)$Ci(zQw-!8$zy
zlUl%~C8tU_9Y~0YnU&6yiNll0(Ssyo>R(<%Lr1;DSK;UU_GXv<=U?x_4g#i_lvTLh
zqobutYf#@A7|yz&X|$i&PUq+Z>M%ushyU=(e@YOIS+J#~dUe`<qD-j$!12VcVYC72
zi;qSiwN=g&eit`XtH#J0(5jxw<Tij3Mx#Rl2qKuoXDUUOOWfle93qyIwhRUp+GDRG
z_>xUTs<5-ML0Ua+?Cc^Bd^<<@MTjY!#j(i+j2LGZ%#jJLR85~aK=I$1GvcWt9>EGO
z5>^=GKAd{c5)$&vX&0ohj*p7ueFgViBM9#)ho))NE+`S(FzpKptThwmY%Im0k&(hw
zEq*dvmVF8uE*ux;o+I)^v|-i?csSNAI2agl)ILZ|S2n#Hc=o@}p7Bja<TQJP6Gzx1
zR$V+jNW4!`a(jDwDd?qGw6HKme)|2$4Lw8pxr_@S?Mq)f_?L(YNkzH&y&wtfBQ+Gn
z<|f~rDJUkAbKhLRtkA}Kjfe+BVvlfdl$h*?$NBsSd~HlS#0#w7|4Xl{3xNs)p$RZ^
z&Yh5xO)e~XtmK&XG2<uKcwI~gV#E<7yMA|*Rx*#N{O&dsNykDYvx_T=*gT-){2-qi
zGBiXCf>HQF4Si9{7R{E9kW3;P!`a{14;6eRME!WIH}OZ<F(>qc+zF2%rYZdnltNs&
zrD6-j!`&N_AT=fMTS{&U>3jKD+%i-)(Kovmv3OXGQss!t*CSthB|Ieo=_IjJ9(Lrr
zFJHTB3Mjhj3KyWog^sMcoLkxj>Xwf>8&{lyTtHM3hJ~MaglL&%C4i7-Kb$tF{->NA
zdowQiw)S^7mp9uO@<8p+bq)eQ1@4|Ug-J$b*Wc%**I=b2X^_U<K`lOu6c)(5mlA*|
z!5bGB3<r+bU{R$k2w&o?yyEEZmjrr4by+3IqNt`uGg(!OFEqAi#w8C359H^NtoN^x
zzkW6O5SVVD57KKx`$y%xL(kG8*QnU?nU(cCt9i?$){Ft3j?ujPoN7rdDf&q58^8fj
z1(^sUmF*hKDVFzS!Sb<CQ7JEJLp58SOTeH|W@49tt`iWp@c5<VDNG$5rFM;3jExpt
zWXKwd``PdBdr%0uXNFEHU=X{z-`>P0)yTY#^GNtG@U<q7u&+@yFme7|IngRdM-P{l
z8D4$gY!%2V51a+vCj2{c!c2z@{ZctQ7C>W&jERYeLr9RF5*P}{y{VL=5M~38TPY;z
z1|9m(AvJR9q;rz4Z!>_|O2wmC86#w;yfb)BSu}*b<0-Mzatp{D)a@-?FUl4o85D?6
zP*A$bomO!H&ExFw_EWAT@_7Y^ZMlx?T!56?dgZ495^_qZ3H$B+(>~v?B!=CJ$A5SL
z8^kDfk0vmy21syWa_Wrk%4QO${+pV|Dz&E|uN-{ZTx$rE#f}&$Be);pEI&`zP!+;G
zMK$SFstRhg=6zH7+X3>=#H#yvymCLr55}r+!(O&hnbP@l=n2wROG1IVVqgp8qD<XG
zIpH1AG$7{jVUb%%fb(--c(K79y6-0<prB$7bC(&{-j%aV?L!8M5~a23K(9K_yE#>~
zgAtrA@p5i<eJEZWcy`vgbT^(;LB<Zu&OfG71+#5vZ*2SG-tu>Nap~9u&3>gSqwd>K
zI-nqC!(HYEVG6E<+>~!UQuTBYkNT`Rju!v%9asz!Pi5A0DF~g6W%d~N>EE~#$}cW$
z<>RR|q%P^fABfH)GEG+AvSeXpby5$HQ24|$&^W4HIjIXGo4YIDU1q-EoxLl!O{#o-
zowGZ7czU|_^7(h*>=jg0Tii5BKR!EH&%mjI?o#M|Z$2@B{IpmYu7L7+-pOwMBAURl
zLq}Y0%AebL!?(g!^CN2n;@bIf90rEH8^ugetA2wCZq_yRk`MXn15SC7KL*zEj7OSh
zSYfHn{yKeFf~(2<`nIAAc`K`AY|M#NuD!-3W2tWitt+bPR-xwktdj8w_x7fyXjum^
zY(%W7A1EkTQ~2hyJKwt$UUBNHTj8K$&Dw~#97Gm6c2N-%muolY)QJ$$(sZJjJh)IX
z0OJ0TK4B*oU8F&ze^K5+DZc&2FUKSS0`jeWd^&U<TCIf$J#uejFwb2t0@J|(ryekD
z6vm`{a)FnG%J5VCyk$0L*yyX$)~|NJ$NiKmS7jJrbRHN(&FL!H7ui`^L8DJ*sS70)
z9Q^#tl?U(MxyUQ1n3jzdl=zT6#K(ib<c3e?yDFgMe31t>&^lAY$a1<Q7Ss-Yf7lHY
zxw6YXjbmQ3d?SFudaw>*Dc5ndRPP}HK~9w+C3Rk&`}jN}!E`>z;3SsssvjZCsSB~l
zhY#6@)^Am<D?M^$rGrn}6}ra`F8*&ewr*p!_?6??^>H-b1JOruW}U7@;a#h>O`J7z
zU@!+wI3Ox)I_R`3w;Uzx>RSqwi_v|P8wtQxS@h?~kg<JyKYS_qC_~T<-N^wSA;tH3
zCd6~4<MGAq$I^eX=!Z_%*Duumq-E`$()B2K^%Tz#u~cbP4@<--^2KU{cB{who?pKN
z?j~+-B5tmQPEOkoCVhM3ZrKcY|GT@{L42O!xL(s$x?jW=xQVCzSU%HlF`za(=g7IL
zGii#bF>B82+WuoHaHLxzZ)4TmW0NKgEED4=uk<M<auVcK;xZicoOvYVlo!kYNuyY~
zw+2={{Oz+!n<fiNxE9TPl_omV()8-BCTJHkd46b54JyDa$!#@WV+6gq!H-Z=GVeaA
zz~z8-7vA1m2NRHlA`@zUm<M2X&?pj?Y1mxJWzt(Z0b)@KiZ|@;?QvU<x{xe-QcFZ}
zz-3L}G-^UFgay=EFI|~YYm2Qp_8fr~BfofzdR&P)jrfW>Lv6fkhBQ<u7yvq%?5kO)
zC=$a;rurYu(-eTxwT_ukiK61d1p;_Wzacy|${AW>;hB&gR3~kisH+!9(?VH;^(cp>
zVa69W=-c^}q3;lH`}FXjsTsO(LbRJC;9_;!0901T^edqQvxS-Gdp%Opsxg$>ySrl*
zk@348p<eCgNpZNj-!lDVu1LU(7ZDK|j;7>bJ?=3vRz4C_4;KbA#b2aDK)+Pwfk%*d
z<xHv!DzeEm(1`MpSE!xGY^I`$c9VsHtQCB5I2OP&FXk^HuY;~*Hlr0y{QKOdJaIb}
zIGY%=$7|8Xp@HAo?9fX$(vkkh$44#AP@bq4H8r(?(?mI2Mpj&_V|j%!xyAc)g=&KP
zwgT&w^eILWl@|3}=ty2Mm0V_p8m9RX{WQ1mvpG!d%);0^?VF)B3{T0ddWxCxEiJm5
ziy_4>p}6Y7stU(nW#_O#!7R3s0|$vz?9|_seSLLaR>n>jt7wd^x%9M3;w-WTbBhkA
zbLsX?-1eaSVd;mRcqiAwIC8_Fh0fsef{4oHW+6D}*v!qe&%dhP?L~h3wy3joW<U|d
z!4B4MQ))>LUu}npy#GPZ`1BK9K~NX<xcURzNAB2J@vg2eSgqIRLPJEc=YE>+Ur1}R
zTT!fNG8>d{9MaVB2q3`yAmlF0k!=S6vweIkTN7c^)Yk_m+*elC(E<Iiu|^Zg(&v88
zT*gpKkFHTKzUuf}*D%F_orj3j-wr|IT)L~#^unLFiUjmCC}wUFaNK84NP+tLN(Mn#
zGK0y^35o2-rcU%SE^DyZ4!hxkDN?<3mMA<P^_RFrSQ0U7>efnbHo&{-JUlzwQ3}K_
zQPOxWwJoE04xk_)gGJX@BV!fA3#BYUDRxI$;>^MZ<xvd9?2Bsc=7Mvb6_)M}ku6+6
zM$-p3fp;F`5(44`U(?7?(B!%S3>B#GrU|ktA`jdnlHBkSy|cELj6=(wQm)}tynC=K
z|A0IJhlh{nezus2O8V2FZ-M02dMn3wH^B2>GBY6Afn2NH=-r*jY#V_2J9#kA)8pex
z)p$BjdG3y(vwjvEMx-}?W1HoZtH0TrL`d|P#`W>ZNgCr!K8RFhRY*pG&yb+bs7mP%
zM+lu)X-|(OTP5S}!Nw5fe)N$ZD%P1;83iRKcScAZNPV~TVXx2n`i1DGGp5%;9;iv{
z#k4pJ;>jLP|F~q>sY|B>Wa%~F2Rxu*@|b6-Jv_$lbhx;}#BXHDT3B!>VjgzW1fIhm
zmL}wpRtKk$-0c2SRn!fHSj7^_z-$B)fU{9`=Uth$wc@rg052wll~%2=8ZuXJ{$NI~
zff<{uR<2X2p2ag%@82|;P=_P;zMf12bGf@oU0q%FYK3Z%lnJ`cq+uTC7%s)eqwB%8
z808<<fic?nR+M+O5)<b&EhZ0Crq-J*MoFOqR+*_JY!d|qNXFP_m#5XXp@g;4t~>Vr
z_27C0DDsAm1altq(C@M|jEsc8FzFm0SRWn3J}&-EMsBD{J*2QtD!|JWEvCLUKrwd{
zC4Yx3%^R80es+kD&o)eGGD(6dv#7Q^Ph8PQVkbwpQhT=jY%fNHK4hFz|5fY0%lCM|
zRw0@7;_Rflk~=Qh8|G^DL595B{8oD<Ha@95dG#_ISdg!+{ev|OvM5QLn>5bK*b^Mi
z;Kz&sK@mjUMCdyARu(I;$~2V@D7;omA{}Uibw&zgP0lsKT~YO<ib6{HB2ZbCyF+24
z4dbVc0}G}YSaPQiQMGo^eC;Md$7Ep0e|agEE0nKaxt{F<4V?N=b*rz-7&>YITVTax
zFFPzQkS1U|XQEAeNu%73jfEWp3yZM`--(bYSu@;QPJz3F)wlUuAap?71Si{;KS)7N
zrLZOvOAw}7>sVKL;OcJ`UkUuaG)W+GuAA#CZXfr5#dp5p`do;6*>L``4#Phe7QA5`
z1h7&|%58;+IG!fN_w8c+7p%S&d_zjf&W6;Q55qEAJB)|E3}(%kgC^V<2tBoW;}8K!
zOC%!cX6F3Yk*D#rDf$$-iK}W5GvuPu<AzCGg^K3rBY|H%lH}@Kzg0_|gtO$7USFP3
zpQlINkr#ErEgEhb`0C23wc;h;{#dQHaMHwBk)+TNp?&^rr5*!4-1el3V#1z@0S-oy
zsV<!p?r(4YDCxK7vn|{o2ZzK8geliI5gUyn){|%B;}w%te#&`$kGXb3(dyVoVZn9e
zHN|Qt_XlFnKSaHOCz7LKb96zpc5Y9Sw1fnLVn7E8a+#y7iJYQgGt%(L(f0wLO~Lac
zBE+xaG*WDn`;f2aFtuow8<eTi`Ek;*vnT8B6oN1s1?l>9mP5t|Z2kPYU~MDRf35v4
zwWx}7(;^)w(x9KH{=1nhFMgp@TS?p(#H?TFPSoMbl~MEPHe+)l7oF$l2<WxCaqr0G
zbt$Zj)X07&uc7#gmO3@iX!H-&OW=>!trYsF;_5ILUBn<XZYFz-sXmQCzAFDKynp6D
z6xw>}f*eT`B`)DoQX*Ak2vSMFPh=L7`NV<sDxQw!G(JE?4>hNd^o{HZ@0#&VD2EEQ
zkhN3<lmy>Mfww0Mu_I)ffGr5^p7iUf4{x64xaJg(f<tb(JVE+;pMlbWK+1=j+<{@p
zRW=Q6T#L)_-IRylfw|8!xM4o1;mj_rLcILEPM1=P=RU&g1pZE?2n*$X?`u#*1O{di
zAC?&PP>JgE_FJP(DGHl*h(5RLwIq>)(bb10*iH`*fR7_`J%XN27!^~+$`Xc)jc+{y
z@BwfVm)Vp4Uy6FKSzJWc)lr)X`dN6_#{(QcC4S9N>=r<ftQX&Q7xA{T^+<>M{@j5x
z<U~Bg?)U2MuNdZ>>&El?$QW2+ZFh!*xR8}Qx)RG$@{9U)J{S-GW{3-&Fvs`BKXn{|
zGAn3~f;TnT^}JuH`5*fTn_USeqPxJ)H9j{ZzkXyP!T<0++lKh3rec`yf9}sP;s0JM
zSjD%@ri~ItaOl`sQQ-q#JS?ag@DXWtKVL0bUe-Ny4R=BeKm{8tZ@hd0u>i6S$X(xd
zuWJ>YF@lestVuz6rA1YTwAE1&--}Sqx25>V)%Tv?W33N?YM1D6G0AN))>TCZQ27)M
zZO@KL`ve9jCMp9Kdp|vip4Ol1nIS})W$-y7bbn7f+&k}!^qPo@TGc34&_%-JEbB)@
zP0ZTc?U<QS<Im<(w2(M?f>3=+-F$0lcGzgEsxnD-pu}y&7<e*j$HqrRWORuR+(Na|
zoErFDT-0Q#FG}`?;KQX-x%hs^XOqo9r1!DI)Qn3d>R9?`+z-5ulU5$AHI5kIl7Udv
zMo~dh(qo7F2j|Iwwa^t7=k*IGYHH+DvY6_-M^R!g`ywnEdFS}IXG<$9lE~<stLE79
zVW1<y;pc4OILi~y4#ZQzxQ6=B{Pi|_j@U`sHmOSSaWzbSuAO%VBvI@fyUe(`Ski7K
zEgQDygHk7=W=btTLTKIvhp$Z>$h0)zX#PTGB%Da_sTHF?7j|p2czGg$4-g%jjII#8
z8CXyHV_dCMew;hAPf(VqHQggtl(|?}=N$HdmB@f!-*|hWe|Vr!y1f$H+P7?H=s8+b
zgjPIDc6B6J^ILOxbaea(OY%-`H+QNdHs<hUiQ?j!!S6ELi*o&tXRprQ$vqUJ@4-@{
zFtKY@1_dk<=aE;|46x#y##r`pagn1T_62a<ef7Z^J-c7{g#?A9W%}4mucdh<ZF5es
zYSz&35DzWKrel^8KlyhPILGpSn;!=0F6H9oi&hlR?Dvd?h0z$dI`jPX1?nIWtqYAG
zyDrQ(sg|gtYmI(0Lco>U#%9X^63IxG;3ubo7_5*_SF1Kc#Og~EnCg(9WcscwV2`ad
zPdl7``e=V`Qxcm08*zCw5tnxUYEW9!>@Tecv!=~%*B6+NttPxJoCDQM(a+}$?R9;o
z=0`?S+zql77Zr<B;Qd2k#06`9l8_e6{!Sf`-rJV!lvwMwwuv1Iaa_JMwX%}_Q7%}g
z#YRbUv~)&7)wy61oFj;?b&{ZlD}#0g=_^5QV3qp4${8USg4&2$b{G-mQ;UmhyAm7T
zTQSK$N}YgjW^T@BzuLmVrN&qu+A>5V`3E@IzOmOCLlG6Fk6MOMjtgS3<SY+}Z}~%c
zY2~f2*fnUAt1v$=gOiITb{krf#ld?$h%8xxRGCIPep0X5du6_2;S3)}AVWJ?NY5lk
zkC$+4Ob<um{QDJ*-t6s@<NsH=ym9v$)5@43%NUr<lA~JqrHvxA^wNwj<DQOOUF^9%
z7S2$VYvV8Z0$tu6>Bo5*@$=I)mYz<gIn1587@wpTjwnTC7<Bdc1ZNj#+aITG_IIJ*
z`$9N3<MwWWMpcI}@cQ;TzMbfVK3UluNM`T_a|*{$buy#L@p6j;t<R|ok4Rg{c+Z5W
zxIWM0$HLPMLbs~GlUyiA48_PeKR6>nLtDE_^^4ounR4+D2E&8fN%O~x!)s4Q*yac?
zbVL#7+6k>)##&B~$g!G!T~PQe;=~4*3Q^}}iZDraBO{laBKUqN_6Mk7R#hl*$MeHi
z2r?AdNi|il2Doqr_zONQB{1dJySPG2=Z?w9y?3q@rIVABekD2ATOc~p(Vm2TyL!OZ
YL&(hT=*%gA{Y8S4lTwzf68{$XKmMga_5c6?

literal 0
HcmV?d00001

diff --git a/vendor/jasig/phpcas/docs/index.html b/vendor/jasig/phpcas/docs/index.html
new file mode 100644
index 00000000000..68f1295890e
--- /dev/null
+++ b/vendor/jasig/phpcas/docs/index.html
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <title>phpCAS</title>
+  </head>
+  <body>
+	<p><img src="images/phpcas.png" width="191" height="68"/></p>
+	<p>phpCAS documentation is hosted at <a href="https://wiki.jasig.org/display/CASC/phpCAS">https://wiki.jasig.org/display/CASC/phpCAS</a>.</p>
+	<ul>
+	  <li><a href="examples">examples</a></li>
+	  <li><a href="http://downloads.jasig.org/cas-clients/php/1.3.2/docs/api/">source documentation</a></li>
+  </ul>
+	<p><img src="images/esup-portail.png" width="182" height="68"/> <img src="images/jasig.png" width="169" height="87"/></p>
+	<p>&nbsp;</p>
+  </body>
+</html>
+  
diff --git a/vendor/jasig/phpcas/source/CAS.php b/vendor/jasig/phpcas/source/CAS.php
new file mode 100644
index 00000000000..edb8656e365
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS.php
@@ -0,0 +1,1887 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ *
+ * Interface class of the phpCAS library
+ * PHP Version 5
+ *
+ * @file     CAS/CAS.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @author   Olivier Berger <olivier.berger@it-sudparis.eu>
+ * @author   Brett Bieber <brett.bieber@gmail.com>
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ * @ingroup public
+ */
+
+
+//
+// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI']
+// in IIS
+//
+if (php_sapi_name() != 'cli') {
+    if (!isset($_SERVER['REQUEST_URI'])) {
+        $_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
+// ########################################################################
+
+// ------------------------------------------------------------------------
+//  CAS VERSIONS
+// ------------------------------------------------------------------------
+
+/**
+ * phpCAS version. accessible for the user by phpCAS::getVersion().
+ */
+define('PHPCAS_VERSION', '1.3.2+');
+
+/**
+ * @addtogroup public
+ * @{
+ */
+
+/**
+ * CAS version 1.0
+ */
+define("CAS_VERSION_1_0", '1.0');
+/*!
+ * CAS version 2.0
+*/
+define("CAS_VERSION_2_0", '2.0');
+
+// ------------------------------------------------------------------------
+//  SAML defines
+// ------------------------------------------------------------------------
+
+/**
+ * SAML protocol
+ */
+define("SAML_VERSION_1_1", 'S1');
+
+/**
+ * XML header for SAML POST
+ */
+define("SAML_XML_HEADER", '<?xml version="1.0" encoding="UTF-8"?>');
+
+/**
+ * SOAP envelope for SAML POST
+ */
+define("SAML_SOAP_ENV", '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/>');
+
+/**
+ * SOAP body for SAML POST
+ */
+define("SAML_SOAP_BODY", '<SOAP-ENV:Body>');
+
+/**
+ * SAMLP request
+ */
+define("SAMLP_REQUEST", '<samlp:Request xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"  MajorVersion="1" MinorVersion="1" RequestID="_192.168.16.51.1024506224022" IssueInstant="2002-06-19T17:03:44.022Z">');
+define("SAMLP_REQUEST_CLOSE", '</samlp:Request>');
+
+/**
+ * SAMLP artifact tag (for the ticket)
+ */
+define("SAML_ASSERTION_ARTIFACT", '<samlp:AssertionArtifact>');
+
+/**
+ * SAMLP close
+ */
+define("SAML_ASSERTION_ARTIFACT_CLOSE", '</samlp:AssertionArtifact>');
+
+/**
+ * SOAP body close
+ */
+define("SAML_SOAP_BODY_CLOSE", '</SOAP-ENV:Body>');
+
+/**
+ * SOAP envelope close
+ */
+define("SAML_SOAP_ENV_CLOSE", '</SOAP-ENV:Envelope>');
+
+/**
+ * SAML Attributes
+ */
+define("SAML_ATTRIBUTES", 'SAMLATTRIBS');
+
+/** @} */
+/**
+ * @addtogroup publicPGTStorage
+ * @{
+ */
+// ------------------------------------------------------------------------
+//  FILE PGT STORAGE
+// ------------------------------------------------------------------------
+/**
+ * Default path used when storing PGT's to file
+ */
+define("CAS_PGT_STORAGE_FILE_DEFAULT_PATH", session_save_path());
+/** @} */
+// ------------------------------------------------------------------------
+// SERVICE ACCESS ERRORS
+// ------------------------------------------------------------------------
+/**
+ * @addtogroup publicServices
+ * @{
+ */
+
+/**
+ * phpCAS::service() error code on success
+ */
+define("PHPCAS_SERVICE_OK", 0);
+/**
+ * phpCAS::service() error code when the PT could not retrieve because
+ * the CAS server did not respond.
+ */
+define("PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE", 1);
+/**
+ * phpCAS::service() error code when the PT could not retrieve because
+ * the response of the CAS server was ill-formed.
+ */
+define("PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE", 2);
+/**
+ * phpCAS::service() error code when the PT could not retrieve because
+ * the CAS server did not want to.
+ */
+define("PHPCAS_SERVICE_PT_FAILURE", 3);
+/**
+ * phpCAS::service() error code when the service was not available.
+ */
+define("PHPCAS_SERVICE_NOT_AVAILABLE", 4);
+
+// ------------------------------------------------------------------------
+// SERVICE TYPES
+// ------------------------------------------------------------------------
+/**
+ * phpCAS::getProxiedService() type for HTTP GET
+ */
+define("PHPCAS_PROXIED_SERVICE_HTTP_GET", 'CAS_ProxiedService_Http_Get');
+/**
+ * phpCAS::getProxiedService() type for HTTP POST
+ */
+define("PHPCAS_PROXIED_SERVICE_HTTP_POST", 'CAS_ProxiedService_Http_Post');
+/**
+ * phpCAS::getProxiedService() type for IMAP
+ */
+define("PHPCAS_PROXIED_SERVICE_IMAP", 'CAS_ProxiedService_Imap');
+
+
+/** @} */
+// ------------------------------------------------------------------------
+//  LANGUAGES
+// ------------------------------------------------------------------------
+/**
+ * @addtogroup publicLang
+ * @{
+ */
+
+define("PHPCAS_LANG_ENGLISH", 'CAS_Languages_English');
+define("PHPCAS_LANG_FRENCH", 'CAS_Languages_French');
+define("PHPCAS_LANG_GREEK", 'CAS_Languages_Greek');
+define("PHPCAS_LANG_GERMAN", 'CAS_Languages_German');
+define("PHPCAS_LANG_JAPANESE", 'CAS_Languages_Japanese');
+define("PHPCAS_LANG_SPANISH", 'CAS_Languages_Spanish');
+define("PHPCAS_LANG_CATALAN", 'CAS_Languages_Catalan');
+
+/** @} */
+
+/**
+ * @addtogroup internalLang
+ * @{
+ */
+
+/**
+ * phpCAS default language (when phpCAS::setLang() is not used)
+ */
+define("PHPCAS_LANG_DEFAULT", PHPCAS_LANG_ENGLISH);
+
+/** @} */
+// ------------------------------------------------------------------------
+//  DEBUG
+// ------------------------------------------------------------------------
+/**
+ * @addtogroup publicDebug
+ * @{
+ */
+
+/**
+ * The default directory for the debug file under Unix.
+ */
+define('DEFAULT_DEBUG_DIR', '/tmp/');
+
+/** @} */
+
+// include the class autoloader
+require_once dirname(__FILE__) . '/CAS/Autoload.php';
+
+/**
+ * The phpCAS class is a simple container for the phpCAS library. It provides CAS
+ * authentication for web applications written in PHP.
+ *
+ * @ingroup public
+ * @class phpCAS
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @author   Olivier Berger <olivier.berger@it-sudparis.eu>
+ * @author   Brett Bieber <brett.bieber@gmail.com>
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class phpCAS
+{
+
+    /**
+     * This variable is used by the interface class phpCAS.
+     *
+     * @hideinitializer
+     */
+    private static $_PHPCAS_CLIENT;
+
+    /**
+     * This variable is used to store where the initializer is called from
+     * (to print a comprehensive error in case of multiple calls).
+     *
+     * @hideinitializer
+     */
+    private static $_PHPCAS_INIT_CALL;
+
+    /**
+     * This variable is used to store phpCAS debug mode.
+     *
+     * @hideinitializer
+     */
+    private static $_PHPCAS_DEBUG;
+
+
+    // ########################################################################
+    //  INITIALIZATION
+    // ########################################################################
+
+    /**
+     * @addtogroup publicInit
+     * @{
+     */
+
+    /**
+     * phpCAS client initializer.
+     *
+     * @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)
+     *
+     * @return a newly created CAS_Client object
+     * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be
+     * called, only once, and before all other methods (except phpCAS::getVersion()
+     * and phpCAS::setDebug()).
+     */
+    public static function client($server_version, $server_hostname,
+        $server_port, $server_uri, $changeSessionID = true
+    ) {
+        phpCAS :: traceBegin();
+        if (is_object(self::$_PHPCAS_CLIENT)) {
+            phpCAS :: error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')');
+        }
+
+        // store where the initializer is called from
+        $dbg = debug_backtrace();
+        self::$_PHPCAS_INIT_CALL = array (
+            'done' => true,
+            'file' => $dbg[0]['file'],
+            'line' => $dbg[0]['line'],
+            'method' => __CLASS__ . '::' . __FUNCTION__
+        );
+
+        // initialize the object $_PHPCAS_CLIENT
+        try {
+            self::$_PHPCAS_CLIENT = new CAS_Client(
+                $server_version, false, $server_hostname, $server_port, $server_uri,
+                $changeSessionID
+            );
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * phpCAS proxy initializer.
+     *
+     * @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)
+     *
+     * @return a newly created CAS_Client object
+     * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be
+     * called, only once, and before all other methods (except phpCAS::getVersion()
+     * and phpCAS::setDebug()).
+     */
+    public static function proxy($server_version, $server_hostname,
+        $server_port, $server_uri, $changeSessionID = true
+    ) {
+        phpCAS :: traceBegin();
+        if (is_object(self::$_PHPCAS_CLIENT)) {
+            phpCAS :: error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')');
+        }
+
+        // store where the initialzer is called from
+        $dbg = debug_backtrace();
+        self::$_PHPCAS_INIT_CALL = array (
+            'done' => true,
+            'file' => $dbg[0]['file'],
+            'line' => $dbg[0]['line'],
+            'method' => __CLASS__ . '::' . __FUNCTION__
+        );
+
+        // initialize the object $_PHPCAS_CLIENT
+        try {
+            self::$_PHPCAS_CLIENT = new CAS_Client(
+                $server_version, true, $server_hostname, $server_port, $server_uri,
+                $changeSessionID
+            );
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+        phpCAS :: traceEnd();
+    }
+
+    /** @} */
+    // ########################################################################
+    //  DEBUGGING
+    // ########################################################################
+
+    /**
+     * @addtogroup publicDebug
+     * @{
+     */
+
+    /**
+     * Set/unset debug mode
+     *
+     * @param string $filename the name of the file used for logging, or false
+     * to stop debugging.
+     *
+     * @return void
+     */
+    public static function setDebug($filename = '')
+    {
+        if ($filename != false && gettype($filename) != 'string') {
+            phpCAS :: error('type mismatched for parameter $dbg (should be false or the name of the log file)');
+        }
+        if ($filename === false) {
+            self::$_PHPCAS_DEBUG['filename'] = false;
+
+        } else {
+            if (empty ($filename)) {
+                if (preg_match('/^Win.*/', getenv('OS'))) {
+                    if (isset ($_ENV['TMP'])) {
+                        $debugDir = $_ENV['TMP'] . '/';
+                    } else {
+                        $debugDir = '';
+                    }
+                } else {
+                    $debugDir = DEFAULT_DEBUG_DIR;
+                }
+                $filename = $debugDir . 'phpCAS.log';
+            }
+
+            if (empty (self::$_PHPCAS_DEBUG['unique_id'])) {
+                self::$_PHPCAS_DEBUG['unique_id'] = substr(strtoupper(md5(uniqid(''))), 0, 4);
+            }
+
+            self::$_PHPCAS_DEBUG['filename'] = $filename;
+            self::$_PHPCAS_DEBUG['indent'] = 0;
+
+            phpCAS :: trace('START phpCAS-' . PHPCAS_VERSION . ' ******************');
+        }
+    }
+
+
+    /**
+     * Logs a string in debug mode.
+     *
+     * @param string $str the string to write
+     *
+     * @return void
+     * @private
+     */
+    public static function log($str)
+    {
+        $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);
+            }
+            for ($i = 0; $i < self::$_PHPCAS_DEBUG['indent']; $i++) {
+
+                $indent_str .= '|    ';
+            }
+            // 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']);
+        }
+
+    }
+
+    /**
+     * This method is used by interface methods to print an error and where the
+     * function was originally called from.
+     *
+     * @param string $msg the message to print
+     *
+     * @return void
+     * @private
+     */
+    public static function error($msg)
+    {
+        $dbg = debug_backtrace();
+        $function = '?';
+        $file = '?';
+        $line = '?';
+        if (is_array($dbg)) {
+            for ($i = 1; $i < sizeof($dbg); $i++) {
+                if (is_array($dbg[$i]) && isset($dbg[$i]['class']) ) {
+                    if ($dbg[$i]['class'] == __CLASS__) {
+                        $function = $dbg[$i]['function'];
+                        $file = $dbg[$i]['file'];
+                        $line = $dbg[$i]['line'];
+                    }
+                }
+            }
+        }
+        echo "<br />\n<b>phpCAS error</b>: <font color=\"FF0000\"><b>" . __CLASS__ . "::" . $function . '(): ' . htmlentities($msg) . "</b></font> in <b>" . $file . "</b> on line <b>" . $line . "</b><br />\n";
+        phpCAS :: trace($msg);
+        phpCAS :: traceEnd();
+
+        throw new CAS_GracefullTerminationException(__CLASS__ . "::" . $function . '(): ' . $msg);
+    }
+
+    /**
+     * This method is used to log something in debug mode.
+     *
+     * @param string $str string to log
+     *
+     * @return void
+     */
+    public static function trace($str)
+    {
+        $dbg = debug_backtrace();
+        phpCAS :: log($str . ' [' . basename($dbg[0]['file']) . ':' . $dbg[0]['line'] . ']');
+    }
+
+    /**
+     * This method is used to indicate the start of the execution of a function in debug mode.
+     *
+     * @return void
+     */
+    public static function traceBegin()
+    {
+        $dbg = debug_backtrace();
+        $str = '=> ';
+        if (!empty ($dbg[1]['class'])) {
+            $str .= $dbg[1]['class'] . '::';
+        }
+        $str .= $dbg[1]['function'] . '(';
+        if (is_array($dbg[1]['args'])) {
+            foreach ($dbg[1]['args'] as $index => $arg) {
+                if ($index != 0) {
+                    $str .= ', ';
+                }
+                if (is_object($arg)) {
+                    $str .= get_class($arg);
+                } else {
+                    $str .= str_replace(array("\r\n", "\n", "\r"), "", var_export($arg, true));
+                }
+            }
+        }
+        if (isset($dbg[1]['file'])) {
+            $file = basename($dbg[1]['file']);
+        } else {
+            $file = 'unknown_file';
+        }
+        if (isset($dbg[1]['line'])) {
+            $line = $dbg[1]['line'];
+        } else {
+            $line = 'unknown_line';
+        }
+        $str .= ') [' . $file . ':' . $line . ']';
+        phpCAS :: log($str);
+        if (!isset(self::$_PHPCAS_DEBUG['indent'])) {
+            self::$_PHPCAS_DEBUG['indent'] = 0;
+        } else {
+            self::$_PHPCAS_DEBUG['indent']++;
+        }
+    }
+
+    /**
+     * This method is used to indicate the end of the execution of a function in
+     * debug mode.
+     *
+     * @param string $res the result of the function
+     *
+     * @return void
+     */
+    public static function traceEnd($res = '')
+    {
+        if (empty(self::$_PHPCAS_DEBUG['indent'])) {
+            self::$_PHPCAS_DEBUG['indent'] = 0;
+        } else {
+            self::$_PHPCAS_DEBUG['indent']--;
+        }
+        $dbg = debug_backtrace();
+        $str = '';
+        if (is_object($res)) {
+            $str .= '<= ' . get_class($res);
+        } else {
+            $str .= '<= ' . str_replace(array("\r\n", "\n", "\r"), "", var_export($res, true));
+        }
+
+        phpCAS :: log($str);
+    }
+
+    /**
+     * This method is used to indicate the end of the execution of the program
+     *
+     * @return void
+     */
+    public static function traceExit()
+    {
+        phpCAS :: log('exit()');
+        while (self::$_PHPCAS_DEBUG['indent'] > 0) {
+            phpCAS :: log('-');
+            self::$_PHPCAS_DEBUG['indent']--;
+        }
+    }
+
+    /** @} */
+    // ########################################################################
+    //  INTERNATIONALIZATION
+    // ########################################################################
+    /**
+    * @addtogroup publicLang
+    * @{
+    */
+
+    /**
+     * This method is used to set the language used by phpCAS.
+     *
+     * @param string $lang string representing the language.
+     *
+     * @return void
+     *
+     * @sa PHPCAS_LANG_FRENCH, PHPCAS_LANG_ENGLISH
+     * @note Can be called only once.
+     */
+    public static function setLang($lang)
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setLang($lang);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /** @} */
+    // ########################################################################
+    //  VERSION
+    // ########################################################################
+    /**
+    * @addtogroup public
+    * @{
+    */
+
+    /**
+     * This method returns the phpCAS version.
+     *
+     * @return the phpCAS version.
+     */
+    public static function getVersion()
+    {
+        return PHPCAS_VERSION;
+    }
+
+    /** @} */
+    // ########################################################################
+    //  HTML OUTPUT
+    // ########################################################################
+    /**
+    * @addtogroup publicOutput
+    * @{
+    */
+
+    /**
+     * This method sets the HTML header used for all outputs.
+     *
+     * @param string $header the HTML header.
+     *
+     * @return void
+     */
+    public static function setHTMLHeader($header)
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setHTMLHeader($header);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * This method sets the HTML footer used for all outputs.
+     *
+     * @param string $footer the HTML footer.
+     *
+     * @return void
+     */
+    public static function setHTMLFooter($footer)
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setHTMLFooter($footer);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /** @} */
+    // ########################################################################
+    //  PGT STORAGE
+    // ########################################################################
+    /**
+    * @addtogroup publicPGTStorage
+    * @{
+    */
+
+    /**
+     * This method can be used to set a custom PGT storage object.
+     *
+     * @param CAS_PGTStorage $storage a PGT storage object that inherits from the
+     * CAS_PGTStorage class
+     *
+     * @return void
+     */
+    public static function setPGTStorage($storage)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setPGTStorage($storage);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method is used to tell phpCAS to store the response of the
+     * CAS server to PGT requests in a database.
+     *
+     * @param string $dsn_or_pdo     a dsn string to use for creating a PDO
+     * object or a PDO object
+     * @param string $username       the username to use when connecting to the
+     * database
+     * @param string $password       the password to use when connecting to the
+     * database
+     * @param string $table          the table to use for storing and retrieving
+     * PGT's
+     * @param string $driver_options any driver options to use when connecting
+     * to the database
+     *
+     * @return void
+     */
+    public static function setPGTStorageDb($dsn_or_pdo, $username='',
+        $password='', $table='', $driver_options=null
+    ) {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setPGTStorageDb($dsn_or_pdo, $username, $password, $table, $driver_options);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method is used to tell phpCAS to store the response of the
+     * CAS server to PGT requests onto the filesystem.
+     *
+     * @param string $path the path where the PGT's should be stored
+     *
+     * @return void
+     */
+    public static function setPGTStorageFile($path = '')
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setPGTStorageFile($path);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+        phpCAS :: traceEnd();
+    }
+    /** @} */
+    // ########################################################################
+    // ACCESS TO EXTERNAL SERVICES
+    // ########################################################################
+    /**
+    * @addtogroup publicServices
+    * @{
+    */
+
+    /**
+     * Answer a proxy-authenticated service handler.
+     *
+     * @param string $type The service type. One of
+     * PHPCAS_PROXIED_SERVICE_HTTP_GET; PHPCAS_PROXIED_SERVICE_HTTP_POST;
+     * PHPCAS_PROXIED_SERVICE_IMAP
+     *
+     * @return CAS_ProxiedService
+     * @throws InvalidArgumentException If the service type is unknown.
+     */
+    public static function getProxiedService ($type)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            $res = self::$_PHPCAS_CLIENT->getProxiedService($type);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+        return $res;
+    }
+
+    /**
+     * Initialize a proxied-service handler with the proxy-ticket it should use.
+     *
+     * @param CAS_ProxiedService $proxiedService Proxied Service Handler
+     *
+     * @return void
+     * @throws CAS_ProxyTicketException If there is a proxy-ticket failure.
+     *		The code of the Exception will be one of:
+     *			PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_FAILURE
+     */
+    public static function initializeProxiedService (CAS_ProxiedService $proxiedService)
+    {
+        phpCAS::_validateProxyExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->initializeProxiedService($proxiedService);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * This method is used to access an HTTP[S] service.
+     *
+     * @param string $url       the service to access.
+     * @param string &$err_code an error code Possible values are
+     * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE,
+     * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE,
+     * PHPCAS_SERVICE_NOT_AVAILABLE.
+     * @param string &$output   the output of the service (also used to give an
+     * error message on failure).
+     *
+     * @return bool true on success, false otherwise (in this later case,
+     * $err_code gives the reason why it failed and $output contains an error
+     * message).
+     */
+    public static function serviceWeb($url, & $err_code, & $output)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            $res = self::$_PHPCAS_CLIENT->serviceWeb($url, $err_code, $output);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd($res);
+        return $res;
+    }
+
+    /**
+     * This method is used to access an IMAP/POP3/NNTP service.
+     *
+     * @param string $url       a string giving the URL of the service,
+     * including the mailing box for IMAP URLs, as accepted by imap_open().
+     * @param string $service   a string giving for CAS retrieve Proxy ticket
+     * @param string $flags     options given to imap_open().
+     * @param string &$err_code an error code Possible values are
+     * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE,
+     * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE,
+     * PHPCAS_SERVICE_NOT_AVAILABLE.
+     * @param string &$err_msg  an error message on failure
+     * @param string &$pt       the Proxy Ticket (PT) retrieved from the CAS
+     * server to access the URL on success, false on error).
+     *
+     * @return object IMAP stream on success, false otherwise (in this later
+     * case, $err_code gives the reason why it failed and $err_msg contains an
+     * error message).
+     */
+    public static function serviceMail($url, $service, $flags, & $err_code, & $err_msg, & $pt)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            $res = self::$_PHPCAS_CLIENT->serviceMail($url, $service, $flags, $err_code, $err_msg, $pt);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd($res);
+        return $res;
+    }
+
+    /** @} */
+    // ########################################################################
+    //  AUTHENTICATION
+    // ########################################################################
+    /**
+    * @addtogroup publicAuth
+    * @{
+    */
+
+    /**
+     * Set the times authentication will be cached before really accessing the
+     * CAS server in gateway mode:
+     * - -1: check only once, and then never again (until you pree login)
+     * - 0: always check
+     * - n: check every "n" time
+     *
+     * @param int $n an integer.
+     *
+     * @return void
+     */
+    public static function setCacheTimesForAuthRecheck($n)
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setCacheTimesForAuthRecheck($n);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * Set a callback function to be run when a user authenticates.
+     *
+     * The callback function will be passed a $logoutTicket as its first
+     * parameter, followed by any $additionalArgs you pass. The $logoutTicket
+     * parameter is an opaque string that can be used to map the session-id to
+     * logout request in order to support single-signout in applications that
+     * manage their own sessions (rather than letting phpCAS start the session).
+     *
+     * phpCAS::forceAuthentication() will always exit and forward client unless
+     * they are already authenticated. To perform an action at the moment the user
+     * logs in (such as registering an account, performing logging, etc), register
+     * a callback function here.
+     *
+     * @param string $function       Callback function
+     * @param array  $additionalArgs optional array of arguments
+     *
+     * @return void
+     */
+    public static function setPostAuthenticateCallback ($function, array $additionalArgs = array())
+    {
+        phpCAS::_validateClientExists();
+
+        self::$_PHPCAS_CLIENT->setPostAuthenticateCallback($function, $additionalArgs);
+    }
+
+    /**
+     * Set a callback function to be run when a single-signout request is
+     * received. The callback function will be passed a $logoutTicket as its
+     * first parameter, followed by any $additionalArgs you pass. The
+     * $logoutTicket parameter is an opaque string that can be used to map a
+     * session-id to the logout request in order to support single-signout in
+     * applications that manage their own sessions (rather than letting phpCAS
+     * start and destroy the session).
+     *
+     * @param string $function       Callback function
+     * @param array  $additionalArgs optional array of arguments
+     *
+     * @return void
+     */
+    public static function setSingleSignoutCallback ($function, array $additionalArgs = array())
+    {
+        phpCAS::_validateClientExists();
+
+        self::$_PHPCAS_CLIENT->setSingleSignoutCallback($function, $additionalArgs);
+    }
+
+    /**
+     * This method is called to check if the user is already authenticated
+     * locally or has a global cas session. A already existing cas session is
+     * determined by a cas gateway call.(cas login call without any interactive
+     * prompt)
+     *
+     * @return true when the user is authenticated, false when a previous
+     * gateway login failed or the function will not return if the user is
+     * redirected to the cas server for a gateway login attempt
+     */
+    public static function checkAuthentication()
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        $auth = self::$_PHPCAS_CLIENT->checkAuthentication();
+
+        // store where the authentication has been checked and the result
+        self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
+
+        phpCAS :: traceEnd($auth);
+        return $auth;
+    }
+
+    /**
+     * This method is called to force authentication if the user was not already
+     * authenticated. If the user is not authenticated, halt by redirecting to
+     * the CAS server.
+     *
+     * @return bool Authentication
+     */
+    public static function forceAuthentication()
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+        $auth = self::$_PHPCAS_CLIENT->forceAuthentication();
+
+        // store where the authentication has been checked and the result
+        self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
+
+        /*      if (!$auth) {
+         phpCAS :: trace('user is not authenticated, redirecting to the CAS server');
+        self::$_PHPCAS_CLIENT->forceAuthentication();
+        } else {
+        phpCAS :: trace('no need to authenticate (user `' . phpCAS :: getUser() . '\' is already authenticated)');
+        }*/
+
+        phpCAS :: traceEnd();
+        return $auth;
+    }
+
+    /**
+     * This method is called to renew the authentication.
+     *
+     * @return void
+     **/
+    public static function renewAuthentication()
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        $auth = self::$_PHPCAS_CLIENT->renewAuthentication();
+
+        // store where the authentication has been checked and the result
+        self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
+
+        //self::$_PHPCAS_CLIENT->renewAuthentication();
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method is called to check if the user is authenticated (previously or by
+     * tickets given in the URL).
+     *
+     * @return true when the user is authenticated.
+     */
+    public static function isAuthenticated()
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        // call the isAuthenticated method of the $_PHPCAS_CLIENT object
+        $auth = self::$_PHPCAS_CLIENT->isAuthenticated();
+
+        // store where the authentication has been checked and the result
+        self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
+
+        phpCAS :: traceEnd($auth);
+        return $auth;
+    }
+
+    /**
+     * Checks whether authenticated based on $_SESSION. Useful to avoid
+     * server calls.
+     *
+     * @return bool true if authenticated, false otherwise.
+     * @since 0.4.22 by Brendan Arnold
+     */
+    public static function isSessionAuthenticated()
+    {
+        phpCAS::_validateClientExists();
+
+        return (self::$_PHPCAS_CLIENT->isSessionAuthenticated());
+    }
+
+    /**
+     * This method returns the CAS user's login name.
+     *
+     * @return string the login name of the authenticated user
+     * @warning should only be called after phpCAS::forceAuthentication()
+     * or phpCAS::checkAuthentication().
+     * */
+    public static function getUser()
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            return self::$_PHPCAS_CLIENT->getUser();
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * Answer attributes about the authenticated user.
+     *
+     * @warning should only be called after phpCAS::forceAuthentication()
+     * or phpCAS::checkAuthentication().
+     *
+     * @return array
+     */
+    public static function getAttributes()
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            return self::$_PHPCAS_CLIENT->getAttributes();
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * Answer true if there are attributes for the authenticated user.
+     *
+     * @warning should only be called after phpCAS::forceAuthentication()
+     * or phpCAS::checkAuthentication().
+     *
+     * @return bool
+     */
+    public static function hasAttributes()
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            return self::$_PHPCAS_CLIENT->hasAttributes();
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * Answer true if an attribute exists for the authenticated user.
+     *
+     * @param string $key attribute name
+     *
+     * @return bool
+     * @warning should only be called after phpCAS::forceAuthentication()
+     * or phpCAS::checkAuthentication().
+     */
+    public static function hasAttribute($key)
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            return self::$_PHPCAS_CLIENT->hasAttribute($key);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * Answer an attribute for the authenticated user.
+     *
+     * @param string $key attribute name
+     *
+     * @return mixed string for a single value or an array if multiple values exist.
+     * @warning should only be called after phpCAS::forceAuthentication()
+     * or phpCAS::checkAuthentication().
+     */
+    public static function getAttribute($key)
+    {
+        phpCAS::_validateClientExists();
+
+        try {
+            return self::$_PHPCAS_CLIENT->getAttribute($key);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * Handle logout requests.
+     *
+     * @param bool  $check_client    additional safety check
+     * @param array $allowed_clients array of allowed clients
+     *
+     * @return void
+     */
+    public static function handleLogoutRequests($check_client = true, $allowed_clients = false)
+    {
+        phpCAS::_validateClientExists();
+
+        return (self::$_PHPCAS_CLIENT->handleLogoutRequests($check_client, $allowed_clients));
+    }
+
+    /**
+     * This method returns the URL to be used to login.
+     * or phpCAS::isAuthenticated().
+     *
+     * @return the login name of the authenticated user
+     */
+    public static function getServerLoginURL()
+    {
+        phpCAS::_validateClientExists();
+
+        return self::$_PHPCAS_CLIENT->getServerLoginURL();
+    }
+
+    /**
+     * Set the login URL of the CAS server.
+     *
+     * @param string $url the login URL
+     *
+     * @return void
+     * @since 0.4.21 by Wyman Chan
+     */
+    public static function setServerLoginURL($url = '')
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setServerLoginURL($url);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Set the serviceValidate URL of the CAS server.
+     * Used only in CAS 1.0 validations
+     *
+     * @param string $url the serviceValidate URL
+     *
+     * @return void
+     */
+    public static function setServerServiceValidateURL($url = '')
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setServerServiceValidateURL($url);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Set the proxyValidate URL of the CAS server.
+     * Used for all CAS 2.0 validations
+     *
+     * @param string $url the proxyValidate URL
+     *
+     * @return void
+     */
+    public static function setServerProxyValidateURL($url = '')
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setServerProxyValidateURL($url);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Set the samlValidate URL of the CAS server.
+     *
+     * @param string $url the samlValidate URL
+     *
+     * @return void
+     */
+    public static function setServerSamlValidateURL($url = '')
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setServerSamlValidateURL($url);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method returns the URL to be used to login.
+     * or phpCAS::isAuthenticated().
+     *
+     * @return the login name of the authenticated user
+     */
+    public static function getServerLogoutURL()
+    {
+        phpCAS::_validateClientExists();
+
+        return self::$_PHPCAS_CLIENT->getServerLogoutURL();
+    }
+
+    /**
+     * Set the logout URL of the CAS server.
+     *
+     * @param string $url the logout URL
+     *
+     * @return void
+     * @since 0.4.21 by Wyman Chan
+     */
+    public static function setServerLogoutURL($url = '')
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setServerLogoutURL($url);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method is used to logout from CAS.
+     *
+     * @param string $params an array that contains the optional url and
+     * service parameters that will be passed to the CAS server
+     *
+     * @return void
+     */
+    public static function logout($params = "")
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        $parsedParams = array ();
+        if ($params != "") {
+            if (is_string($params)) {
+                phpCAS :: error('method `phpCAS::logout($url)\' is now deprecated, use `phpCAS::logoutWithUrl($url)\' instead');
+            }
+            if (!is_array($params)) {
+                phpCAS :: error('type mismatched for parameter $params (should be `array\')');
+            }
+            foreach ($params as $key => $value) {
+                if ($key != "service" && $key != "url") {
+                    phpCAS :: error('only `url\' and `service\' parameters are allowed for method `phpCAS::logout($params)\'');
+                }
+                $parsedParams[$key] = $value;
+            }
+        }
+        self::$_PHPCAS_CLIENT->logout($parsedParams);
+        // never reached
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method is used to logout from CAS. Halts by redirecting to the CAS
+     * server.
+     *
+     * @param service $service a URL that will be transmitted to the CAS server
+     *
+     * @return void
+     */
+    public static function logoutWithRedirectService($service)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        if (!is_string($service)) {
+            phpCAS :: error('type mismatched for parameter $service (should be `string\')');
+        }
+        self::$_PHPCAS_CLIENT->logout(array ( "service" => $service ));
+        // never reached
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method is used to logout from CAS. Halts by redirecting to the CAS
+     * server.
+     *
+     * @param string $url a URL that will be transmitted to the CAS server
+     *
+     * @return void
+     * @deprecated The url parameter has been removed from the CAS server as of
+     * version 3.3.5.1
+     */
+    public static function logoutWithUrl($url)
+    {
+        trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED);
+        phpCAS :: traceBegin();
+        if (!is_object(self::$_PHPCAS_CLIENT)) {
+            phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
+        }
+        if (!is_string($url)) {
+            phpCAS :: error('type mismatched for parameter $url (should be `string\')');
+        }
+        self::$_PHPCAS_CLIENT->logout(array ( "url" => $url ));
+        // never reached
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * This method is used to logout from CAS. Halts by redirecting to the CAS
+     * server.
+     *
+     * @param string $service a URL that will be transmitted to the CAS server
+     * @param string $url     a URL that will be transmitted to the CAS server
+     *
+     * @return void
+     *
+     * @deprecated The url parameter has been removed from the CAS server as of
+     * version 3.3.5.1
+     */
+    public static function logoutWithRedirectServiceAndUrl($service, $url)
+    {
+        trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED);
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        if (!is_string($service)) {
+            phpCAS :: error('type mismatched for parameter $service (should be `string\')');
+        }
+        if (!is_string($url)) {
+            phpCAS :: error('type mismatched for parameter $url (should be `string\')');
+        }
+        self::$_PHPCAS_CLIENT->logout(
+            array (
+                "service" => $service,
+                "url" => $url
+            )
+        );
+        // never reached
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Set the fixed URL that will be used by the CAS server to transmit the
+     * PGT. When this method is not called, a phpCAS script uses its own URL
+     * for the callback.
+     *
+     * @param string $url the URL
+     *
+     * @return void
+     */
+    public static function setFixedCallbackURL($url = '')
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setCallbackURL($url);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Set the fixed URL that will be set as the CAS service parameter. When this
+     * method is not called, a phpCAS script uses its own URL.
+     *
+     * @param string $url the URL
+     *
+     * @return void
+     */
+    public static function setFixedServiceURL($url)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateProxyExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setURL($url);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Get the URL that is set as the CAS service parameter.
+     *
+     * @return string Service Url
+     */
+    public static function getServiceURL()
+    {
+        phpCAS::_validateProxyExists();
+        return (self::$_PHPCAS_CLIENT->getURL());
+    }
+
+    /**
+     * Retrieve a Proxy Ticket from the CAS server.
+     *
+     * @param string $target_service Url string of service to proxy
+     * @param string &$err_code      error code
+     * @param string &$err_msg       error message
+     *
+     * @return string Proxy Ticket
+     */
+    public static function retrievePT($target_service, & $err_code, & $err_msg)
+    {
+        phpCAS::_validateProxyExists();
+
+        try {
+            return (self::$_PHPCAS_CLIENT->retrievePT($target_service, $err_code, $err_msg));
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+    }
+
+    /**
+     * Set the certificate of the CAS server CA and if the CN should be properly
+     * verified.
+     *
+     * @param string $cert        CA certificate file name
+     * @param bool   $validate_cn Validate CN in certificate (default true)
+     *
+     * @return void
+     */
+    public static function setCasServerCACert($cert, $validate_cn = true)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->setCasServerCACert($cert, $validate_cn);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Set no SSL validation for the CAS server.
+     *
+     * @return void
+     */
+    public static function setNoCasServerValidation()
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        phpCAS :: trace('You have configured no validation of the legitimacy of the cas server. This is not recommended for production use.');
+        self::$_PHPCAS_CLIENT->setNoCasServerValidation();
+        phpCAS :: traceEnd();
+    }
+
+
+    /**
+     * Disable the removal of a CAS-Ticket from the URL when authenticating
+     * DISABLING POSES A SECURITY RISK:
+     * We normally remove the ticket by an additional redirect as a security
+     * precaution to prevent a ticket in the HTTP_REFERRER or be carried over in
+     * the URL parameter
+     *
+     * @return void
+     */
+    public static function setNoClearTicketsFromUrl()
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        self::$_PHPCAS_CLIENT->setNoClearTicketsFromUrl();
+        phpCAS :: traceEnd();
+    }
+
+    /** @} */
+
+    /**
+     * Change CURL options.
+     * CURL is used to connect through HTTPS to CAS server
+     *
+     * @param string $key   the option key
+     * @param string $value the value to set
+     *
+     * @return void
+     */
+    public static function setExtraCurlOption($key, $value)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        self::$_PHPCAS_CLIENT->setExtraCurlOption($key, $value);
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * If you want your service to be proxied you have to enable it (default
+     * disabled) and define an accepable list of proxies that are allowed to
+     * proxy your service.
+     *
+     * Add each allowed proxy definition object. For the normal CAS_ProxyChain
+     * class, the constructor takes an array of proxies to match. The list is in
+     * reverse just as seen from the service. Proxies have to be defined in reverse
+     * from the service to the user. If a user hits service A and gets proxied via
+     * B to service C the list of acceptable on C would be array(B,A). The definition
+     * of an individual proxy can be either a string or a regexp (preg_match is used)
+     * that will be matched against the proxy list supplied by the cas server
+     * when validating the proxy tickets. The strings are compared starting from
+     * the beginning and must fully match with the proxies in the list.
+     * Example:
+     * 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+     *				'https://app.example.com/'
+     *			)));
+     * 		phpCAS::allowProxyChain(new CAS_ProxyChain(array(
+     *				'/^https:\/\/app[0-9]\.example\.com\/rest\//',
+     *				'http://client.example.com/'
+     *			)));
+     *
+     * For quick testing or in certain production screnarios you might want to
+     * allow allow any other valid service to proxy your service. To do so, add
+     * the "Any" chain:
+     *		phpcas::allowProxyChain(new CAS_ProxyChain_Any);
+     * THIS SETTING IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY
+     * IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER
+     * ON THIS SERVICE.
+     *
+     * @param CAS_ProxyChain_Interface $proxy_chain A proxy-chain that will be
+     * matched against the proxies requesting access
+     *
+     * @return void
+     */
+    public static function allowProxyChain(CAS_ProxyChain_Interface $proxy_chain)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        if (self::$_PHPCAS_CLIENT->getServerVersion() !== CAS_VERSION_2_0) {
+            phpCAS :: error('this method can only be used with the cas 2.0 protool');
+        }
+        self::$_PHPCAS_CLIENT->getAllowedProxyChains()->allowProxyChain($proxy_chain);
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Answer an array of proxies that are sitting in front of this application.
+     * This method will only return a non-empty array if we have received and
+     * validated a Proxy Ticket.
+     *
+     * @return array
+     * @access public
+     * @since 6/25/09
+     */
+    public static function getProxies ()
+    {
+        phpCAS::_validateProxyExists();
+
+        return(self::$_PHPCAS_CLIENT->getProxies());
+    }
+
+    // ########################################################################
+    // PGTIOU/PGTID and logoutRequest rebroadcasting
+    // ########################################################################
+
+    /**
+     * Add a pgtIou/pgtId and logoutRequest rebroadcast node.
+     *
+     * @param string $rebroadcastNodeUrl The rebroadcast node URL. Can be
+     * hostname or IP.
+     *
+     * @return void
+     */
+    public static function addRebroadcastNode($rebroadcastNodeUrl)
+    {
+        phpCAS::traceBegin();
+        phpCAS::log('rebroadcastNodeUrl:'.$rebroadcastNodeUrl);
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->addRebroadcastNode($rebroadcastNodeUrl);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS::traceEnd();
+    }
+
+    /**
+     * This method is used to add header parameters when rebroadcasting
+     * pgtIou/pgtId or logoutRequest.
+     *
+     * @param String $header Header to send when rebroadcasting.
+     *
+     * @return void
+     */
+    public static function addRebroadcastHeader($header)
+    {
+        phpCAS :: traceBegin();
+        phpCAS::_validateClientExists();
+
+        try {
+            self::$_PHPCAS_CLIENT->addRebroadcastHeader($header);
+        } catch (Exception $e) {
+            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
+        }
+
+        phpCAS :: traceEnd();
+    }
+
+    /**
+     * Checks if a client already exists
+     *
+     * @throws CAS_OutOfSequenceBeforeClientException
+     *
+     * @return void
+     */
+    private static function _validateClientExists()
+    {
+        if (!is_object(self::$_PHPCAS_CLIENT)) {
+            throw new CAS_OutOfSequenceBeforeClientException();
+        }
+    }
+
+    /**
+     * Checks of a proxy client aready exists
+     *
+     * @throws CAS_OutOfSequenceBeforeProxyException
+     *
+     * @return void
+     */
+    private static function _validateProxyExists()
+    {
+        if (!is_object(self::$_PHPCAS_CLIENT)) {
+            throw new CAS_OutOfSequenceBeforeProxyException();
+        }
+    }
+}
+// ########################################################################
+// DOCUMENTATION
+// ########################################################################
+
+// ########################################################################
+//  MAIN PAGE
+
+/**
+ * @mainpage
+ *
+ * The following pages only show the source documentation.
+ *
+ */
+
+// ########################################################################
+//  MODULES DEFINITION
+
+/** @defgroup public User interface */
+
+/** @defgroup publicInit Initialization
+ *  @ingroup public */
+
+/** @defgroup publicAuth Authentication
+ *  @ingroup public */
+
+/** @defgroup publicServices Access to external services
+ *  @ingroup public */
+
+/** @defgroup publicConfig Configuration
+ *  @ingroup public */
+
+/** @defgroup publicLang Internationalization
+ *  @ingroup publicConfig */
+
+/** @defgroup publicOutput HTML output
+ *  @ingroup publicConfig */
+
+/** @defgroup publicPGTStorage PGT storage
+ *  @ingroup publicConfig */
+
+/** @defgroup publicDebug Debugging
+ *  @ingroup public */
+
+/** @defgroup internal Implementation */
+
+/** @defgroup internalAuthentication Authentication
+ *  @ingroup internal */
+
+/** @defgroup internalBasic CAS Basic client features (CAS 1.0, Service Tickets)
+ *  @ingroup internal */
+
+/** @defgroup internalProxy CAS Proxy features (CAS 2.0, Proxy Granting Tickets)
+ *  @ingroup internal */
+
+/** @defgroup internalSAML CAS SAML features (SAML 1.1)
+ *  @ingroup internal */
+
+/** @defgroup internalPGTStorage PGT storage
+ *  @ingroup internalProxy */
+
+/** @defgroup internalPGTStorageDb PGT storage in a database
+ *  @ingroup internalPGTStorage */
+
+/** @defgroup internalPGTStorageFile PGT storage on the filesystem
+ *  @ingroup internalPGTStorage */
+
+/** @defgroup internalCallback Callback from the CAS server
+ *  @ingroup internalProxy */
+
+/** @defgroup internalProxyServices Proxy other services
+ *  @ingroup internalProxy */
+
+/** @defgroup internalService CAS client features (CAS 2.0, Proxied service)
+ *  @ingroup internal */
+
+/** @defgroup internalConfig Configuration
+ *  @ingroup internal */
+
+/** @defgroup internalBehave Internal behaviour of phpCAS
+ *  @ingroup internalConfig */
+
+/** @defgroup internalOutput HTML output
+ *  @ingroup internalConfig */
+
+/** @defgroup internalLang Internationalization
+ *  @ingroup internalConfig
+ *
+ * To add a new language:
+ * - 1. define a new constant PHPCAS_LANG_XXXXXX in CAS/CAS.php
+ * - 2. copy any file from CAS/languages to CAS/languages/XXXXXX.php
+ * - 3. Make the translations
+ */
+
+/** @defgroup internalDebug Debugging
+ *  @ingroup internal */
+
+/** @defgroup internalMisc Miscellaneous
+ *  @ingroup internal */
+
+// ########################################################################
+//  EXAMPLES
+
+/**
+ * @example example_simple.php
+ */
+/**
+ * @example example_service.php
+ */
+/**
+ * @example example_service_that_proxies.php
+ */
+/**
+ * @example example_service_POST.php
+ */
+/**
+ * @example example_proxy_serviceWeb.php
+ */
+/**
+ * @example example_proxy_serviceWeb_chaining.php
+ */
+/**
+ * @example example_proxy_POST.php
+ */
+/**
+ * @example example_proxy_GET.php
+ */
+/**
+ * @example example_lang.php
+ */
+/**
+ * @example example_html.php
+ */
+/**
+ * @example example_pgt_storage_file.php
+ */
+/**
+ * @example example_pgt_storage_db.php
+ */
+/**
+ * @example example_gateway.php
+ */
+/**
+ * @example example_logout.php
+ */
+/**
+ * @example example_rebroadcast.php
+ */
+/**
+ * @example example_custom_urls.php
+ */
+/**
+ * @example example_advanced_saml11.php
+ */
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/AuthenticationException.php b/vendor/jasig/phpcas/source/CAS/AuthenticationException.php
new file mode 100644
index 00000000000..801156e881c
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/AuthenticationException.php
@@ -0,0 +1,107 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/AuthenticationException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines methods that allow proxy-authenticated service handlers
+ * to interact with phpCAS.
+ *
+ * Proxy service handlers must implement this interface as well as call
+ * phpCAS::initializeProxiedService($this) at some point in their implementation.
+ *
+ * While not required, proxy-authenticated service handlers are encouraged to
+ * implement the CAS_ProxiedService_Testable interface to facilitate unit testing.
+ *
+ * @class    CAS_AuthenticationException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class CAS_AuthenticationException
+extends RuntimeException
+implements CAS_Exception
+{
+
+    /**
+     * This method is used to print the HTML output when the user was not
+     * authenticated.
+     *
+     * @param CAS_Client $client       phpcas client
+     * @param string     $failure      the failure that occured
+     * @param string     $cas_url      the URL the CAS server was asked for
+     * @param bool       $no_response  the response from the CAS server (other
+     * parameters are ignored if TRUE)
+     * @param bool       $bad_response bad response from the CAS server ($err_code
+     * and $err_msg ignored if TRUE)
+     * @param string     $cas_response the response of the CAS server
+     * @param int        $err_code     the error code given by the CAS server
+     * @param string     $err_msg      the error message given by the CAS server
+     */
+    public function __construct($client,$failure,$cas_url,$no_response,
+        $bad_response='',$cas_response='',$err_code='',$err_msg=''
+    ) {
+        phpCAS::traceBegin();
+        $lang = $client->getLangObj();
+        $client->printHTMLHeader($lang->getAuthenticationFailed());
+        printf(
+            $lang->getYouWereNotAuthenticated(),
+            htmlentities($client->getURL()),
+            $_SERVER['SERVER_ADMIN']
+        );
+        phpCAS::trace('CAS URL: '.$cas_url);
+        phpCAS::trace('Authentication failure: '.$failure);
+        if ( $no_response ) {
+            phpCAS::trace('Reason: no response from the CAS server');
+        } else {
+            if ( $bad_response ) {
+                phpCAS::trace('Reason: bad response from the CAS server');
+            } else {
+                switch ($client->getServerVersion()) {
+                case CAS_VERSION_1_0:
+                    phpCAS::trace('Reason: CAS error');
+                    break;
+                case CAS_VERSION_2_0:
+                    if ( empty($err_code) ) {
+                        phpCAS::trace('Reason: no CAS error');
+                    } else {
+                        phpCAS::trace('Reason: ['.$err_code.'] CAS error: '.$err_msg);
+                    }
+                    break;
+                }
+            }
+            phpCAS::trace('CAS response: '.$cas_response);
+        }
+        $client->printHTMLFooter();
+        phpCAS::traceExit();
+    }
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/Autoload.php b/vendor/jasig/phpcas/source/CAS/Autoload.php
new file mode 100644
index 00000000000..e56dbdfa93f
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Autoload.php
@@ -0,0 +1,105 @@
+<?php
+
+/**
+ * Autoloader Class
+ *
+ *  PHP Version 5
+ *
+ * @file      CAS/Autoload.php
+ * @category  Authentication
+ * @package   SimpleCAS
+ * @author    Brett Bieber <brett.bieber@gmail.com>
+ * @copyright 2008 Regents of the University of Nebraska
+ * @license   http://www1.unl.edu/wdn/wiki/Software_License BSD License
+ * @link      http://code.google.com/p/simplecas/
+ **/
+
+/**
+ * Autoload a class
+ *
+ * @param string $class Classname to load
+ *
+ * @return bool
+ */
+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_') {
+        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/' );
+    }
+
+    // Declare local variable to store the expected full path to the file
+
+    foreach ($include_path as $path) {
+        $file_path = $path . '/' . str_replace('_', '/', $class) . '.php';
+        $fp = @fopen($file_path, 'r', true);
+        if ($fp) {
+            fclose($fp);
+            include $file_path;
+            if (!class_exists($class, false) && !interface_exists($class, false)) {
+                die(
+                    new Exception(
+                        'Class ' . $class . ' was not present in ' .
+                        $file_path .
+                        ' [CAS_autoload]'
+                    )
+                );
+            }
+            return true;
+        }
+    }
+    $e = new Exception(
+        'Class ' . $class . ' could not be loaded from ' .
+        $file_path . ', file does not exist (Path="'
+        . implode(':', $include_path) .'") [CAS_autoload]'
+    );
+    $trace = $e->getTrace();
+    if (isset($trace[2]) && isset($trace[2]['function'])
+        && in_array($trace[2]['function'], array('class_exists', 'interface_exists'))
+    ) {
+        return false;
+    }
+    if (isset($trace[1]) && isset($trace[1]['function'])
+        && in_array($trace[1]['function'], array('class_exists', 'interface_exists'))
+    ) {
+        return false;
+    }
+    die ((string) $e);
+}
+
+// set up __autoload
+if (function_exists('spl_autoload_register')) {
+    if (!(spl_autoload_functions())
+        || !in_array('CAS_autoload', spl_autoload_functions())
+    ) {
+        spl_autoload_register('CAS_autoload');
+        if (function_exists('__autoload')
+            && !in_array('__autoload', spl_autoload_functions())
+        ) {
+            // __autoload() was being used, but now would be ignored, add
+            // it to the autoload stack
+            spl_autoload_register('__autoload');
+        }
+    }
+} elseif (!function_exists('__autoload')) {
+
+    /**
+     * Autoload a class
+     *
+     * @param string $class Class name
+     *
+     * @return bool
+     */
+    function __autoload($class)
+    {
+        return CAS_autoload($class);
+    }
+}
+
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/Client.php b/vendor/jasig/phpcas/source/CAS/Client.php
new file mode 100755
index 00000000000..b0efc1b48e0
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Client.php
@@ -0,0 +1,3824 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Client.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @author   Olivier Berger <olivier.berger@it-sudparis.eu>
+ * @author   Brett Bieber <brett.bieber@gmail.com>
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * The CAS_Client class is a client interface that provides CAS authentication
+ * to PHP applications.
+ *
+ * @class    CAS_Client
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @author   Olivier Berger <olivier.berger@it-sudparis.eu>
+ * @author   Brett Bieber <brett.bieber@gmail.com>
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ */
+
+class CAS_Client
+{
+
+    // ########################################################################
+    //  HTML OUTPUT
+    // ########################################################################
+    /**
+    * @addtogroup internalOutput
+    * @{
+    */
+
+    /**
+     * This method filters a string by replacing special tokens by appropriate values
+     * and prints it. The corresponding tokens are taken into account:
+     * - __CAS_VERSION__
+     * - __PHPCAS_VERSION__
+     * - __SERVER_BASE_URL__
+     *
+     * Used by CAS_Client::PrintHTMLHeader() and CAS_Client::printHTMLFooter().
+     *
+     * @param string $str the string to filter and output
+     *
+     * @return void
+     */
+    private function _htmlFilterOutput($str)
+    {
+        $str = str_replace('__CAS_VERSION__', $this->getServerVersion(), $str);
+        $str = str_replace('__PHPCAS_VERSION__', phpCAS::getVersion(), $str);
+        $str = str_replace('__SERVER_BASE_URL__', $this->_getServerBaseURL(), $str);
+        echo $str;
+    }
+
+    /**
+     * A string used to print the header of HTML pages. Written by
+     * CAS_Client::setHTMLHeader(), read by CAS_Client::printHTMLHeader().
+     *
+     * @hideinitializer
+     * @see CAS_Client::setHTMLHeader, CAS_Client::printHTMLHeader()
+     */
+    private $_output_header = '';
+
+    /**
+     * This method prints the header of the HTML output (after filtering). If
+     * CAS_Client::setHTMLHeader() was not used, a default header is output.
+     *
+     * @param string $title the title of the page
+     *
+     * @return void
+     * @see _htmlFilterOutput()
+     */
+    public function printHTMLHeader($title)
+    {
+        $this->_htmlFilterOutput(
+            str_replace(
+                '__TITLE__', $title,
+                (empty($this->_output_header)
+                ? '<html><head><title>__TITLE__</title></head><body><h1>__TITLE__</h1>'
+                : $this->_output_header)
+            )
+        );
+    }
+
+    /**
+     * A string used to print the footer of HTML pages. Written by
+     * CAS_Client::setHTMLFooter(), read by printHTMLFooter().
+     *
+     * @hideinitializer
+     * @see CAS_Client::setHTMLFooter, CAS_Client::printHTMLFooter()
+     */
+    private $_output_footer = '';
+
+    /**
+     * This method prints the footer of the HTML output (after filtering). If
+     * CAS_Client::setHTMLFooter() was not used, a default footer is output.
+     *
+     * @return void
+     * @see _htmlFilterOutput()
+     */
+    public function printHTMLFooter()
+    {
+        $lang = $this->getLangObj();
+        $this->_htmlFilterOutput(
+            empty($this->_output_footer)?
+            ('<hr><address>phpCAS __PHPCAS_VERSION__ '
+            .$lang->getUsingServer()
+            .' <a href="__SERVER_BASE_URL__">__SERVER_BASE_URL__</a> (CAS __CAS_VERSION__)</a></address></body></html>')
+            :$this->_output_footer
+        );
+    }
+
+    /**
+     * This method set the HTML header used for all outputs.
+     *
+     * @param string $header the HTML header.
+     *
+     * @return void
+     */
+    public function setHTMLHeader($header)
+    {
+    	// Argument Validation
+    	if (gettype($header) != 'string')
+        	throw new CAS_TypeMismatchException($header, '$header', 'string');
+
+        $this->_output_header = $header;
+    }
+
+    /**
+     * This method set the HTML footer used for all outputs.
+     *
+     * @param string $footer the HTML footer.
+     *
+     * @return void
+     */
+    public function setHTMLFooter($footer)
+    {
+    	// Argument Validation
+    	if (gettype($footer) != 'string')
+        	throw new CAS_TypeMismatchException($footer, '$footer', 'string');
+
+        $this->_output_footer = $footer;
+    }
+
+
+    /** @} */
+
+
+    // ########################################################################
+    //  INTERNATIONALIZATION
+    // ########################################################################
+    /**
+    * @addtogroup internalLang
+    * @{
+    */
+    /**
+     * A string corresponding to the language used by phpCAS. Written by
+     * CAS_Client::setLang(), read by CAS_Client::getLang().
+
+     * @note debugging information is always in english (debug purposes only).
+     */
+    private $_lang = PHPCAS_LANG_DEFAULT;
+
+    /**
+     * This method is used to set the language used by phpCAS.
+     *
+     * @param string $lang representing the language.
+     *
+     * @return void
+     */
+    public function setLang($lang)
+    {
+    	// Argument Validation
+    	if (gettype($lang) != 'string')
+        	throw new CAS_TypeMismatchException($lang, '$lang', 'string');
+
+        phpCAS::traceBegin();
+        $obj = new $lang();
+        if (!($obj instanceof CAS_Languages_LanguageInterface)) {
+            throw new CAS_InvalidArgumentException(
+                '$className must implement the CAS_Languages_LanguageInterface'
+            );
+        }
+        $this->_lang = $lang;
+        phpCAS::traceEnd();
+    }
+    /**
+     * Create the language
+     *
+     * @return CAS_Languages_LanguageInterface object implementing the class
+     */
+    public function getLangObj()
+    {
+        $classname = $this->_lang;
+        return new $classname();
+    }
+
+    /** @} */
+    // ########################################################################
+    //  CAS SERVER CONFIG
+    // ########################################################################
+    /**
+    * @addtogroup internalConfig
+    * @{
+    */
+
+    /**
+     * a record to store information about the CAS server.
+     * - $_server['version']: the version of the CAS server
+     * - $_server['hostname']: the hostname of the CAS server
+     * - $_server['port']: the port the CAS server is running on
+     * - $_server['uri']: the base URI the CAS server is responding on
+     * - $_server['base_url']: the base URL of the CAS server
+     * - $_server['login_url']: the login URL of the CAS server
+     * - $_server['service_validate_url']: the service validating URL of the
+     *   CAS server
+     * - $_server['proxy_url']: the proxy URL of the CAS server
+     * - $_server['proxy_validate_url']: the proxy validating URL of the CAS server
+     * - $_server['logout_url']: the logout URL of the CAS server
+     *
+     * $_server['version'], $_server['hostname'], $_server['port'] and
+     * $_server['uri'] are written by CAS_Client::CAS_Client(), read by
+     * CAS_Client::getServerVersion(), CAS_Client::_getServerHostname(),
+     * CAS_Client::_getServerPort() and CAS_Client::_getServerURI().
+     *
+     * The other fields are written and read by CAS_Client::_getServerBaseURL(),
+     * CAS_Client::getServerLoginURL(), CAS_Client::getServerServiceValidateURL(),
+     * CAS_Client::getServerProxyValidateURL() and CAS_Client::getServerLogoutURL().
+     *
+     * @hideinitializer
+     */
+    private $_server = array(
+        'version' => -1,
+        'hostname' => 'none',
+        'port' => -1,
+        'uri' => 'none');
+
+    /**
+     * This method is used to retrieve the version of the CAS server.
+     *
+     * @return string the version of the CAS server.
+     */
+    public function getServerVersion()
+    {
+        return $this->_server['version'];
+    }
+
+    /**
+     * This method is used to retrieve the hostname of the CAS server.
+     *
+     * @return string the hostname of the CAS server.
+     */
+    private function _getServerHostname()
+    {
+        return $this->_server['hostname'];
+    }
+
+    /**
+     * This method is used to retrieve the port of the CAS server.
+     *
+     * @return string the port of the CAS server.
+     */
+    private function _getServerPort()
+    {
+        return $this->_server['port'];
+    }
+
+    /**
+     * This method is used to retrieve the URI of the CAS server.
+     *
+     * @return string a URI.
+     */
+    private function _getServerURI()
+    {
+        return $this->_server['uri'];
+    }
+
+    /**
+     * This method is used to retrieve the base URL of the CAS server.
+     *
+     * @return string a URL.
+     */
+    private function _getServerBaseURL()
+    {
+        // the URL is build only when needed
+        if ( empty($this->_server['base_url']) ) {
+            $this->_server['base_url'] = 'https://' . $this->_getServerHostname();
+            if ($this->_getServerPort()!=443) {
+                $this->_server['base_url'] .= ':'
+                .$this->_getServerPort();
+            }
+            $this->_server['base_url'] .= $this->_getServerURI();
+        }
+        return $this->_server['base_url'];
+    }
+
+    /**
+     * This method is used to retrieve the login URL of the CAS server.
+     *
+     * @param bool $gateway true to check authentication, false to force it
+     * @param bool $renew   true to force the authentication with the CAS server
+     *
+     * @return a URL.
+     * @note It is recommended that CAS implementations ignore the "gateway"
+     * parameter if "renew" is set
+     */
+    public function getServerLoginURL($gateway=false,$renew=false)
+    {
+        phpCAS::traceBegin();
+        // the URL is build only when needed
+        if ( empty($this->_server['login_url']) ) {
+            $this->_server['login_url'] = $this->_getServerBaseURL();
+            $this->_server['login_url'] .= 'login?service=';
+            $this->_server['login_url'] .= urlencode($this->getURL());
+        }
+        $url = $this->_server['login_url'];
+        if ($renew) {
+            // It is recommended that when the "renew" parameter is set, its
+            // value be "true"
+            $url = $this->_buildQueryUrl($url, 'renew=true');
+        } elseif ($gateway) {
+            // It is recommended that when the "gateway" parameter is set, its
+            // value be "true"
+            $url = $this->_buildQueryUrl($url, 'gateway=true');
+        }
+        phpCAS::traceEnd($url);
+        return $url;
+    }
+
+    /**
+     * This method sets the login URL of the CAS server.
+     *
+     * @param string $url the login URL
+     *
+     * @return string login url
+     */
+    public function setServerLoginURL($url)
+    {
+    	// Argument Validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        return $this->_server['login_url'] = $url;
+    }
+
+
+    /**
+     * This method sets the serviceValidate URL of the CAS server.
+     *
+     * @param string $url the serviceValidate URL
+     *
+     * @return string serviceValidate URL
+     */
+    public function setServerServiceValidateURL($url)
+    {
+    	// Argument Validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        return $this->_server['service_validate_url'] = $url;
+    }
+
+
+    /**
+     * This method sets the proxyValidate URL of the CAS server.
+     *
+     * @param string $url the proxyValidate URL
+     *
+     * @return string proxyValidate URL
+     */
+    public function setServerProxyValidateURL($url)
+    {
+    	// Argument Validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        return $this->_server['proxy_validate_url'] = $url;
+    }
+
+
+    /**
+     * This method sets the samlValidate URL of the CAS server.
+     *
+     * @param string $url the samlValidate URL
+     *
+     * @return string samlValidate URL
+     */
+    public function setServerSamlValidateURL($url)
+    {
+    	// Argument Validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        return $this->_server['saml_validate_url'] = $url;
+    }
+
+
+    /**
+     * This method is used to retrieve the service validating URL of the CAS server.
+     *
+     * @return string serviceValidate URL.
+     */
+    public function getServerServiceValidateURL()
+    {
+        phpCAS::traceBegin();
+        // the URL is build only when needed
+        if ( empty($this->_server['service_validate_url']) ) {
+            switch ($this->getServerVersion()) {
+            case CAS_VERSION_1_0:
+                $this->_server['service_validate_url'] = $this->_getServerBaseURL()
+                .'validate';
+                break;
+            case CAS_VERSION_2_0:
+                $this->_server['service_validate_url'] = $this->_getServerBaseURL()
+                .'serviceValidate';
+                break;
+            }
+        }
+        $url = $this->_buildQueryUrl(
+            $this->_server['service_validate_url'],
+            'service='.urlencode($this->getURL())
+        );
+        phpCAS::traceEnd($url);
+        return $url;
+    }
+    /**
+     * This method is used to retrieve the SAML validating URL of the CAS server.
+     *
+     * @return string samlValidate URL.
+     */
+    public function getServerSamlValidateURL()
+    {
+        phpCAS::traceBegin();
+        // the URL is build only when needed
+        if ( empty($this->_server['saml_validate_url']) ) {
+            switch ($this->getServerVersion()) {
+            case SAML_VERSION_1_1:
+                $this->_server['saml_validate_url'] = $this->_getServerBaseURL().'samlValidate';
+                break;
+            }
+        }
+
+        $url = $this->_buildQueryUrl(
+            $this->_server['saml_validate_url'],
+            'TARGET='.urlencode($this->getURL())
+        );
+        phpCAS::traceEnd($url);
+        return $url;
+    }
+
+    /**
+     * This method is used to retrieve the proxy validating URL of the CAS server.
+     *
+     * @return string proxyValidate URL.
+     */
+    public function getServerProxyValidateURL()
+    {
+        phpCAS::traceBegin();
+        // the URL is build only when needed
+        if ( empty($this->_server['proxy_validate_url']) ) {
+            switch ($this->getServerVersion()) {
+            case CAS_VERSION_1_0:
+                $this->_server['proxy_validate_url'] = '';
+                break;
+            case CAS_VERSION_2_0:
+                $this->_server['proxy_validate_url'] = $this->_getServerBaseURL().'proxyValidate';
+                break;
+            }
+        }
+        $url = $this->_buildQueryUrl(
+            $this->_server['proxy_validate_url'],
+            'service='.urlencode($this->getURL())
+        );
+        phpCAS::traceEnd($url);
+        return $url;
+    }
+
+
+    /**
+     * This method is used to retrieve the proxy URL of the CAS server.
+     *
+     * @return  string proxy URL.
+     */
+    public function getServerProxyURL()
+    {
+        // the URL is build only when needed
+        if ( empty($this->_server['proxy_url']) ) {
+            switch ($this->getServerVersion()) {
+            case CAS_VERSION_1_0:
+                $this->_server['proxy_url'] = '';
+                break;
+            case CAS_VERSION_2_0:
+                $this->_server['proxy_url'] = $this->_getServerBaseURL().'proxy';
+                break;
+            }
+        }
+        return $this->_server['proxy_url'];
+    }
+
+    /**
+     * This method is used to retrieve the logout URL of the CAS server.
+     *
+     * @return string logout URL.
+     */
+    public function getServerLogoutURL()
+    {
+        // the URL is build only when needed
+        if ( empty($this->_server['logout_url']) ) {
+            $this->_server['logout_url'] = $this->_getServerBaseURL().'logout';
+        }
+        return $this->_server['logout_url'];
+    }
+
+    /**
+     * This method sets the logout URL of the CAS server.
+     *
+     * @param string $url the logout URL
+     *
+     * @return string logout url
+     */
+    public function setServerLogoutURL($url)
+    {
+    	// Argument Validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        return $this->_server['logout_url'] = $url;
+    }
+
+    /**
+     * An array to store extra curl options.
+     */
+    private $_curl_options = array();
+
+    /**
+     * This method is used to set additional user curl options.
+     *
+     * @param string $key   name of the curl option
+     * @param string $value value of the curl option
+     *
+     * @return void
+     */
+    public function setExtraCurlOption($key, $value)
+    {
+        $this->_curl_options[$key] = $value;
+    }
+
+    /** @} */
+
+    // ########################################################################
+    //  Change the internal behaviour of phpcas
+    // ########################################################################
+
+    /**
+     * @addtogroup internalBehave
+     * @{
+     */
+
+    /**
+     * The class to instantiate for making web requests in readUrl().
+     * The class specified must implement the CAS_Request_RequestInterface.
+     * By default CAS_Request_CurlRequest is used, but this may be overridden to
+     * supply alternate request mechanisms for testing.
+     */
+    private $_requestImplementation = 'CAS_Request_CurlRequest';
+
+    /**
+     * Override the default implementation used to make web requests in readUrl().
+     * This class must implement the CAS_Request_RequestInterface.
+     *
+     * @param string $className name of the RequestImplementation class
+     *
+     * @return void
+     */
+    public function setRequestImplementation ($className)
+    {
+        $obj = new $className;
+        if (!($obj instanceof CAS_Request_RequestInterface)) {
+            throw new CAS_InvalidArgumentException(
+                '$className must implement the CAS_Request_RequestInterface'
+            );
+        }
+        $this->_requestImplementation = $className;
+    }
+
+    /**
+     * @var boolean $_clearTicketsFromUrl; If true, phpCAS will clear session
+     * tickets from the URL after a successful authentication.
+     */
+    private $_clearTicketsFromUrl = true;
+
+    /**
+     * Configure the client to not send redirect headers and call exit() on
+     * authentication success. The normal redirect is used to remove the service
+     * ticket from the client's URL, but for running unit tests we need to
+     * continue without exiting.
+     *
+     * Needed for testing authentication
+     *
+     * @return void
+     */
+    public function setNoClearTicketsFromUrl ()
+    {
+        $this->_clearTicketsFromUrl = false;
+    }
+
+    /**
+     * @var callback $_postAuthenticateCallbackFunction;
+     */
+    private $_postAuthenticateCallbackFunction = null;
+
+    /**
+     * @var array $_postAuthenticateCallbackArgs;
+     */
+    private $_postAuthenticateCallbackArgs = array();
+
+    /**
+     * Set a callback function to be run when a user authenticates.
+     *
+     * The callback function will be passed a $logoutTicket as its first parameter,
+     * followed by any $additionalArgs you pass. The $logoutTicket parameter is an
+     * opaque string that can be used to map a session-id to the logout request
+     * in order to support single-signout in applications that manage their own
+     * sessions (rather than letting phpCAS start the session).
+     *
+     * phpCAS::forceAuthentication() will always exit and forward client unless
+     * they are already authenticated. To perform an action at the moment the user
+     * logs in (such as registering an account, performing logging, etc), register
+     * a callback function here.
+     *
+     * @param string $function       callback function to call
+     * @param array  $additionalArgs optional array of arguments
+     *
+     * @return void
+     */
+    public function setPostAuthenticateCallback ($function, array $additionalArgs = array())
+    {
+        $this->_postAuthenticateCallbackFunction = $function;
+        $this->_postAuthenticateCallbackArgs = $additionalArgs;
+    }
+
+    /**
+     * @var callback $_signoutCallbackFunction;
+     */
+    private $_signoutCallbackFunction = null;
+
+    /**
+     * @var array $_signoutCallbackArgs;
+     */
+    private $_signoutCallbackArgs = array();
+
+    /**
+     * Set a callback function to be run when a single-signout request is received.
+     *
+     * The callback function will be passed a $logoutTicket as its first parameter,
+     * followed by any $additionalArgs you pass. The $logoutTicket parameter is an
+     * opaque string that can be used to map a session-id to the logout request in
+     * order to support single-signout in applications that manage their own sessions
+     * (rather than letting phpCAS start and destroy the session).
+     *
+     * @param string $function       callback function to call
+     * @param array  $additionalArgs optional array of arguments
+     *
+     * @return void
+     */
+    public function setSingleSignoutCallback ($function, array $additionalArgs = array())
+    {
+        $this->_signoutCallbackFunction = $function;
+        $this->_signoutCallbackArgs = $additionalArgs;
+    }
+
+    // ########################################################################
+    //  Methods for supplying code-flow feedback to integrators.
+    // ########################################################################
+
+    /**
+     * Ensure that this is actually a proxy object or fail with an exception
+     *
+     * @throws CAS_OutOfSequenceProxyException
+     *
+     * @return void
+     */
+    public function ensureIsProxy()
+    {
+        if (!$this->isProxy()) {
+            throw new CAS_OutOfSequenceProxyException();
+        }
+    }
+
+    /**
+     * Mark the caller of authentication. This will help client integraters determine
+     * problems with their code flow if they call a function such as getUser() before
+     * authentication has occurred.
+     *
+     * @param bool $auth True if authentication was successful, false otherwise.
+     *
+     * @return null
+     */
+    public function markAuthenticationCall ($auth)
+    {
+        // store where the authentication has been checked and the result
+        $dbg = debug_backtrace();
+        $this->_authentication_caller = array (
+            'file' => $dbg[1]['file'],
+            'line' => $dbg[1]['line'],
+            'method' => $dbg[1]['class'] . '::' . $dbg[1]['function'],
+            'result' => (boolean)$auth
+        );
+    }
+    private $_authentication_caller;
+
+    /**
+     * Answer true if authentication has been checked.
+     *
+     * @return bool
+     */
+    public function wasAuthenticationCalled ()
+    {
+        return !empty($this->_authentication_caller);
+    }
+
+    /**
+     * Ensure that authentication was checked. Terminate with exception if no
+     * authentication was performed
+     *
+     * @throws CAS_OutOfSequenceBeforeAuthenticationCallException
+     *
+     * @return void
+     */
+    private function ensureAuthenticationCalled()
+    {
+        if (!$this->wasAuthenticationCalled()) {
+            throw new CAS_OutOfSequenceBeforeAuthenticationCallException();
+        }
+    }
+
+    /**
+     * Answer the result of the authentication call.
+     *
+     * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false
+     * and markAuthenticationCall() didn't happen.
+     *
+     * @return bool
+     */
+    public function wasAuthenticationCallSuccessful ()
+    {
+        $this->ensureAuthenticationCalled();
+        return $this->_authentication_caller['result'];
+    }
+
+
+    /**
+     * Ensure that authentication was checked. Terminate with exception if no
+     * authentication was performed
+     *
+     * @throws CAS_OutOfSequenceBeforeAuthenticationCallException
+     *
+     * @return void
+     */
+    public function ensureAuthenticationCallSuccessful()
+    {
+        $this->ensureAuthenticationCalled();
+        if (!$this->_authentication_caller['result']) {
+            throw new CAS_OutOfSequenceException(
+                'authentication was checked (by '
+                . $this->getAuthenticationCallerMethod()
+                . '() at ' . $this->getAuthenticationCallerFile()
+                . ':' . $this->getAuthenticationCallerLine()
+                . ') but the method returned false'
+            );
+        }
+    }
+
+    /**
+     * Answer information about the authentication caller.
+     *
+     * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false
+     * and markAuthenticationCall() didn't happen.
+     *
+     * @return array Keys are 'file', 'line', and 'method'
+     */
+    public function getAuthenticationCallerFile ()
+    {
+        $this->ensureAuthenticationCalled();
+        return $this->_authentication_caller['file'];
+    }
+
+    /**
+     * Answer information about the authentication caller.
+     *
+     * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false
+     * and markAuthenticationCall() didn't happen.
+     *
+     * @return array Keys are 'file', 'line', and 'method'
+     */
+    public function getAuthenticationCallerLine ()
+    {
+        $this->ensureAuthenticationCalled();
+        return $this->_authentication_caller['line'];
+    }
+
+    /**
+     * Answer information about the authentication caller.
+     *
+     * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false
+     * and markAuthenticationCall() didn't happen.
+     *
+     * @return array Keys are 'file', 'line', and 'method'
+     */
+    public function getAuthenticationCallerMethod ()
+    {
+        $this->ensureAuthenticationCalled();
+        return $this->_authentication_caller['method'];
+    }
+
+    /** @} */
+
+    // ########################################################################
+    //  CONSTRUCTOR
+    // ########################################################################
+    /**
+    * @addtogroup internalConfig
+    * @{
+    */
+
+    /**
+     * 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)
+     *
+     * @return a newly created CAS_Client object
+     */
+    public function __construct(
+        $server_version,
+        $proxy,
+        $server_hostname,
+        $server_port,
+        $server_uri,
+        $changeSessionID = true
+    ) {
+		// Argument validation
+        if (gettype($server_version) != 'string')
+        	throw new CAS_TypeMismatchException($server_version, '$server_version', 'string');
+        if (gettype($proxy) != 'boolean')
+        	throw new CAS_TypeMismatchException($proxy, '$proxy', 'boolean');
+        if (gettype($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');
+        if (gettype($server_uri) != 'string')
+        	throw new CAS_TypeMismatchException($server_uri, '$server_uri', 'string');
+        if (gettype($changeSessionID) != 'boolean')
+        	throw new CAS_TypeMismatchException($changeSessionID, '$changeSessionID', 'boolean');
+
+        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
+        $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());
+        }
+
+        // are we in proxy mode ?
+        $this->_proxy = $proxy;
+
+        // 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();
+            }
+            $this->_serviceCookieJar = new CAS_CookieJar(
+                $_SESSION['phpCAS']['service_cookies']
+            );
+        }
+
+        //check version
+        switch ($server_version) {
+        case CAS_VERSION_1_0:
+            if ( $this->isProxy() ) {
+                phpCAS::error(
+                    'CAS proxies are not supported in CAS '.$server_version
+                );
+            }
+            break;
+        case CAS_VERSION_2_0:
+            break;
+        case SAML_VERSION_1_1:
+            break;
+        default:
+            phpCAS::error(
+                'this version of CAS (`'.$server_version
+                .'\') is not supported by phpCAS '.phpCAS::getVersion()
+            );
+        }
+        $this->_server['version'] = $server_version;
+
+        // check hostname
+        if ( empty($server_hostname)
+            || !preg_match('/[\.\d\-abcdefghijklmnopqrstuvwxyz]*/', $server_hostname)
+        ) {
+            phpCAS::error('bad CAS server hostname (`'.$server_hostname.'\')');
+        }
+        $this->_server['hostname'] = $server_hostname;
+
+        // check port
+        if ( $server_port == 0
+            || !is_int($server_port)
+        ) {
+            phpCAS::error('bad CAS server port (`'.$server_hostname.'\')');
+        }
+        $this->_server['port'] = $server_port;
+
+        // check URI
+        if ( !preg_match('/[\.\d\-_abcdefghijklmnopqrstuvwxyz\/]*/', $server_uri) ) {
+            phpCAS::error('bad CAS server URI (`'.$server_uri.'\')');
+        }
+        // add leading and trailing `/' and remove doubles
+        $server_uri = preg_replace('/\/\//', '/', '/'.$server_uri.'/');
+        $this->_server['uri'] = $server_uri;
+
+        // 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 ( $this->_isCallbackMode() ) {
+            //callback mode: check that phpCAS is secured
+            if ( !$this->_isHttps() ) {
+                phpCAS::error(
+                    'CAS proxies must be secured to use phpCAS; PGT\'s will not be received from the CAS server'
+                );
+            }
+        } else {
+            //normal mode: get ticket and remove it from CGI parameters for
+            // developers
+            $ticket = (isset($_GET['ticket']) ? $_GET['ticket'] : null);
+            if (preg_match('/^[SP]T-/', $ticket) ) {
+                phpCAS::trace('Ticket \''.$ticket.'\' found');
+                $this->setTicket($ticket);
+                unset($_GET['ticket']);
+            } else if ( !empty($ticket) ) {
+                //ill-formed ticket, halt
+                phpCAS::error(
+                    'ill-formed ticket found in the URL (ticket=`'
+                    .htmlentities($ticket).'\')'
+                );
+            }
+
+        }
+        phpCAS::traceEnd();
+    }
+
+    /** @} */
+
+    // KeyKeyKeyKeyXXXX
+    // XX                                                                    XX
+    // XX                           Session Handling                         XX
+    // XX                                                                    XX
+    // KeyKeyKeyKeyXXXX
+
+    /**
+     * @addtogroup internalConfig
+     * @{
+     */
+
+
+    /**
+     * A variable to whether phpcas will use its own session handling. Default = true
+     * @hideinitializer
+     */
+    private $_change_session_id = true;
+
+    /**
+     * Set a parameter whether to allow phpCas to change session_id
+     *
+     * @param bool $allowed allow phpCas to change session_id
+     *
+     * @return void
+     */
+    private function _setChangeSessionID($allowed)
+    {
+        $this->_change_session_id = $allowed;
+    }
+
+    /**
+     * Get whether phpCas is allowed to change session_id
+     *
+     * @return bool
+     */
+    public function getChangeSessionID()
+    {
+        return $this->_change_session_id;
+    }
+
+    /** @} */
+
+    // KeyKeyKeyKeyXXXX
+    // XX                                                                    XX
+    // XX                           AUTHENTICATION                           XX
+    // XX                                                                    XX
+    // KeyKeyKeyKeyXXXX
+
+    /**
+     * @addtogroup internalAuthentication
+     * @{
+     */
+
+    /**
+     * The Authenticated user. Written by CAS_Client::_setUser(), read by
+     * CAS_Client::getUser().
+     *
+     * @hideinitializer
+     */
+    private $_user = '';
+
+    /**
+     * This method sets the CAS user's login name.
+     *
+     * @param string $user the login name of the authenticated user.
+     *
+     * @return void
+     */
+    private function _setUser($user)
+    {
+        $this->_user = $user;
+    }
+
+    /**
+     * This method returns the CAS user's login name.
+     *
+     * @return string the login name of the authenticated user
+     *
+     * @warning should be called only after CAS_Client::forceAuthentication() or
+     * CAS_Client::isAuthenticated(), otherwise halt with an error.
+     */
+    public function getUser()
+    {
+    	// Sequence validation
+    	$this->ensureAuthenticationCallSuccessful();
+
+    	return $this->_getUser();
+    }
+
+    /**
+     * This method returns the CAS user's login name.
+     *
+     * @return string the login name of the authenticated user
+     *
+     * @warning should be called only after CAS_Client::forceAuthentication() or
+     * CAS_Client::isAuthenticated(), otherwise halt with an error.
+     */
+    private function _getUser()
+    {
+    	// This is likely a duplicate check that could be removed....
+        if ( empty($this->_user) ) {
+            phpCAS::error(
+                'this method should be used only after '.__CLASS__
+                .'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()'
+            );
+        }
+        return $this->_user;
+    }
+
+    /**
+     * The Authenticated users attributes. Written by
+     * CAS_Client::setAttributes(), read by CAS_Client::getAttributes().
+     * @attention client applications should use phpCAS::getAttributes().
+     *
+     * @hideinitializer
+     */
+    private $_attributes = array();
+
+    /**
+     * Set an array of attributes
+     *
+     * @param array $attributes a key value array of attributes
+     *
+     * @return void
+     */
+    public function setAttributes($attributes)
+    {
+        $this->_attributes = $attributes;
+    }
+
+    /**
+     * Get an key values arry of attributes
+     *
+     * @return arry of attributes
+     */
+    public function getAttributes()
+    {
+    	// 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(
+                'this method should be used only after '.__CLASS__
+                .'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()'
+            );
+        }
+        return $this->_attributes;
+    }
+
+    /**
+     * Check whether attributes are available
+     *
+     * @return bool attributes available
+     */
+    public function hasAttributes()
+    {
+    	// Sequence validation
+    	$this->ensureAuthenticationCallSuccessful();
+
+        return !empty($this->_attributes);
+    }
+    /**
+     * Check whether a specific attribute with a name is available
+     *
+     * @param string $key name of attribute
+     *
+     * @return bool is attribute available
+     */
+    public function hasAttribute($key)
+    {
+    	// Sequence validation
+    	$this->ensureAuthenticationCallSuccessful();
+
+        return $this->_hasAttribute($key);
+    }
+
+    /**
+     * Check whether a specific attribute with a name is available
+     *
+     * @param string $key name of attribute
+     *
+     * @return bool is attribute available
+     */
+    private function _hasAttribute($key)
+    {
+        return (is_array($this->_attributes)
+            && array_key_exists($key, $this->_attributes));
+    }
+
+    /**
+     * Get a specific attribute by name
+     *
+     * @param string $key name of attribute
+     *
+     * @return string attribute values
+     */
+    public function getAttribute($key)
+    {
+    	// Sequence validation
+    	$this->ensureAuthenticationCallSuccessful();
+
+        if ($this->_hasAttribute($key)) {
+            return $this->_attributes[$key];
+        }
+    }
+
+    /**
+     * This method is called to renew the authentication of the user
+     * If the user is authenticated, renew the connection
+     * If not, redirect to CAS
+     *
+     * @return  void
+     */
+    public function renewAuthentication()
+    {
+        phpCAS::traceBegin();
+        // Either way, the user is authenticated by CAS
+        if (isset( $_SESSION['phpCAS']['auth_checked'])) {
+            unset($_SESSION['phpCAS']['auth_checked']);
+        }
+        if ( $this->isAuthenticated() ) {
+            phpCAS::trace('user already authenticated; renew');
+            $this->redirectToCas(false, true);
+        } else {
+            $this->redirectToCas();
+        }
+        phpCAS::traceEnd();
+    }
+
+    /**
+     * This method is called to be sure that the user is authenticated. When not
+     * authenticated, halt by redirecting to the CAS server; otherwise return true.
+     *
+     * @return true when the user is authenticated; otherwise halt.
+     */
+    public function forceAuthentication()
+    {
+        phpCAS::traceBegin();
+
+        if ( $this->isAuthenticated() ) {
+            // the user is authenticated, nothing to be done.
+            phpCAS::trace('no need to authenticate');
+            $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->redirectToCas(false/* no gateway */);
+            // never reached
+            $res = false;
+        }
+        phpCAS::traceEnd($res);
+        return $res;
+    }
+
+    /**
+     * An integer that gives the number of times authentication will be cached
+     * before rechecked.
+     *
+     * @hideinitializer
+     */
+    private $_cache_times_for_auth_recheck = 0;
+
+    /**
+     * Set the number of times authentication will be cached before rechecked.
+     *
+     * @param int $n number of times to wait for a recheck
+     *
+     * @return void
+     */
+    public function setCacheTimesForAuthRecheck($n)
+    {
+    	if (gettype($n) != 'integer')
+        	throw new CAS_TypeMismatchException($n, '$n', 'string');
+
+        $this->_cache_times_for_auth_recheck = $n;
+    }
+
+    /**
+     * This method is called to check whether the user is authenticated or not.
+     *
+     * @return true when the user is authenticated, false when a previous
+     * gateway login failed or  the function will not return if the user is
+     * redirected to the cas server for a gateway login attempt
+     */
+    public function checkAuthentication()
+    {
+        phpCAS::traceBegin();
+        $res = false;
+        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']);
+            $res = true;
+        } else if (isset($_SESSION['phpCAS']['auth_checked'])) {
+            // the previous request has redirected the client to the CAS server
+            // with gateway=true
+            unset($_SESSION['phpCAS']['auth_checked']);
+            $res = false;
+        } else {
+            // avoid a check against CAS on every request
+            if (!isset($_SESSION['phpCAS']['unauth_count'])) {
+                $_SESSION['phpCAS']['unauth_count'] = -2; // uninitialized
+            }
+
+            if (($_SESSION['phpCAS']['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)
+            ) {
+                $res = false;
+
+                if ($this->_cache_times_for_auth_recheck != -1) {
+                    $_SESSION['phpCAS']['unauth_count']++;
+                    phpCAS::trace(
+                        'user is not authenticated (cached for '
+                        .$_SESSION['phpCAS']['unauth_count'].' times of '
+                        .$this->_cache_times_for_auth_recheck.')'
+                    );
+                } else {
+                    phpCAS::trace(
+                        'user is not authenticated (cached for until login pressed)'
+                    );
+                }
+            } else {
+                $_SESSION['phpCAS']['unauth_count'] = 0;
+                $_SESSION['phpCAS']['auth_checked'] = true;
+                phpCAS::trace('user is not authenticated (cache reset)');
+                $this->redirectToCas(true/* gateway */);
+                // never reached
+                $res = false;
+            }
+        }
+        phpCAS::traceEnd($res);
+        return $res;
+    }
+
+    /**
+     * This method is called to check if the user is authenticated (previously or by
+     * tickets given in the URL).
+     *
+     * @return true when the user is authenticated. Also may redirect to the
+     * same URL without the ticket.
+     */
+    public function isAuthenticated()
+    {
+        phpCAS::traceBegin();
+        $res = false;
+        $validate_url = '';
+        if ( $this->_wasPreviouslyAuthenticated() ) {
+            if ($this->hasTicket()) {
+                // User has a additional ticket but was already authenticated
+                phpCAS::trace(
+                    'ticket was present and will be discarded, use renewAuthenticate()'
+                );
+                if ($this->_clearTicketsFromUrl) {
+                    phpCAS::trace("Prepare redirect to : ".$this->getURL());
+                    session_write_close();
+                    header('Location: '.$this->getURL());
+                    flush();
+                    phpCAS::traceExit();
+                    throw new CAS_GracefullTerminationException();
+                } else {
+                    phpCAS::trace(
+                        'Already authenticated, but skipping ticket clearing since setNoClearTicketsFromUrl() was used.'
+                    );
+                    $res = true;
+                }
+            } else {
+                // the user has already (previously during the session) been
+                // authenticated, nothing to be done.
+                phpCAS::trace(
+                    'user was already authenticated, no need to look for tickets'
+                );
+                $res = true;
+            }
+        } else {
+            if ($this->hasTicket()) {
+                switch ($this->getServerVersion()) {
+                case CAS_VERSION_1_0:
+                    // if a Service Ticket was given, validate it
+                    phpCAS::trace(
+                        'CAS 1.0 ticket `'.$this->getTicket().'\' is present'
+                    );
+                    $this->validateCAS10(
+                        $validate_url, $text_response, $tree_response
+                    ); // if it fails, it halts
+                    phpCAS::trace(
+                        'CAS 1.0 ticket `'.$this->getTicket().'\' was validated'
+                    );
+                    $_SESSION['phpCAS']['user'] = $this->_getUser();
+                    $res = true;
+                    $logoutTicket = $this->getTicket();
+                    break;
+                case CAS_VERSION_2_0:
+                    // if a Proxy Ticket was given, validate it
+                    phpCAS::trace(
+                        'CAS 2.0 ticket `'.$this->getTicket().'\' is present'
+                    );
+                    $this->validateCAS20(
+                        $validate_url, $text_response, $tree_response
+                    ); // note: if it fails, it halts
+                    phpCAS::trace(
+                        'CAS 2.0 ticket `'.$this->getTicket().'\' was validated'
+                    );
+                    if ( $this->isProxy() ) {
+                        $this->_validatePGT(
+                            $validate_url, $text_response, $tree_response
+                        ); // idem
+                        phpCAS::trace('PGT `'.$this->_getPGT().'\' was validated');
+                        $_SESSION['phpCAS']['pgt'] = $this->_getPGT();
+                    }
+                    $_SESSION['phpCAS']['user'] = $this->_getUser();
+                    if (!empty($this->_attributes)) {
+                        $_SESSION['phpCAS']['attributes'] = $this->_attributes;
+                    }
+                    $proxies = $this->getProxies();
+                    if (!empty($proxies)) {
+                        $_SESSION['phpCAS']['proxies'] = $this->getProxies();
+                    }
+                    $res = true;
+                    $logoutTicket = $this->getTicket();
+                    break;
+                case SAML_VERSION_1_1:
+                    // if we have a SAML ticket, validate it.
+                    phpCAS::trace(
+                        'SAML 1.1 ticket `'.$this->getTicket().'\' is present'
+                    );
+                    $this->validateSA(
+                        $validate_url, $text_response, $tree_response
+                    ); // if it fails, it halts
+                    phpCAS::trace(
+                        'SAML 1.1 ticket `'.$this->getTicket().'\' was validated'
+                    );
+                    $_SESSION['phpCAS']['user'] = $this->_getUser();
+                    $_SESSION['phpCAS']['attributes'] = $this->_attributes;
+                    $res = true;
+                    $logoutTicket = $this->getTicket();
+                    break;
+                default:
+                    phpCAS::trace('Protocoll error');
+                    break;
+                }
+            } else {
+                // no ticket given, not authenticated
+                phpCAS::trace('no ticket found');
+            }
+            if ($res) {
+                // call the post-authenticate callback if registered.
+                if ($this->_postAuthenticateCallbackFunction) {
+                    $args = $this->_postAuthenticateCallbackArgs;
+                    array_unshift($args, $logoutTicket);
+                    call_user_func_array(
+                        $this->_postAuthenticateCallbackFunction, $args
+                    );
+                }
+
+                // if called with a ticket parameter, we need to redirect to the
+                // app without the ticket so that CAS-ification is transparent
+                // to the browser (for later POSTS) most of the checks and
+                // errors should have been made now, so we're safe for redirect
+                // without masking error messages. remove the ticket as a
+                // security precaution to prevent a ticket in the HTTP_REFERRER
+                if ($this->_clearTicketsFromUrl) {
+                    phpCAS::trace("Prepare redirect to : ".$this->getURL());
+                    session_write_close();
+                    header('Location: '.$this->getURL());
+                    flush();
+                    phpCAS::traceExit();
+                    throw new CAS_GracefullTerminationException();
+                }
+            }
+        }
+        // Mark the auth-check as complete to allow post-authentication
+        // callbacks to make use of phpCAS::getUser() and similar methods
+        $this->markAuthenticationCall($res);
+        phpCAS::traceEnd($res);
+        return $res;
+    }
+
+    /**
+     * This method tells if the current session is authenticated.
+     *
+     * @return true if authenticated based soley on $_SESSION variable
+     */
+    public function isSessionAuthenticated ()
+    {
+        return !empty($_SESSION['phpCAS']['user']);
+    }
+
+    /**
+     * This method tells if the user has already been (previously) authenticated
+     * by looking into the session variables.
+     *
+     * @note This function switches to callback mode when needed.
+     *
+     * @return true when the user has already been authenticated; false otherwise.
+     */
+    private function _wasPreviouslyAuthenticated()
+    {
+        phpCAS::traceBegin();
+
+        if ( $this->_isCallbackMode() ) {
+            // Rebroadcast the pgtIou and pgtId to all nodes
+            if ($this->_rebroadcast&&!isset($_POST['rebroadcast'])) {
+                $this->_rebroadcast(self::PGTIOU);
+            }
+            $this->_callback();
+        }
+
+        $auth = false;
+
+        if ( $this->isProxy() ) {
+            // CAS proxy: username and PGT must be present
+            if ( $this->isSessionAuthenticated()
+                && !empty($_SESSION['phpCAS']['pgt'])
+            ) {
+                // authentication already done
+                $this->_setUser($_SESSION['phpCAS']['user']);
+                if (isset($_SESSION['phpCAS']['attributes'])) {
+                    $this->setAttributes($_SESSION['phpCAS']['attributes']);
+                }
+                $this->_setPGT($_SESSION['phpCAS']['pgt']);
+                phpCAS::trace(
+                    'user = `'.$_SESSION['phpCAS']['user'].'\', PGT = `'
+                    .$_SESSION['phpCAS']['pgt'].'\''
+                );
+
+                // Include the list of proxies
+                if (isset($_SESSION['phpCAS']['proxies'])) {
+                    $this->_setProxies($_SESSION['phpCAS']['proxies']);
+                    phpCAS::trace(
+                        'proxies = "'
+                        .implode('", "', $_SESSION['phpCAS']['proxies']).'"'
+                    );
+                }
+
+                $auth = true;
+            } elseif ( $this->isSessionAuthenticated()
+                && empty($_SESSION['phpCAS']['pgt'])
+            ) {
+                // these two variables should be empty or not empty at the same time
+                phpCAS::trace(
+                    'username found (`'.$_SESSION['phpCAS']['user']
+                    .'\') but PGT is empty'
+                );
+                // unset all tickets to enforce authentication
+                unset($_SESSION['phpCAS']);
+                $this->setTicket('');
+            } elseif ( !$this->isSessionAuthenticated()
+                && !empty($_SESSION['phpCAS']['pgt'])
+            ) {
+                // these two variables should be empty or not empty at the same time
+                phpCAS::trace(
+                    'PGT found (`'.$_SESSION['phpCAS']['pgt']
+                    .'\') but username is empty'
+                );
+                // unset all tickets to enforce authentication
+                unset($_SESSION['phpCAS']);
+                $this->setTicket('');
+            } else {
+                phpCAS::trace('neither user nor PGT found');
+            }
+        } else {
+            // `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']);
+                }
+                phpCAS::trace('user = `'.$_SESSION['phpCAS']['user'].'\'');
+
+                // Include the list of proxies
+                if (isset($_SESSION['phpCAS']['proxies'])) {
+                    $this->_setProxies($_SESSION['phpCAS']['proxies']);
+                    phpCAS::trace(
+                        'proxies = "'
+                        .implode('", "', $_SESSION['phpCAS']['proxies']).'"'
+                    );
+                }
+
+                $auth = true;
+            } else {
+                phpCAS::trace('no user found');
+            }
+        }
+
+        phpCAS::traceEnd($auth);
+        return $auth;
+    }
+
+    /**
+     * This method is used to redirect the client to the CAS server.
+     * It is used by CAS_Client::forceAuthentication() and
+     * CAS_Client::checkAuthentication().
+     *
+     * @param bool $gateway true to check authentication, false to force it
+     * @param bool $renew   true to force the authentication with the CAS server
+     *
+     * @return void
+     */
+    public function redirectToCas($gateway=false,$renew=false)
+    {
+        phpCAS::traceBegin();
+        $cas_url = $this->getServerLoginURL($gateway, $renew);
+        session_write_close();
+        if (php_sapi_name() === 'cli') {
+            @header('Location: '.$cas_url);
+        } else {
+            header('Location: '.$cas_url);
+        }
+        phpCAS::trace("Redirect to : ".$cas_url);
+        $lang = $this->getLangObj();
+        $this->printHTMLHeader($lang->getAuthenticationWanted());
+        printf('<p>'. $lang->getShouldHaveBeenRedirected(). '</p>', $cas_url);
+        $this->printHTMLFooter();
+        phpCAS::traceExit();
+        throw new CAS_GracefullTerminationException();
+    }
+
+
+    /**
+     * This method is used to logout from CAS.
+     *
+     * @param array $params an array that contains the optional url and service
+     * parameters that will be passed to the CAS server
+     *
+     * @return void
+     */
+    public function logout($params)
+    {
+        phpCAS::traceBegin();
+        $cas_url = $this->getServerLogoutURL();
+        $paramSeparator = '?';
+        if (isset($params['url'])) {
+            $cas_url = $cas_url . $paramSeparator . "url="
+                . urlencode($params['url']);
+            $paramSeparator = '&';
+        }
+        if (isset($params['service'])) {
+            $cas_url = $cas_url . $paramSeparator . "service="
+                . urlencode($params['service']);
+        }
+        session_write_close();
+        header('Location: '.$cas_url);
+        phpCAS::trace("Prepare redirect to : ".$cas_url);
+
+        session_unset();
+        session_destroy();
+        $lang = $this->getLangObj();
+        $this->printHTMLHeader($lang->getLogout());
+        printf('<p>'.$lang->getShouldHaveBeenRedirected(). '</p>', $cas_url);
+        $this->printHTMLFooter();
+        phpCAS::traceExit();
+        throw new CAS_GracefullTerminationException();
+    }
+
+    /**
+     * Check of the current request is a logout request
+     *
+     * @return bool is logout request.
+     */
+    private function _isLogoutRequest()
+    {
+        return !empty($_POST['logoutRequest']);
+    }
+
+    /**
+     * This method handles logout requests.
+     *
+     * @param bool $check_client    true to check the client bofore handling
+     * the request, false not to perform any access control. True by default.
+     * @param bool $allowed_clients an array of host names allowed to send
+     * logout requests.
+     *
+     * @return void
+     */
+    public function handleLogoutRequests($check_client=true, $allowed_clients=false)
+    {
+        phpCAS::traceBegin();
+        if (!$this->_isLogoutRequest()) {
+            phpCAS::trace("Not a logout request");
+            phpCAS::traceEnd();
+            return;
+        }
+        if (!$this->getChangeSessionID()
+            && is_null($this->_signoutCallbackFunction)
+        ) {
+            phpCAS::trace(
+                "phpCAS can't handle logout requests if it is not allowed to change session_id."
+            );
+        }
+        phpCAS::trace("Logout requested");
+        $decoded_logout_rq = urldecode($_POST['logoutRequest']);
+        phpCAS::trace("SAML REQUEST: ".$decoded_logout_rq);
+        $allowed = false;
+        if ($check_client) {
+            if (!$allowed_clients) {
+                $allowed_clients = array( $this->_getServerHostname() );
+            }
+            $client_ip = $_SERVER['REMOTE_ADDR'];
+            $client = gethostbyaddr($client_ip);
+            phpCAS::trace("Client: ".$client."/".$client_ip);
+            foreach ($allowed_clients as $allowed_client) {
+                if (($client == $allowed_client)
+                    || ($client_ip == $allowed_client)
+                ) {
+                    phpCAS::trace(
+                        "Allowed client '".$allowed_client
+                        ."' matches, logout request is allowed"
+                    );
+                    $allowed = true;
+                    break;
+                } else {
+                    phpCAS::trace(
+                        "Allowed client '".$allowed_client."' does not match"
+                    );
+                }
+            }
+        } else {
+            phpCAS::trace("No access control set");
+            $allowed = true;
+        }
+        // If Logout command is permitted proceed with the logout
+        if ($allowed) {
+            phpCAS::trace("Logout command allowed");
+            // Rebroadcast the logout request
+            if ($this->_rebroadcast && !isset($_POST['rebroadcast'])) {
+                $this->_rebroadcast(self::LOGOUT);
+            }
+            // Extract the ticket from the SAML Request
+            preg_match(
+                "|<samlp:SessionIndex>(.*)</samlp:SessionIndex>|",
+                $decoded_logout_rq, $tick, PREG_OFFSET_CAPTURE, 3
+            );
+            $wrappedSamlSessionIndex = preg_replace(
+                '|<samlp:SessionIndex>|', '', $tick[0][0]
+            );
+            $ticket2logout = preg_replace(
+                '|</samlp:SessionIndex>|', '', $wrappedSamlSessionIndex
+            );
+            phpCAS::trace("Ticket to logout: ".$ticket2logout);
+
+            // call the post-authenticate callback if registered.
+            if ($this->_signoutCallbackFunction) {
+                $args = $this->_signoutCallbackArgs;
+                array_unshift($args, $ticket2logout);
+                call_user_func_array($this->_signoutCallbackFunction, $args);
+            }
+
+            // If phpCAS is managing the session_id, destroy session thanks to
+            // session_id.
+            if ($this->getChangeSessionID()) {
+                $session_id = preg_replace('/[^a-zA-Z0-9\-]/', '', $ticket2logout);
+                phpCAS::trace("Session id: ".$session_id);
+
+                // destroy a possible application session created before phpcas
+                if (session_id() !== "") {
+                    session_unset();
+                    session_destroy();
+                }
+                // fix session ID
+                session_id($session_id);
+                $_COOKIE[session_name()]=$session_id;
+                $_GET[session_name()]=$session_id;
+
+                // Overwrite session
+                session_start();
+                session_unset();
+                session_destroy();
+                phpCAS::trace("Session ". $session_id . " destroyed");
+            }
+        } else {
+            phpCAS::error("Unauthorized logout request from client '".$client."'");
+            phpCAS::trace("Unauthorized logout request from client '".$client."'");
+        }
+        flush();
+        phpCAS::traceExit();
+        throw new CAS_GracefullTerminationException();
+
+    }
+
+    /** @} */
+
+    // KeyKeyKeyKeyXXXX
+    // XX                                                                    XX
+    // XX                  BASIC CLIENT FEATURES (CAS 1.0)                   XX
+    // XX                                                                    XX
+    // KeyKeyKeyKeyXXXX
+
+    // ########################################################################
+    //  ST
+    // ########################################################################
+    /**
+    * @addtogroup internalBasic
+    * @{
+    */
+
+    /**
+     * The Ticket provided in the URL of the request if present
+     * (empty otherwise). Written by CAS_Client::CAS_Client(), read by
+     * CAS_Client::getTicket() and CAS_Client::_hasPGT().
+     *
+     * @hideinitializer
+     */
+    private $_ticket = '';
+
+    /**
+     * This method returns the Service Ticket provided in the URL of the request.
+     *
+     * @return string service ticket.
+     */
+    public  function getTicket()
+    {
+        return $this->_ticket;
+    }
+
+    /**
+     * This method stores the Service Ticket.
+     *
+     * @param string $st The Service Ticket.
+     *
+     * @return void
+     */
+    public function setTicket($st)
+    {
+        $this->_ticket = $st;
+    }
+
+    /**
+     * This method tells if a Service Ticket was stored.
+     *
+     * @return bool if a Service Ticket has been stored.
+     */
+    public function hasTicket()
+    {
+        return !empty($this->_ticket);
+    }
+
+    /** @} */
+
+    // ########################################################################
+    //  ST VALIDATION
+    // ########################################################################
+    /**
+    * @addtogroup internalBasic
+    * @{
+    */
+
+    /**
+     * the certificate of the CAS server CA.
+     *
+     * @hideinitializer
+     */
+    private $_cas_server_ca_cert = null;
+
+
+    /**
+
+     * validate CN of the CAS server certificate
+
+     *
+
+     * @hideinitializer
+
+     */
+
+    private $_cas_server_cn_validate = true;
+
+    /**
+     * Set to true not to validate the CAS server.
+     *
+     * @hideinitializer
+     */
+    private $_no_cas_server_validation = false;
+
+
+    /**
+     * Set the CA certificate of the CAS server.
+     *
+     * @param string $cert        the PEM certificate file name of the CA that emited
+     * the cert of the server
+     * @param bool   $validate_cn valiate CN of the CAS server certificate
+     *
+     * @return void
+     */
+    public function setCasServerCACert($cert, $validate_cn)
+    {
+    	// Argument validation
+    	if (gettype($cert) != 'string')
+        	throw new CAS_TypeMismatchException($cert, '$cert', 'string');
+        if (gettype($validate_cn) != 'boolean')
+        	throw new CAS_TypeMismatchException($validate_cn, '$validate_cn', 'boolean');
+
+        $this->_cas_server_ca_cert = $cert;
+        $this->_cas_server_cn_validate = $validate_cn;
+    }
+
+    /**
+     * Set no SSL validation for the CAS server.
+     *
+     * @return void
+     */
+    public function setNoCasServerValidation()
+    {
+        $this->_no_cas_server_validation = true;
+    }
+
+    /**
+     * This method is used to validate a CAS 1,0 ticket; halt on failure, and
+     * sets $validate_url, $text_reponse and $tree_response on success.
+     *
+     * @param string &$validate_url  reference to the the URL of the request to
+     * the CAS server.
+     * @param string &$text_response reference to the response of the CAS
+     * server, as is (XML text).
+     * @param string &$tree_response reference to the response of the CAS
+     * server, as a DOM XML tree.
+     *
+     * @return bool true when successfull and issue a CAS_AuthenticationException
+     * and false on an error
+     */
+    public function validateCAS10(&$validate_url,&$text_response,&$tree_response)
+    {
+        phpCAS::traceBegin();
+        $result = false;
+        // build the URL to validate the ticket
+        $validate_url = $this->getServerServiceValidateURL()
+            .'&ticket='.$this->getTicket();
+
+        // open and read the URL
+        if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) {
+            phpCAS::trace(
+                'could not open URL \''.$validate_url.'\' to validate ('.$err_msg.')'
+            );
+            throw new CAS_AuthenticationException(
+                $this, 'CAS 1.0 ticket not validated', $validate_url,
+                true/*$no_response*/
+            );
+            $result = false;
+        }
+
+        if (preg_match('/^no\n/', $text_response)) {
+            phpCAS::trace('Ticket has not been validated');
+            throw new CAS_AuthenticationException(
+                $this, 'ST not validated', $validate_url, false/*$no_response*/,
+                false/*$bad_response*/, $text_response
+            );
+            $result = false;
+        } else if (!preg_match('/^yes\n/', $text_response)) {
+            phpCAS::trace('ill-formed response');
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket not validated', $validate_url,
+                false/*$no_response*/, true/*$bad_response*/, $text_response
+            );
+            $result = false;
+        }
+        // ticket has been validated, extract the user name
+        $arr = preg_split('/\n/', $text_response);
+        $this->_setUser(trim($arr[1]));
+        $result = true;
+
+        if ($result) {
+            $this->_renameSession($this->getTicket());
+        }
+        // at this step, ticket has been validated and $this->_user has been set,
+        phpCAS::traceEnd(true);
+        return true;
+    }
+
+    /** @} */
+
+
+    // ########################################################################
+    //  SAML VALIDATION
+    // ########################################################################
+    /**
+    * @addtogroup internalSAML
+    * @{
+    */
+
+    /**
+     * This method is used to validate a SAML TICKET; halt on failure, and sets
+     * $validate_url, $text_reponse and $tree_response on success. These
+     * parameters are used later by CAS_Client::_validatePGT() for CAS proxies.
+     *
+     * @param string &$validate_url  reference to the the URL of the request to
+     * the CAS server.
+     * @param string &$text_response reference to the response of the CAS
+     * server, as is (XML text).
+     * @param string &$tree_response reference to the response of the CAS
+     * server, as a DOM XML tree.
+     *
+     * @return bool true when successfull and issue a CAS_AuthenticationException
+     * and false on an error
+     */
+    public function validateSA(&$validate_url,&$text_response,&$tree_response)
+    {
+        phpCAS::traceBegin();
+        $result = false;
+        // build the URL to validate the ticket
+        $validate_url = $this->getServerSamlValidateURL();
+
+        // open and read the URL
+        if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) {
+            phpCAS::trace(
+                'could not open URL \''.$validate_url.'\' to validate ('.$err_msg.')'
+            );
+            throw new CAS_AuthenticationException(
+                $this, 'SA not validated', $validate_url, true/*$no_response*/
+            );
+        }
+
+        phpCAS::trace('server version: '.$this->getServerVersion());
+
+        // analyze the result depending on the version
+        switch ($this->getServerVersion()) {
+        case SAML_VERSION_1_1:
+            // create new DOMDocument Object
+            $dom = new DOMDocument();
+            // Fix possible whitspace problems
+            $dom->preserveWhiteSpace = false;
+            // read the response of the CAS server into a DOM object
+            if (!($dom->loadXML($text_response))) {
+                phpCAS::trace('dom->loadXML() failed');
+                throw new CAS_AuthenticationException(
+                    $this, 'SA not validated', $validate_url,
+                    false/*$no_response*/, true/*$bad_response*/,
+                    $text_response
+                );
+                $result = false;
+            }
+            // read the root node of the XML tree
+            if (!($tree_response = $dom->documentElement)) {
+                phpCAS::trace('documentElement() failed');
+                throw new CAS_AuthenticationException(
+                    $this, 'SA not validated', $validate_url,
+                    false/*$no_response*/, true/*$bad_response*/,
+                    $text_response
+                );
+                $result = false;
+            } else if ( $tree_response->localName != 'Envelope' ) {
+                // insure that tag name is 'Envelope'
+                phpCAS::trace(
+                    'bad XML root node (should be `Envelope\' instead of `'
+                    .$tree_response->localName.'\''
+                );
+                throw new CAS_AuthenticationException(
+                    $this, 'SA not validated', $validate_url,
+                    false/*$no_response*/, true/*$bad_response*/,
+                    $text_response
+                );
+                $result = false;
+            } else if ($tree_response->getElementsByTagName("NameIdentifier")->length != 0) {
+                // check for the NameIdentifier tag in the SAML response
+                $success_elements = $tree_response->getElementsByTagName("NameIdentifier");
+                phpCAS::trace('NameIdentifier found');
+                $user = trim($success_elements->item(0)->nodeValue);
+                phpCAS::trace('user = `'.$user.'`');
+                $this->_setUser($user);
+                $this->_setSessionAttributes($text_response);
+                $result = true;
+            } else {
+                phpCAS::trace('no <NameIdentifier> tag found in SAML payload');
+                throw new CAS_AuthenticationException(
+                    $this, 'SA not validated', $validate_url,
+                    false/*$no_response*/, true/*$bad_response*/,
+                    $text_response
+                );
+                $result = false;
+            }
+        }
+        if ($result) {
+            $this->_renameSession($this->getTicket());
+        }
+        // at this step, ST has been validated and $this->_user has been set,
+        phpCAS::traceEnd($result);
+        return $result;
+    }
+
+    /**
+     * This method will parse the DOM and pull out the attributes from the SAML
+     * payload and put them into an array, then put the array into the session.
+     *
+     * @param string $text_response the SAML payload.
+     *
+     * @return bool true when successfull and false if no attributes a found
+     */
+    private function _setSessionAttributes($text_response)
+    {
+        phpCAS::traceBegin();
+
+        $result = false;
+
+        $attr_array = array();
+
+        // create new DOMDocument Object
+        $dom = new DOMDocument();
+        // Fix possible whitspace problems
+        $dom->preserveWhiteSpace = false;
+        if (($dom->loadXML($text_response))) {
+            $xPath = new DOMXpath($dom);
+            $xPath->registerNamespace('samlp', 'urn:oasis:names:tc:SAML:1.0:protocol');
+            $xPath->registerNamespace('saml', 'urn:oasis:names:tc:SAML:1.0:assertion');
+            $nodelist = $xPath->query("//saml:Attribute");
+
+            if ($nodelist) {
+                foreach ($nodelist as $node) {
+                    $xres = $xPath->query("saml:AttributeValue", $node);
+                    $name = $node->getAttribute("AttributeName");
+                    $value_array = array();
+                    foreach ($xres as $node2) {
+                        $value_array[] = $node2->nodeValue;
+                    }
+                    $attr_array[$name] = $value_array;
+                }
+                // UGent addition...
+                foreach ($attr_array as $attr_key => $attr_value) {
+                    if (count($attr_value) > 1) {
+                        $this->_attributes[$attr_key] = $attr_value;
+                        phpCAS::trace("* " . $attr_key . "=" . print_r($attr_value, true));
+                    } else {
+                        $this->_attributes[$attr_key] = $attr_value[0];
+                        phpCAS::trace("* " . $attr_key . "=" . $attr_value[0]);
+                    }
+                }
+                $result = true;
+            } else {
+                phpCAS::trace("SAML Attributes are empty");
+                $result = false;
+            }
+        }
+        phpCAS::traceEnd($result);
+        return $result;
+    }
+
+    /** @} */
+
+    // KeyKeyKeyKeyXXXX
+    // XX                                                                    XX
+    // XX                     PROXY FEATURES (CAS 2.0)                       XX
+    // XX                                                                    XX
+    // KeyKeyKeyKeyXXXX
+
+    // ########################################################################
+    //  PROXYING
+    // ########################################################################
+    /**
+    * @addtogroup internalProxy
+    * @{
+    */
+
+    /**
+     * A boolean telling if the client is a CAS proxy or not. Written by
+     * CAS_Client::CAS_Client(), read by CAS_Client::isProxy().
+     */
+    private $_proxy;
+
+    /**
+     * Handler for managing service cookies.
+     */
+    private $_serviceCookieJar;
+
+    /**
+     * Tells if a CAS client is a CAS proxy or not
+     *
+     * @return true when the CAS client is a CAs proxy, false otherwise
+     */
+    public function isProxy()
+    {
+        return $this->_proxy;
+    }
+
+    /** @} */
+    // ########################################################################
+    //  PGT
+    // ########################################################################
+    /**
+    * @addtogroup internalProxy
+    * @{
+    */
+
+    /**
+     * the Proxy Grnting Ticket given by the CAS server (empty otherwise).
+     * Written by CAS_Client::_setPGT(), read by CAS_Client::_getPGT() and
+     * CAS_Client::_hasPGT().
+     *
+     * @hideinitializer
+     */
+    private $_pgt = '';
+
+    /**
+     * This method returns the Proxy Granting Ticket given by the CAS server.
+     *
+     * @return string the Proxy Granting Ticket.
+     */
+    private function _getPGT()
+    {
+        return $this->_pgt;
+    }
+
+    /**
+     * This method stores the Proxy Granting Ticket.
+     *
+     * @param string $pgt The Proxy Granting Ticket.
+     *
+     * @return void
+     */
+    private function _setPGT($pgt)
+    {
+        $this->_pgt = $pgt;
+    }
+
+    /**
+     * This method tells if a Proxy Granting Ticket was stored.
+     *
+     * @return true if a Proxy Granting Ticket has been stored.
+     */
+    private function _hasPGT()
+    {
+        return !empty($this->_pgt);
+    }
+
+    /** @} */
+
+    // ########################################################################
+    //  CALLBACK MODE
+    // ########################################################################
+    /**
+    * @addtogroup internalCallback
+    * @{
+    */
+    /**
+     * each PHP script using phpCAS in proxy mode is its own callback to get the
+     * PGT back from the CAS server. callback_mode is detected by the constructor
+     * thanks to the GET parameters.
+     */
+
+    /**
+     * a boolean to know if the CAS client is running in callback mode. Written by
+     * CAS_Client::setCallBackMode(), read by CAS_Client::_isCallbackMode().
+     *
+     * @hideinitializer
+     */
+    private $_callback_mode = false;
+
+    /**
+     * This method sets/unsets callback mode.
+     *
+     * @param bool $callback_mode true to set callback mode, false otherwise.
+     *
+     * @return void
+     */
+    private function _setCallbackMode($callback_mode)
+    {
+        $this->_callback_mode = $callback_mode;
+    }
+
+    /**
+     * This method returns true when the CAs client is running i callback mode,
+     * false otherwise.
+     *
+     * @return A boolean.
+     */
+    private function _isCallbackMode()
+    {
+        return $this->_callback_mode;
+    }
+
+    /**
+     * 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
+     * CAS_Client::_getCallbackURL().
+     *
+     * @hideinitializer
+     */
+    private $_callback_url = '';
+
+    /**
+     * This method returns the URL that should be used for the PGT callback (in
+     * fact the URL of the current request without any CGI parameter, except if
+     * phpCAS::setFixedCallbackURL() was used).
+     *
+     * @return The callback URL
+     */
+    private function _getCallbackURL()
+    {
+        // the URL is built when needed only
+        if ( empty($this->_callback_url) ) {
+            $final_uri = '';
+            // remove the ticket if present in the URL
+            $final_uri = 'https://';
+            $final_uri .= $this->_getClientUrl();
+            $request_uri = $_SERVER['REQUEST_URI'];
+            $request_uri = preg_replace('/\?.*$/', '', $request_uri);
+            $final_uri .= $request_uri;
+            $this->_callback_url = $final_uri;
+        }
+        return $this->_callback_url;
+    }
+
+    /**
+     * This method sets the callback url.
+     *
+     * @param string $url url to set callback
+     *
+     * @return void
+     */
+    public function setCallbackURL($url)
+    {
+    	// Sequence validation
+        $this->ensureIsProxy();
+    	// Argument Validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        return $this->_callback_url = $url;
+    }
+
+    /**
+     * This method is called by CAS_Client::CAS_Client() when running in callback
+     * mode. It stores the PGT and its PGT Iou, prints its output and halts.
+     *
+     * @return void
+     */
+    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 '<p>Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\').</p>';
+                $this->_storePGT($pgt, $pgt_iou);
+                $this->printHTMLFooter();
+                phpCAS::traceExit("Successfull Callback");
+            } else {
+                phpCAS::error('PGT format invalid' . $_GET['pgtId']);
+                phpCAS::traceExit('PGT format invalid' . $_GET['pgtId']);
+            }
+        } else {
+            phpCAS::error('PGTiou format invalid' . $_GET['pgtIou']);
+            phpCAS::traceExit('PGTiou format invalid' . $_GET['pgtIou']);
+        }
+
+        // Flush the buffer to prevent from sending anything other then a 200
+        // Success Status back to the CAS Server. The Exception would normally
+        // report as a 500 error.
+        flush();
+        throw new CAS_GracefullTerminationException();
+    }
+
+
+    /** @} */
+
+    // ########################################################################
+    //  PGT STORAGE
+    // ########################################################################
+    /**
+    * @addtogroup internalPGTStorage
+    * @{
+    */
+
+    /**
+     * an instance of a class inheriting of PGTStorage, used to deal with PGT
+     * storage. Created by CAS_Client::setPGTStorageFile(), used
+     * by CAS_Client::setPGTStorageFile() and CAS_Client::_initPGTStorage().
+     *
+     * @hideinitializer
+     */
+    private $_pgt_storage = null;
+
+    /**
+     * This method is used to initialize the storage of PGT's.
+     * Halts on error.
+     *
+     * @return void
+     */
+    private function _initPGTStorage()
+    {
+        // if no SetPGTStorageXxx() has been used, default to file
+        if ( !is_object($this->_pgt_storage) ) {
+            $this->setPGTStorageFile();
+        }
+
+        // initializes the storage
+        $this->_pgt_storage->init();
+    }
+
+    /**
+     * This method stores a PGT. Halts on error.
+     *
+     * @param string $pgt     the PGT to store
+     * @param string $pgt_iou its corresponding Iou
+     *
+     * @return void
+     */
+    private function _storePGT($pgt,$pgt_iou)
+    {
+        // ensure that storage is initialized
+        $this->_initPGTStorage();
+        // writes the PGT
+        $this->_pgt_storage->write($pgt, $pgt_iou);
+    }
+
+    /**
+     * This method reads a PGT from its Iou and deletes the corresponding
+     * storage entry.
+     *
+     * @param string $pgt_iou the PGT Iou
+     *
+     * @return mul The PGT corresponding to the Iou, false when not found.
+     */
+    private function _loadPGT($pgt_iou)
+    {
+        // ensure that storage is initialized
+        $this->_initPGTStorage();
+        // read the PGT
+        return $this->_pgt_storage->read($pgt_iou);
+    }
+
+    /**
+     * This method can be used to set a custom PGT storage object.
+     *
+     * @param CAS_PGTStorage_AbstractStorage $storage a PGT storage object that
+     * inherits from the CAS_PGTStorage_AbstractStorage class
+     *
+     * @return void
+     */
+    public function setPGTStorage($storage)
+    {
+    	// Sequence validation
+        $this->ensureIsProxy();
+
+        // check that the storage has not already been set
+        if ( is_object($this->_pgt_storage) ) {
+            phpCAS::error('PGT storage already defined');
+        }
+
+        // check to make sure a valid storage object was specified
+        if ( !($storage instanceof CAS_PGTStorage_AbstractStorage) )
+            throw new CAS_TypeMismatchException($storage, '$storage', 'CAS_PGTStorage_AbstractStorage object');
+
+        // store the PGTStorage object
+        $this->_pgt_storage = $storage;
+    }
+
+    /**
+     * This method is used to tell phpCAS to store the response of the
+     * CAS server to PGT requests in a database.
+     *
+     * @param string $dsn_or_pdo     a dsn string to use for creating a PDO
+     * object or a PDO object
+     * @param string $username       the username to use when connecting to the
+     * database
+     * @param string $password       the password to use when connecting to the
+     * database
+     * @param string $table          the table to use for storing and retrieving
+     * PGTs
+     * @param string $driver_options any driver options to use when connecting
+     * to the database
+     *
+     * @return void
+     */
+    public function setPGTStorageDb(
+        $dsn_or_pdo, $username='', $password='', $table='', $driver_options=null
+    ) {
+    	// Sequence validation
+        $this->ensureIsProxy();
+
+    	// Argument validation
+    	if ((is_object($dsn_or_pdo) && !($dsn_or_pdo instanceof PDO)) || gettype($dsn_or_pdo) != 'string')
+			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');
+        if (gettype($table) != 'string')
+        	throw new CAS_TypeMismatchException($table, '$password', 'string');
+
+        // create the storage object
+        $this->setPGTStorage(
+            new CAS_PGTStorage_Db(
+                $this, $dsn_or_pdo, $username, $password, $table, $driver_options
+            )
+        );
+    }
+
+    /**
+     * This method is used to tell phpCAS to store the response of the
+     * CAS server to PGT requests onto the filesystem.
+     *
+     * @param string $path the path where the PGT's should be stored
+     *
+     * @return void
+     */
+    public function setPGTStorageFile($path='')
+    {
+    	// Sequence validation
+        $this->ensureIsProxy();
+
+    	// 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));
+    }
+
+
+    // ########################################################################
+    //  PGT VALIDATION
+    // ########################################################################
+    /**
+    * This method is used to validate a PGT; halt on failure.
+    *
+    * @param string &$validate_url the URL of the request to the CAS server.
+    * @param string $text_response the response of the CAS server, as is
+    *                              (XML text); result of
+    *                              CAS_Client::validateCAS10() or
+    *                              CAS_Client::validateCAS20().
+    * @param string $tree_response the response of the CAS server, as a DOM XML
+    * tree; result of CAS_Client::validateCAS10() or CAS_Client::validateCAS20().
+    *
+    * @return bool true when successfull and issue a CAS_AuthenticationException
+    * and false on an error
+    */
+    private function _validatePGT(&$validate_url,$text_response,$tree_response)
+    {
+        phpCAS::traceBegin();
+        if ( $tree_response->getElementsByTagName("proxyGrantingTicket")->length == 0) {
+            phpCAS::trace('<proxyGrantingTicket> not found');
+            // authentication succeded, but no PGT Iou was transmitted
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket validated but no PGT Iou transmitted',
+                $validate_url, false/*$no_response*/, false/*$bad_response*/,
+                $text_response
+            );
+        } else {
+            // PGT Iou transmitted, extract it
+            $pgt_iou = trim(
+                $tree_response->getElementsByTagName("proxyGrantingTicket")->item(0)->nodeValue
+            );
+            if (preg_match('/PGTIOU-[\.\-\w]/', $pgt_iou)) {
+                $pgt = $this->_loadPGT($pgt_iou);
+                if ( $pgt == false ) {
+                    phpCAS::trace('could not load PGT');
+                    throw new CAS_AuthenticationException(
+                        $this,
+                        'PGT Iou was transmitted but PGT could not be retrieved',
+                        $validate_url, false/*$no_response*/,
+                        false/*$bad_response*/, $text_response
+                    );
+                }
+                $this->_setPGT($pgt);
+            } else {
+                phpCAS::trace('PGTiou format error');
+                throw new CAS_AuthenticationException(
+                    $this, 'PGT Iou was transmitted but has wrong format',
+                    $validate_url, false/*$no_response*/, false/*$bad_response*/,
+                    $text_response
+                );
+            }
+        }
+        phpCAS::traceEnd(true);
+        return true;
+    }
+
+    // ########################################################################
+    //  PGT VALIDATION
+    // ########################################################################
+
+    /**
+     * This method is used to retrieve PT's from the CAS server thanks to a PGT.
+     *
+     * @param string $target_service the service to ask for with the PT.
+     * @param string &$err_code      an error code (PHPCAS_SERVICE_OK on success).
+     * @param string &$err_msg       an error message (empty on success).
+     *
+     * @return a Proxy Ticket, or false on error.
+     */
+    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');
+
+        phpCAS::traceBegin();
+
+        // by default, $err_msg is set empty and $pt to true. On error, $pt is
+        // set to false and $err_msg to an error message. At the end, if $pt is false
+        // and $error_msg is still empty, it is set to 'invalid response' (the most
+        // commonly encountered error).
+        $err_msg = '';
+
+        // build the URL to retrieve the PT
+        $cas_url = $this->getServerProxyURL().'?targetService='
+            .urlencode($target_service).'&pgt='.$this->_getPGT();
+
+        // open and read the URL
+        if ( !$this->_readURL($cas_url, $headers, $cas_response, $err_msg) ) {
+            phpCAS::trace(
+                'could not open URL \''.$cas_url.'\' to validate ('.$err_msg.')'
+            );
+            $err_code = PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE;
+            $err_msg = 'could not retrieve PT (no response from the CAS server)';
+            phpCAS::traceEnd(false);
+            return false;
+        }
+
+        $bad_response = false;
+
+        if ( !$bad_response ) {
+            // create new DOMDocument object
+            $dom = new DOMDocument();
+            // Fix possible whitspace problems
+            $dom->preserveWhiteSpace = false;
+            // read the response of the CAS server into a DOM object
+            if ( !($dom->loadXML($cas_response))) {
+                phpCAS::trace('dom->loadXML() failed');
+                // read failed
+                $bad_response = true;
+            }
+        }
+
+        if ( !$bad_response ) {
+            // read the root node of the XML tree
+            if ( !($root = $dom->documentElement) ) {
+                phpCAS::trace('documentElement failed');
+                // read failed
+                $bad_response = true;
+            }
+        }
+
+        if ( !$bad_response ) {
+            // insure that tag name is 'serviceResponse'
+            if ( $root->localName != 'serviceResponse' ) {
+                phpCAS::trace('localName failed');
+                // bad root node
+                $bad_response = true;
+            }
+        }
+
+        if ( !$bad_response ) {
+            // look for a proxySuccess tag
+            if ( $root->getElementsByTagName("proxySuccess")->length != 0) {
+                $proxy_success_list = $root->getElementsByTagName("proxySuccess");
+
+                // authentication succeded, look for a proxyTicket tag
+                if ( $proxy_success_list->item(0)->getElementsByTagName("proxyTicket")->length != 0) {
+                    $err_code = PHPCAS_SERVICE_OK;
+                    $err_msg = '';
+                    $pt = trim(
+                        $proxy_success_list->item(0)->getElementsByTagName("proxyTicket")->item(0)->nodeValue
+                    );
+                    phpCAS::trace('original PT: '.trim($pt));
+                    phpCAS::traceEnd($pt);
+                    return $pt;
+                } else {
+                    phpCAS::trace('<proxySuccess> was found, but not <proxyTicket>');
+                }
+            } else if ($root->getElementsByTagName("proxyFailure")->length != 0) {
+                // look for a proxyFailure tag
+                $proxy_failure_list = $root->getElementsByTagName("proxyFailure");
+
+                // authentication failed, extract the error
+                $err_code = PHPCAS_SERVICE_PT_FAILURE;
+                $err_msg = 'PT retrieving failed (code=`'
+                .$proxy_failure_list->item(0)->getAttribute('code')
+                .'\', message=`'
+                .trim($proxy_failure_list->item(0)->nodeValue)
+                .'\')';
+                phpCAS::traceEnd(false);
+                return false;
+            } else {
+                phpCAS::trace('neither <proxySuccess> nor <proxyFailure> found');
+            }
+        }
+
+        // at this step, we are sure that the response of the CAS server was
+        // illformed
+        $err_code = PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE;
+        $err_msg = 'Invalid response from the CAS server (response=`'
+            .$cas_response.'\')';
+
+        phpCAS::traceEnd(false);
+        return false;
+    }
+
+    /** @} */
+
+    // ########################################################################
+    // READ CAS SERVER ANSWERS
+    // ########################################################################
+
+    /**
+     * @addtogroup internalMisc
+     * @{
+     */
+
+    /**
+     * This method is used to acces a remote URL.
+     *
+     * @param string $url      the URL to access.
+     * @param string &$headers an array containing the HTTP header lines of the
+     * response (an empty array on failure).
+     * @param string &$body    the body of the response, as a string (empty on
+     * failure).
+     * @param string &$err_msg an error message, filled on failure.
+     *
+     * @return true on success, false otherwise (in this later case, $err_msg
+     * contains an error message).
+     */
+    private function _readURL($url, &$headers, &$body, &$err_msg)
+    {
+        phpCAS::traceBegin();
+        $className = $this->_requestImplementation;
+        $request = new $className();
+
+        if (count($this->_curl_options)) {
+            $request->setCurlOptions($this->_curl_options);
+        }
+
+        $request->setUrl($url);
+
+        if (empty($this->_cas_server_ca_cert) && !$this->_no_cas_server_validation) {
+            phpCAS::error(
+                'one of the methods phpCAS::setCasServerCACert() or phpCAS::setNoCasServerValidation() must be called.'
+            );
+        }
+        if ($this->_cas_server_ca_cert != '') {
+            $request->setSslCaCert(
+                $this->_cas_server_ca_cert, $this->_cas_server_cn_validate
+            );
+        }
+
+        // add extra stuff if SAML
+        if ($this->getServerVersion() == SAML_VERSION_1_1) {
+            $request->addHeader("soapaction: http://www.oasis-open.org/committees/security");
+            $request->addHeader("cache-control: no-cache");
+            $request->addHeader("pragma: no-cache");
+            $request->addHeader("accept: text/xml");
+            $request->addHeader("connection: keep-alive");
+            $request->addHeader("content-type: text/xml");
+            $request->makePost();
+            $request->setPostBody($this->_buildSAMLPayload());
+        }
+
+        if ($request->send()) {
+            $headers = $request->getResponseHeaders();
+            $body = $request->getResponseBody();
+            $err_msg = '';
+            phpCAS::traceEnd(true);
+            return true;
+        } else {
+            $headers = '';
+            $body = '';
+            $err_msg = $request->getErrorMessage();
+            phpCAS::traceEnd(false);
+            return false;
+        }
+    }
+
+    /**
+     * This method is used to build the SAML POST body sent to /samlValidate URL.
+     *
+     * @return the SOAP-encased SAMLP artifact (the ticket).
+     */
+    private function _buildSAMLPayload()
+    {
+        phpCAS::traceBegin();
+
+        //get the ticket
+        $sa = $this->getTicket();
+
+        $body = SAML_SOAP_ENV.SAML_SOAP_BODY.SAMLP_REQUEST
+            .SAML_ASSERTION_ARTIFACT.$sa.SAML_ASSERTION_ARTIFACT_CLOSE
+            .SAMLP_REQUEST_CLOSE.SAML_SOAP_BODY_CLOSE.SAML_SOAP_ENV_CLOSE;
+
+        phpCAS::traceEnd($body);
+        return ($body);
+    }
+
+    /** @} **/
+
+    // ########################################################################
+    // ACCESS TO EXTERNAL SERVICES
+    // ########################################################################
+
+    /**
+     * @addtogroup internalProxyServices
+     * @{
+     */
+
+
+    /**
+     * Answer a proxy-authenticated service handler.
+     *
+     * @param string $type The service type. One of:
+     * PHPCAS_PROXIED_SERVICE_HTTP_GET, PHPCAS_PROXIED_SERVICE_HTTP_POST,
+     * PHPCAS_PROXIED_SERVICE_IMAP
+     *
+     * @return CAS_ProxiedService
+     * @throws InvalidArgumentException If the service type is unknown.
+     */
+    public function getProxiedService ($type)
+    {
+    	// Sequence validation
+        $this->ensureIsProxy();
+    	$this->ensureAuthenticationCallSuccessful();
+
+    	// Argument validation
+    	if (gettype($type) != 'string')
+        	throw new CAS_TypeMismatchException($type, '$type', 'string');
+
+        switch ($type) {
+        case PHPCAS_PROXIED_SERVICE_HTTP_GET:
+        case PHPCAS_PROXIED_SERVICE_HTTP_POST:
+            $requestClass = $this->_requestImplementation;
+            $request = new $requestClass();
+            if (count($this->_curl_options)) {
+                $request->setCurlOptions($this->_curl_options);
+            }
+            $proxiedService = new $type($request, $this->_serviceCookieJar);
+            if ($proxiedService instanceof CAS_ProxiedService_Testable) {
+                $proxiedService->setCasClient($this);
+            }
+            return $proxiedService;
+        case PHPCAS_PROXIED_SERVICE_IMAP;
+            $proxiedService = new CAS_ProxiedService_Imap($this->_getUser());
+            if ($proxiedService instanceof CAS_ProxiedService_Testable) {
+                $proxiedService->setCasClient($this);
+            }
+            return $proxiedService;
+        default:
+            throw new CAS_InvalidArgumentException(
+                "Unknown proxied-service type, $type."
+            );
+        }
+    }
+
+    /**
+     * Initialize a proxied-service handler with the proxy-ticket it should use.
+     *
+     * @param CAS_ProxiedService $proxiedService service handler
+     *
+     * @return void
+     *
+     * @throws CAS_ProxyTicketException If there is a proxy-ticket failure.
+     *		The code of the Exception will be one of:
+     *			PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_FAILURE
+     * @throws CAS_ProxiedService_Exception If there is a failure getting the
+     * url from the proxied service.
+     */
+    public function initializeProxiedService (CAS_ProxiedService $proxiedService)
+    {
+    	// Sequence validation
+        $this->ensureIsProxy();
+    	$this->ensureAuthenticationCallSuccessful();
+
+        $url = $proxiedService->getServiceUrl();
+        if (!is_string($url)) {
+            throw new CAS_ProxiedService_Exception(
+                "Proxied Service ".get_class($proxiedService)
+                ."->getServiceUrl() should have returned a string, returned a "
+                .gettype($url)." instead."
+            );
+        }
+        $pt = $this->retrievePT($url, $err_code, $err_msg);
+        if (!$pt) {
+            throw new CAS_ProxyTicketException($err_msg, $err_code);
+        }
+        $proxiedService->setProxyTicket($pt);
+    }
+
+    /**
+     * This method is used to access an HTTP[S] service.
+     *
+     * @param string $url       the service to access.
+     * @param int    &$err_code an error code Possible values are
+     * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE,
+     * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE,
+     * PHPCAS_SERVICE_NOT_AVAILABLE.
+     * @param string &$output   the output of the service (also used to give an error
+     * message on failure).
+     *
+     * @return true on success, false otherwise (in this later case, $err_code
+     * gives the reason why it failed and $output contains an error message).
+     */
+    public function serviceWeb($url,&$err_code,&$output)
+    {
+    	// Sequence validation
+        $this->ensureIsProxy();
+    	$this->ensureAuthenticationCallSuccessful();
+
+    	// Argument validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        try {
+            $service = $this->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
+            $service->setUrl($url);
+            $service->send();
+            $output = $service->getResponseBody();
+            $err_code = PHPCAS_SERVICE_OK;
+            return true;
+        } catch (CAS_ProxyTicketException $e) {
+            $err_code = $e->getCode();
+            $output = $e->getMessage();
+            return false;
+        } catch (CAS_ProxiedService_Exception $e) {
+            $lang = $this->getLangObj();
+            $output = sprintf(
+                $lang->getServiceUnavailable(), $url, $e->getMessage()
+            );
+            $err_code = PHPCAS_SERVICE_NOT_AVAILABLE;
+            return false;
+        }
+    }
+
+    /**
+     * This method is used to access an IMAP/POP3/NNTP service.
+     *
+     * @param string $url        a string giving the URL of the service, including
+     * the mailing box for IMAP URLs, as accepted by imap_open().
+     * @param string $serviceUrl a string giving for CAS retrieve Proxy ticket
+     * @param string $flags      options given to imap_open().
+     * @param int    &$err_code  an error code Possible values are
+     * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE,
+     * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE,
+     *  PHPCAS_SERVICE_NOT_AVAILABLE.
+     * @param string &$err_msg   an error message on failure
+     * @param string &$pt        the Proxy Ticket (PT) retrieved from the CAS
+     * server to access the URL on success, false on error).
+     *
+     * @return object an IMAP stream on success, false otherwise (in this later
+     *  case, $err_code gives the reason why it failed and $err_msg contains an
+     *  error message).
+     */
+    public function serviceMail($url,$serviceUrl,$flags,&$err_code,&$err_msg,&$pt)
+    {
+    	// Sequence validation
+        $this->ensureIsProxy();
+    	$this->ensureAuthenticationCallSuccessful();
+
+    	// Argument validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+        if (gettype($serviceUrl) != 'string')
+        	throw new CAS_TypeMismatchException($serviceUrl, '$serviceUrl', 'string');
+        if (gettype($flags) != 'integer')
+        	throw new CAS_TypeMismatchException($flags, '$flags', 'string');
+
+        try {
+            $service = $this->getProxiedService(PHPCAS_PROXIED_SERVICE_IMAP);
+            $service->setServiceUrl($serviceUrl);
+            $service->setMailbox($url);
+            $service->setOptions($flags);
+
+            $stream = $service->open();
+            $err_code = PHPCAS_SERVICE_OK;
+            $pt = $service->getImapProxyTicket();
+            return $stream;
+        } catch (CAS_ProxyTicketException $e) {
+            $err_msg = $e->getMessage();
+            $err_code = $e->getCode();
+            $pt = false;
+            return false;
+        } catch (CAS_ProxiedService_Exception $e) {
+            $lang = $this->getLangObj();
+            $err_msg = sprintf(
+                $lang->getServiceUnavailable(),
+                $url,
+                $e->getMessage()
+            );
+            $err_code = PHPCAS_SERVICE_NOT_AVAILABLE;
+            $pt = false;
+            return false;
+        }
+    }
+
+    /** @} **/
+
+    // KeyKeyKeyKeyXXXX
+    // XX                                                                    XX
+    // XX                  PROXIED CLIENT FEATURES (CAS 2.0)                 XX
+    // XX                                                                    XX
+    // KeyKeyKeyKeyXXXX
+
+    // ########################################################################
+    //  PT
+    // ########################################################################
+    /**
+    * @addtogroup internalService
+    * @{
+    */
+
+    /**
+     * This array will store a list of proxies in front of this application. This
+     * property will only be populated if this script is being proxied rather than
+     * accessed directly.
+     *
+     * It is set in CAS_Client::validateCAS20() and can be read by
+     * CAS_Client::getProxies()
+     *
+     * @access private
+     */
+    private $_proxies = array();
+
+    /**
+     * Answer an array of proxies that are sitting in front of this application.
+     *
+     * This method will only return a non-empty array if we have received and
+     * validated a Proxy Ticket.
+     *
+     * @return array
+     * @access public
+     */
+    public function getProxies()
+    {
+        return $this->_proxies;
+    }
+
+    /**
+     * Set the Proxy array, probably from persistant storage.
+     *
+     * @param array $proxies An array of proxies
+     *
+     * @return void
+     * @access private
+     */
+    private function _setProxies($proxies)
+    {
+        $this->_proxies = $proxies;
+        if (!empty($proxies)) {
+            // For proxy-authenticated requests people are not viewing the URL
+            // directly since the client is another application making a
+            // web-service call.
+            // Because of this, stripping the ticket from the URL is unnecessary
+            // and causes another web-service request to be performed. Additionally,
+            // if session handling on either the client or the server malfunctions
+            // then the subsequent request will not complete successfully.
+            $this->setNoClearTicketsFromUrl();
+        }
+    }
+
+    /**
+     * A container of patterns to be allowed as proxies in front of the cas client.
+     *
+     * @var CAS_ProxyChain_AllowedList
+     */
+    private $_allowed_proxy_chains;
+
+    /**
+     * Answer the CAS_ProxyChain_AllowedList object for this client.
+     *
+     * @return CAS_ProxyChain_AllowedList
+     */
+    public function getAllowedProxyChains ()
+    {
+        if (empty($this->_allowed_proxy_chains)) {
+            $this->_allowed_proxy_chains = new CAS_ProxyChain_AllowedList();
+        }
+        return $this->_allowed_proxy_chains;
+    }
+
+    /** @} */
+    // ########################################################################
+    //  PT VALIDATION
+    // ########################################################################
+    /**
+    * @addtogroup internalProxied
+    * @{
+    */
+
+    /**
+     * This method is used to validate a cas 2.0 ST or PT; halt on failure
+     * Used for all CAS 2.0 validations
+     *
+     * @param string &$validate_url  the url of the reponse
+     * @param string &$text_response the text of the repsones
+     * @param string &$tree_response the domxml tree of the respones
+     *
+     * @return bool true when successfull and issue a CAS_AuthenticationException
+     * and false on an error
+     */
+    public function validateCAS20(&$validate_url,&$text_response,&$tree_response)
+    {
+        phpCAS::traceBegin();
+        phpCAS::trace($text_response);
+        $result = false;
+        // build the URL to validate the ticket
+        if ($this->getAllowedProxyChains()->isProxyingAllowed()) {
+            $validate_url = $this->getServerProxyValidateURL().'&ticket='
+                .$this->getTicket();
+        } else {
+            $validate_url = $this->getServerServiceValidateURL().'&ticket='
+                .$this->getTicket();
+        }
+
+        if ( $this->isProxy() ) {
+            // pass the callback url for CAS proxies
+            $validate_url .= '&pgtUrl='.urlencode($this->_getCallbackURL());
+        }
+
+        // open and read the URL
+        if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) {
+            phpCAS::trace(
+                'could not open URL \''.$validate_url.'\' to validate ('.$err_msg.')'
+            );
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket not validated', $validate_url,
+                true/*$no_response*/
+            );
+            $result = false;
+        }
+
+        // create new DOMDocument object
+        $dom = new DOMDocument();
+        // Fix possible whitspace problems
+        $dom->preserveWhiteSpace = false;
+        // CAS servers should only return data in utf-8
+        $dom->encoding = "utf-8";
+        // read the response of the CAS server into a DOMDocument object
+        if ( !($dom->loadXML($text_response))) {
+            // read failed
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket not validated', $validate_url,
+                false/*$no_response*/, true/*$bad_response*/, $text_response
+            );
+            $result = false;
+        } else if ( !($tree_response = $dom->documentElement) ) {
+            // read the root node of the XML tree
+            // read failed
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket not validated', $validate_url,
+                false/*$no_response*/, true/*$bad_response*/, $text_response
+            );
+            $result = false;
+        } else if ($tree_response->localName != 'serviceResponse') {
+            // insure that tag name is 'serviceResponse'
+            // bad root node
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket not validated', $validate_url,
+                false/*$no_response*/, true/*$bad_response*/, $text_response
+            );
+            $result = false;
+        } else if ($tree_response->getElementsByTagName("authenticationSuccess")->length != 0) {
+            // authentication succeded, extract the user name
+            $success_elements = $tree_response
+                ->getElementsByTagName("authenticationSuccess");
+            if ( $success_elements->item(0)->getElementsByTagName("user")->length == 0) {
+                // no user specified => error
+                throw new CAS_AuthenticationException(
+                    $this, 'Ticket not validated', $validate_url,
+                    false/*$no_response*/, true/*$bad_response*/, $text_response
+                );
+                $result = false;
+            } else {
+                $this->_setUser(
+                    trim(
+                        $success_elements->item(0)->getElementsByTagName("user")->item(0)->nodeValue
+                    )
+                );
+                $this->_readExtraAttributesCas20($success_elements);
+                // Store the proxies we are sitting behind for authorization checking
+                $proxyList = array();
+                if ( sizeof($arr = $success_elements->item(0)->getElementsByTagName("proxy")) > 0) {
+                    foreach ($arr as $proxyElem) {
+                        phpCAS::trace("Found Proxy: ".$proxyElem->nodeValue);
+                        $proxyList[] = trim($proxyElem->nodeValue);
+                    }
+                    $this->_setProxies($proxyList);
+                    phpCAS::trace("Storing Proxy List");
+                }
+                // Check if the proxies in front of us are allowed
+                if (!$this->getAllowedProxyChains()->isProxyListAllowed($proxyList)) {
+                    throw new CAS_AuthenticationException(
+                        $this, 'Proxy not allowed', $validate_url,
+                        false/*$no_response*/, true/*$bad_response*/,
+                        $text_response
+                    );
+                    $result = false;
+                } else {
+                    $result = true;
+                }
+            }
+        } else if ( $tree_response->getElementsByTagName("authenticationFailure")->length != 0) {
+            // authentication succeded, extract the error code and message
+            $auth_fail_list = $tree_response
+                ->getElementsByTagName("authenticationFailure");
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket not validated', $validate_url,
+                false/*$no_response*/, false/*$bad_response*/,
+                $text_response,
+                $auth_fail_list->item(0)->getAttribute('code')/*$err_code*/,
+                trim($auth_fail_list->item(0)->nodeValue)/*$err_msg*/
+            );
+            $result = false;
+        } else {
+            throw new CAS_AuthenticationException(
+                $this, 'Ticket not validated', $validate_url,
+                false/*$no_response*/, true/*$bad_response*/,
+                $text_response
+            );
+            $result = false;
+        }
+        if ($result) {
+            $this->_renameSession($this->getTicket());
+        }
+        // at this step, Ticket has been validated and $this->_user has been set,
+
+        phpCAS::traceEnd($result);
+        return $result;
+    }
+
+
+    /**
+     * This method will parse the DOM and pull out the attributes from the XML
+     * payload and put them into an array, then put the array into the session.
+     *
+     * @param string $success_elements payload of the response
+     *
+     * @return bool true when successfull, halt otherwise by calling
+     * CAS_Client::_authError().
+     */
+    private function _readExtraAttributesCas20($success_elements)
+    {
+        phpCAS::traceBegin();
+
+        $extra_attributes = array();
+
+        // "Jasig Style" Attributes:
+        //
+        // 	<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+        // 		<cas:authenticationSuccess>
+        // 			<cas:user>jsmith</cas:user>
+        // 			<cas:attributes>
+        // 				<cas:attraStyle>RubyCAS</cas:attraStyle>
+        // 				<cas:surname>Smith</cas:surname>
+        // 				<cas:givenName>John</cas:givenName>
+        // 				<cas:memberOf>CN=Staff,OU=Groups,DC=example,DC=edu</cas:memberOf>
+        // 				<cas:memberOf>CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu</cas:memberOf>
+        // 			</cas:attributes>
+        // 			<cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+        // 		</cas:authenticationSuccess>
+        // 	</cas:serviceResponse>
+        //
+        if ( $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
+            //
+            // 	<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+            // 		<cas:authenticationSuccess>
+            // 			<cas:user>jsmith</cas:user>
+            //
+            // 			<cas:attraStyle>RubyCAS</cas:attraStyle>
+            // 			<cas:surname>Smith</cas:surname>
+            // 			<cas:givenName>John</cas:givenName>
+            // 			<cas:memberOf>CN=Staff,OU=Groups,DC=example,DC=edu</cas:memberOf>
+            // 			<cas:memberOf>CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu</cas:memberOf>
+            //
+            // 			<cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+            // 		</cas:authenticationSuccess>
+            // 	</cas:serviceResponse>
+            //
+            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':
+                    continue;
+                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
+                        );
+                    }
+                }
+            }
+        }
+
+        // "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.
+        //
+        // 	<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+        // 		<cas:authenticationSuccess>
+        // 			<cas:user>jsmith</cas:user>
+        //
+        // 			<cas:attribute name='attraStyle' value='Name-Value' />
+        // 			<cas:attribute name='surname' value='Smith' />
+        // 			<cas:attribute name='givenName' value='John' />
+        // 			<cas:attribute name='memberOf' value='CN=Staff,OU=Groups,DC=example,DC=edu' />
+        // 			<cas:attribute name='memberOf' value='CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu' />
+        //
+        // 			<cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+        // 		</cas:authenticationSuccess>
+        // 	</cas:serviceResponse>
+        //
+        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;
+    }
+
+    /**
+     * Add an attribute value to an array of attributes.
+     *
+     * @param array  &$attributeArray reference to array
+     * @param string $name            name of attribute
+     * @param string $value           value of attribute
+     *
+     * @return void
+     */
+    private function _addAttributeToArray(array &$attributeArray, $name, $value)
+    {
+        // If multiple attributes exist, add as an array value
+        if (isset($attributeArray[$name])) {
+            // Initialize the array with the existing value
+            if (!is_array($attributeArray[$name])) {
+                $existingValue = $attributeArray[$name];
+                $attributeArray[$name] = array($existingValue);
+            }
+
+            $attributeArray[$name][] = trim($value);
+        } else {
+            $attributeArray[$name] = trim($value);
+        }
+    }
+
+    /** @} */
+
+    // KeyKeyKeyKeyXXXX
+    // XX                                                                    XX
+    // XX                               MISC                                 XX
+    // XX                                                                    XX
+    // KeyKeyKeyKeyXXXX
+
+    /**
+     * @addtogroup internalMisc
+     * @{
+     */
+
+    // ########################################################################
+    //  URL
+    // ########################################################################
+    /**
+    * the URL of the current request (without any ticket CGI parameter). Written
+    * and read by CAS_Client::getURL().
+    *
+    * @hideinitializer
+    */
+    private $_url = '';
+
+
+    /**
+     * This method sets the URL of the current request
+     *
+     * @param string $url url to set for service
+     *
+     * @return void
+     */
+    public function setURL($url)
+    {
+    	// Argument Validation
+    	if (gettype($url) != 'string')
+        	throw new CAS_TypeMismatchException($url, '$url', 'string');
+
+        $this->_url = $url;
+    }
+
+    /**
+     * This method returns the URL of the current request (without any ticket
+     * CGI parameter).
+     *
+     * @return The URL
+     */
+    public function getURL()
+    {
+        phpCAS::traceBegin();
+        // the URL is built when needed only
+        if ( empty($this->_url) ) {
+            $final_uri = '';
+            // remove the ticket if present in the URL
+            $final_uri = ($this->_isHttps()) ? 'https' : 'http';
+            $final_uri .= '://';
+
+            $final_uri .= $this->_getClientUrl();
+            $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]);
+
+                // If the query string still has anything left,
+                // append it to the final URI
+                if ($query_string !== '') {
+                    $final_uri	.= "?$query_string";
+                }
+            }
+
+            phpCAS::trace("Final URI: $final_uri");
+            $this->setURL($final_uri);
+        }
+        phpCAS::traceEnd($this->_url);
+        return $this->_url;
+    }
+
+
+    /**
+     * Try to figure out the phpCas client URL with possible Proxys / Ports etc.
+     *
+     * @return string Server URL with domain:port
+     */
+    private function _getClientUrl()
+    {
+        $server_url = '';
+        if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
+            // explode the host list separated by comma and use the first host
+            $hosts = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST']);
+            $server_url = $hosts[0];
+        } else if (!empty($_SERVER['HTTP_X_FORWARDED_SERVER'])) {
+            $server_url = $_SERVER['HTTP_X_FORWARDED_SERVER'];
+        } else {
+            if (empty($_SERVER['SERVER_NAME'])) {
+                $server_url = $_SERVER['HTTP_HOST'];
+            } else {
+                $server_url = $_SERVER['SERVER_NAME'];
+            }
+        }
+        if (!strpos($server_url, ':')) {
+            if (empty($_SERVER['HTTP_X_FORWARDED_PORT'])) {
+                $server_port = $_SERVER['SERVER_PORT'];
+            } else {
+                $server_port = $_SERVER['HTTP_X_FORWARDED_PORT'];
+            }
+
+            if ( ($this->_isHttps() && $server_port!=443)
+                || (!$this->_isHttps() && $server_port!=80)
+            ) {
+                $server_url .= ':';
+                $server_url .= $server_port;
+            }
+        }
+        return $server_url;
+    }
+
+    /**
+     * This method checks to see if the request is secured via HTTPS
+     *
+     * @return bool true if https, false otherwise
+     */
+    private function _isHttps()
+    {
+        if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
+            return ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https');
+        }
+        if ( isset($_SERVER['HTTPS'])
+            && !empty($_SERVER['HTTPS'])
+            && $_SERVER['HTTPS'] == 'on'
+        ) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Removes a parameter from a query string
+     *
+     * @param string $parameterName name of parameter
+     * @param string $queryString   query string
+     *
+     * @return string new query string
+     *
+     * @link http://stackoverflow.com/questions/1842681/regular-expression-to-remove-one-parameter-from-query-string
+     */
+    private function _removeParameterFromQueryString($parameterName, $queryString)
+    {
+        $parameterName	= preg_quote($parameterName);
+        return preg_replace(
+            "/&$parameterName(=[^&]*)?|^$parameterName(=[^&]*)?&?/",
+            '', $queryString
+        );
+    }
+
+    /**
+     * This method is used to append query parameters to an url. Since the url
+     * might already contain parameter it has to be detected and to build a proper
+     * URL
+     *
+     * @param string $url   base url to add the query params to
+     * @param string $query params in query form with & separated
+     *
+     * @return url with query params
+     */
+    private function _buildQueryUrl($url, $query)
+    {
+        $url .= (strstr($url, '?') === false) ? '?' : '&';
+        $url .= $query;
+        return $url;
+    }
+
+    /**
+     * Renaming the session
+     *
+     * @param string $ticket name of the ticket
+     *
+     * @return void
+     */
+    private 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 = preg_replace('/[^a-zA-Z0-9\-]/', '', $ticket);
+                phpCAS :: trace("Starting session: ". $session_id);
+                session_id($session_id);
+                session_start();
+                phpCAS :: trace("Restoring old session vars");
+                $_SESSION = $old_session;
+            } else {
+                phpCAS :: error(
+                    'Session should only be renamed after successfull authentication'
+                );
+            }
+        } else {
+            phpCAS :: trace(
+                "Skipping session rename since phpCAS is not handling the session."
+            );
+        }
+        phpCAS::traceEnd();
+    }
+
+
+    // ########################################################################
+    //  AUTHENTICATION ERROR HANDLING
+    // ########################################################################
+    /**
+    * This method is used to print the HTML output when the user was not
+    * authenticated.
+    *
+    * @param string $failure      the failure that occured
+    * @param string $cas_url      the URL the CAS server was asked for
+    * @param bool   $no_response  the response from the CAS server (other
+    * parameters are ignored if true)
+    * @param bool   $bad_response bad response from the CAS server ($err_code
+    * and $err_msg ignored if true)
+    * @param string $cas_response the response of the CAS server
+    * @param int    $err_code     the error code given by the CAS server
+    * @param string $err_msg      the error message given by the CAS server
+    *
+    * @return void
+    */
+    private function _authError(
+        $failure,
+        $cas_url,
+        $no_response,
+        $bad_response='',
+        $cas_response='',
+        $err_code='',
+        $err_msg=''
+    ) {
+        phpCAS::traceBegin();
+        $lang = $this->getLangObj();
+        $this->printHTMLHeader($lang->getAuthenticationFailed());
+        printf(
+            $lang->getYouWereNotAuthenticated(), htmlentities($this->getURL()),
+            $_SERVER['SERVER_ADMIN']
+        );
+        phpCAS::trace('CAS URL: '.$cas_url);
+        phpCAS::trace('Authentication failure: '.$failure);
+        if ( $no_response ) {
+            phpCAS::trace('Reason: no response from the CAS server');
+        } else {
+            if ( $bad_response ) {
+                phpCAS::trace('Reason: bad response from the CAS server');
+            } else {
+                switch ($this->getServerVersion()) {
+                case CAS_VERSION_1_0:
+                    phpCAS::trace('Reason: CAS error');
+                    break;
+                case CAS_VERSION_2_0:
+                    if ( empty($err_code) ) {
+                        phpCAS::trace('Reason: no CAS error');
+                    } else {
+                        phpCAS::trace(
+                            'Reason: ['.$err_code.'] CAS error: '.$err_msg
+                        );
+                    }
+                    break;
+                }
+            }
+            phpCAS::trace('CAS response: '.$cas_response);
+        }
+        $this->printHTMLFooter();
+        phpCAS::traceExit();
+        throw new CAS_GracefullTerminationException();
+    }
+
+    // ########################################################################
+    //  PGTIOU/PGTID and logoutRequest rebroadcasting
+    // ########################################################################
+
+    /**
+     * Boolean of whether to rebroadcast pgtIou/pgtId and logoutRequest, and
+     * array of the nodes.
+     */
+    private $_rebroadcast = false;
+    private $_rebroadcast_nodes = array();
+
+    /**
+     * Constants used for determining rebroadcast node type.
+     */
+    const HOSTNAME = 0;
+    const IP = 1;
+
+    /**
+     * Determine the node type from the URL.
+     *
+     * @param String $nodeURL The node URL.
+     *
+     * @return string hostname
+     *
+     */
+    private function _getNodeType($nodeURL)
+    {
+        phpCAS::traceBegin();
+        if (preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $nodeURL)) {
+            phpCAS::traceEnd(self::IP);
+            return self::IP;
+        } else {
+            phpCAS::traceEnd(self::HOSTNAME);
+            return self::HOSTNAME;
+        }
+    }
+
+    /**
+     * Store the rebroadcast node for pgtIou/pgtId and logout requests.
+     *
+     * @param string $rebroadcastNodeUrl The rebroadcast node URL.
+     *
+     * @return void
+     */
+    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');
+
+        // Store the rebroadcast node and set flag
+        $this->_rebroadcast = true;
+        $this->_rebroadcast_nodes[] = $rebroadcastNodeUrl;
+    }
+
+    /**
+     * An array to store extra rebroadcast curl options.
+     */
+    private $_rebroadcast_headers = array();
+
+    /**
+     * This method is used to add header parameters when rebroadcasting
+     * pgtIou/pgtId or logoutRequest.
+     *
+     * @param string $header Header to send when rebroadcasting.
+     *
+     * @return void
+     */
+    public function addRebroadcastHeader($header)
+    {
+    	if (gettype($header) != 'string')
+        	throw new CAS_TypeMismatchException($header, '$header', 'string');
+
+        $this->_rebroadcast_headers[] = $header;
+    }
+
+    /**
+     * Constants used for determining rebroadcast type (logout or pgtIou/pgtId).
+     */
+    const LOGOUT = 0;
+    const PGTIOU = 1;
+
+    /**
+     * This method rebroadcasts logout/pgtIou requests. Can be LOGOUT,PGTIOU
+     *
+     * @param int $type type of rebroadcasting.
+     *
+     * @return void
+     */
+    private function _rebroadcast($type)
+    {
+        phpCAS::traceBegin();
+
+        $rebroadcast_curl_options = array(
+        CURLOPT_FAILONERROR => 1,
+        CURLOPT_FOLLOWLOCATION => 1,
+        CURLOPT_RETURNTRANSFER => 1,
+        CURLOPT_CONNECTTIMEOUT => 1,
+        CURLOPT_TIMEOUT => 4);
+
+        // Try to determine the IP address of the server
+        if (!empty($_SERVER['SERVER_ADDR'])) {
+            $ip = $_SERVER['SERVER_ADDR'];
+        } else if (!empty($_SERVER['LOCAL_ADDR'])) {
+            // IIS 7
+            $ip = $_SERVER['LOCAL_ADDR'];
+        }
+        // Try to determine the DNS name of the server
+        if (!empty($ip)) {
+            $dns = gethostbyaddr($ip);
+        }
+        $multiClassName = 'CAS_Request_CurlMultiRequest';
+        $multiRequest = new $multiClassName();
+
+        for ($i = 0; $i < sizeof($this->_rebroadcast_nodes); $i++) {
+            if ((($this->_getNodeType($this->_rebroadcast_nodes[$i]) == self::HOSTNAME) && !empty($dns) && (stripos($this->_rebroadcast_nodes[$i], $dns) === false))
+                || (($this->_getNodeType($this->_rebroadcast_nodes[$i]) == self::IP) && !empty($ip) && (stripos($this->_rebroadcast_nodes[$i], $ip) === false))
+            ) {
+                phpCAS::trace(
+                    'Rebroadcast target URL: '.$this->_rebroadcast_nodes[$i]
+                    .$_SERVER['REQUEST_URI']
+                );
+                $className = $this->_requestImplementation;
+                $request = new $className();
+
+                $url = $this->_rebroadcast_nodes[$i].$_SERVER['REQUEST_URI'];
+                $request->setUrl($url);
+
+                if (count($this->_rebroadcast_headers)) {
+                    $request->addHeaders($this->_rebroadcast_headers);
+                }
+
+                $request->makePost();
+                if ($type == self::LOGOUT) {
+                    // Logout request
+                    $request->setPostBody(
+                        'rebroadcast=false&logoutRequest='.$_POST['logoutRequest']
+                    );
+                } else if ($type == self::PGTIOU) {
+                    // pgtIou/pgtId rebroadcast
+                    $request->setPostBody('rebroadcast=false');
+                }
+
+                $request->setCurlOptions($rebroadcast_curl_options);
+
+                $multiRequest->addRequest($request);
+            } else {
+                phpCAS::trace(
+                    'Rebroadcast not sent to self: '
+                    .$this->_rebroadcast_nodes[$i].' == '.(!empty($ip)?$ip:'')
+                    .'/'.(!empty($dns)?$dns:'')
+                );
+            }
+        }
+        // We need at least 1 request
+        if ($multiRequest->getNumRequests() > 0) {
+            $multiRequest->send();
+        }
+        phpCAS::traceEnd();
+    }
+
+    /** @} */
+}
+
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/CookieJar.php b/vendor/jasig/phpcas/source/CAS/CookieJar.php
new file mode 100755
index 00000000000..549b8929f02
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/CookieJar.php
@@ -0,0 +1,385 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/CookieJar.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class provides access to service cookies and handles parsing of response
+ * headers to pull out cookie values.
+ *
+ * @class    CAS_CookieJar
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_CookieJar
+{
+
+    private $_cookies;
+
+    /**
+     * Create a new cookie jar by passing it a reference to an array in which it
+     * should store cookies.
+     *
+     * @param array &$storageArray Array to store cookies
+     *
+     * @return void
+     */
+    public function __construct (array &$storageArray)
+    {
+        $this->_cookies =& $storageArray;
+    }
+
+    /**
+     * Store cookies for a web service request.
+     * Cookie storage is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt
+     *
+     * @param string $request_url      The URL that generated the response headers.
+     * @param array  $response_headers An array of the HTTP response header strings.
+     *
+     * @return void
+     *
+     * @access private
+     */
+    public function storeCookies ($request_url, $response_headers)
+    {
+        $urlParts = parse_url($request_url);
+        $defaultDomain = $urlParts['host'];
+
+        $cookies = $this->parseCookieHeaders($response_headers, $defaultDomain);
+
+        // var_dump($cookies);
+        foreach ($cookies as $cookie) {
+            // Enforce the same-origin policy by verifying that the cookie
+            // would match the url that is setting it
+            if (!$this->cookieMatchesTarget($cookie, $urlParts)) {
+                continue;
+            }
+
+            // store the cookie
+            $this->storeCookie($cookie);
+
+            phpCAS::trace($cookie['name'].' -> '.$cookie['value']);
+        }
+    }
+
+    /**
+     * Retrieve cookies applicable for a web service request.
+     * Cookie applicability is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt
+     *
+     * @param string $request_url The url that the cookies will be for.
+     *
+     * @return array An array containing cookies. E.g. array('name' => 'val');
+     *
+     * @access private
+     */
+    public function getCookies ($request_url)
+    {
+        if (!count($this->_cookies)) {
+            return array();
+        }
+
+        // If our request URL can't be parsed, no cookies apply.
+        $target = parse_url($request_url);
+        if ($target === false) {
+            return array();
+        }
+
+        $this->expireCookies();
+
+        $matching_cookies = array();
+        foreach ($this->_cookies as $key => $cookie) {
+            if ($this->cookieMatchesTarget($cookie, $target)) {
+                $matching_cookies[$cookie['name']] = $cookie['value'];
+            }
+        }
+        return $matching_cookies;
+    }
+
+
+    /**
+     * Parse Cookies without PECL
+     * From the comments in http://php.net/manual/en/function.http-parse-cookie.php
+     *
+     * @param array  $header        array of header lines.
+     * @param string $defaultDomain The domain to use if none is specified in
+     * the cookie.
+     *
+     * @return array of cookies
+     */
+    protected function parseCookieHeaders( $header, $defaultDomain )
+    {
+        phpCAS::traceBegin();
+        $cookies = array();
+        foreach ( $header as $line ) {
+            if ( preg_match('/^Set-Cookie2?: /i', $line)) {
+                $cookies[] = $this->parseCookieHeader($line, $defaultDomain);
+            }
+        }
+
+        phpCAS::traceEnd($cookies);
+        return $cookies;
+    }
+
+    /**
+     * Parse a single cookie header line.
+     *
+     * Based on RFC2965 http://www.ietf.org/rfc/rfc2965.txt
+     *
+     * @param string $line          The header line.
+     * @param string $defaultDomain The domain to use if none is specified in
+     * the cookie.
+     *
+     * @return array
+     */
+    protected function parseCookieHeader ($line, $defaultDomain)
+    {
+        if (!$defaultDomain) {
+            throw new CAS_InvalidArgumentException(
+                '$defaultDomain was not provided.'
+            );
+        }
+
+        // Set our default values
+        $cookie = array(
+            'domain' => $defaultDomain,
+            'path' => '/',
+            'secure' => false,
+        );
+
+        $line = preg_replace('/^Set-Cookie2?: /i', '', trim($line));
+
+        // trim any trailing semicolons.
+        $line = trim($line, ';');
+
+        phpCAS::trace("Cookie Line: $line");
+
+        // This implementation makes the assumption that semicolons will not
+        // be present in quoted attribute values. While attribute values that
+        // contain semicolons are allowed by RFC2965, they are hopefully rare
+        // enough to ignore for our purposes. Most browsers make the same
+        // assumption.
+        $attributeStrings = explode(';', $line);
+
+        foreach ( $attributeStrings as $attributeString ) {
+            // split on the first equals sign and use the rest as value
+            $attributeParts = explode('=', $attributeString, 2);
+
+            $attributeName = trim($attributeParts[0]);
+            $attributeNameLC = strtolower($attributeName);
+
+            if (isset($attributeParts[1])) {
+                $attributeValue = trim($attributeParts[1]);
+                // Values may be quoted strings.
+                if (strpos($attributeValue, '"') === 0) {
+                    $attributeValue = trim($attributeValue, '"');
+                    // unescape any escaped quotes:
+                    $attributeValue = str_replace('\"', '"', $attributeValue);
+                }
+            } else {
+                $attributeValue = null;
+            }
+
+            switch ($attributeNameLC) {
+            case 'expires':
+                $cookie['expires'] = strtotime($attributeValue);
+                break;
+            case 'max-age':
+                $cookie['max-age'] = (int)$attributeValue;
+                // Set an expiry time based on the max-age
+                if ($cookie['max-age']) {
+                    $cookie['expires'] = time() + $cookie['max-age'];
+                } else {
+                    // If max-age is zero, then the cookie should be removed
+                    // imediately so set an expiry before now.
+                    $cookie['expires'] = time() - 1;
+                }
+                break;
+            case 'secure':
+                $cookie['secure'] = true;
+                break;
+            case 'domain':
+            case 'path':
+            case 'port':
+            case 'version':
+            case 'comment':
+            case 'commenturl':
+            case 'discard':
+            case 'httponly':
+                $cookie[$attributeNameLC] = $attributeValue;
+                break;
+            default:
+                $cookie['name'] = $attributeName;
+                $cookie['value'] = $attributeValue;
+            }
+        }
+
+        return $cookie;
+    }
+
+    /**
+     * Add, update, or remove a cookie.
+     *
+     * @param array $cookie A cookie array as created by parseCookieHeaders()
+     *
+     * @return void
+     *
+     * @access protected
+     */
+    protected function storeCookie ($cookie)
+    {
+        // Discard any old versions of this cookie.
+        $this->discardCookie($cookie);
+        $this->_cookies[] = $cookie;
+
+    }
+
+    /**
+     * Discard an existing cookie
+     *
+     * @param array $cookie An cookie
+     *
+     * @return void
+     *
+     * @access protected
+     */
+    protected function discardCookie ($cookie)
+    {
+        if (!isset($cookie['domain'])
+            || !isset($cookie['path'])
+            || !isset($cookie['path'])
+        ) {
+            throw new CAS_InvalidArgumentException('Invalid Cookie array passed.');
+        }
+
+        foreach ($this->_cookies as $key => $old_cookie) {
+            if ( $cookie['domain'] == $old_cookie['domain']
+                && $cookie['path'] == $old_cookie['path']
+                && $cookie['name'] == $old_cookie['name']
+            ) {
+                unset($this->_cookies[$key]);
+            }
+        }
+    }
+
+    /**
+     * Go through our stored cookies and remove any that are expired.
+     *
+     * @return void
+     *
+     * @access protected
+     */
+    protected function expireCookies ()
+    {
+        foreach ($this->_cookies as $key => $cookie) {
+            if (isset($cookie['expires']) && $cookie['expires'] < time()) {
+                unset($this->_cookies[$key]);
+            }
+        }
+    }
+
+    /**
+     * Answer true if cookie is applicable to a target.
+     *
+     * @param array $cookie An array of cookie attributes.
+     * @param array $target An array of URL attributes as generated by parse_url().
+     *
+     * @return bool
+     *
+     * @access private
+     */
+    protected function cookieMatchesTarget ($cookie, $target)
+    {
+        if (!is_array($target)) {
+            throw new CAS_InvalidArgumentException(
+                '$target must be an array of URL attributes as generated by parse_url().'
+            );
+        }
+        if (!isset($target['host'])) {
+            throw new CAS_InvalidArgumentException(
+                '$target must be an array of URL attributes as generated by parse_url().'
+            );
+        }
+
+        // Verify that the scheme matches
+        if ($cookie['secure'] && $target['scheme'] != 'https') {
+            return false;
+        }
+
+        // Verify that the host matches
+        // Match domain and mulit-host cookies
+        if (strpos($cookie['domain'], '.') === 0) {
+            // .host.domain.edu cookies are valid for host.domain.edu
+            if (substr($cookie['domain'], 1) == $target['host']) {
+                // continue with other checks
+            } else {
+                // non-exact host-name matches.
+                // check that the target host a.b.c.edu is within .b.c.edu
+                $pos = strripos($target['host'], $cookie['domain']);
+                if (!$pos) {
+                    return false;
+                }
+                // verify that the cookie domain is the last part of the host.
+                if ($pos + strlen($cookie['domain']) != strlen($target['host'])) {
+                    return false;
+                }
+                // verify that the host name does not contain interior dots as per
+                // RFC 2965 section 3.3.2  Rejecting Cookies
+                // http://www.ietf.org/rfc/rfc2965.txt
+                $hostname = substr($target['host'], 0, $pos);
+                if (strpos($hostname, '.') !== false) {
+                    return false;
+                }
+            }
+        } else {
+            // If the cookie host doesn't begin with '.',
+            // the host must case-insensitive match exactly
+            if (strcasecmp($target['host'], $cookie['domain']) !== 0) {
+                return false;
+            }
+        }
+
+        // Verify that the port matches
+        if (isset($cookie['ports'])
+            && !in_array($target['port'], $cookie['ports'])
+        ) {
+            return false;
+        }
+
+        // Verify that the path matches
+        if (strpos($target['path'], $cookie['path']) !== 0) {
+            return false;
+        }
+
+        return true;
+    }
+
+}
+
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/Exception.php b/vendor/jasig/phpcas/source/CAS/Exception.php
new file mode 100755
index 00000000000..d956d197590
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Exception.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Exception.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * A root exception interface for all exceptions in phpCAS.
+ *
+ * All exceptions thrown in phpCAS should implement this interface to allow them
+ * to be caught as a category by clients. Each phpCAS exception should extend
+ * an appropriate SPL exception class that best fits its type.
+ *
+ * For example, an InvalidArgumentException in phpCAS should be defined as
+ *
+ *		class CAS_InvalidArgumentException
+ *			extends InvalidArgumentException
+ *			implements CAS_Exception
+ *		{ }
+ *
+ * This definition allows the CAS_InvalidArgumentException to be caught as either
+ * an InvalidArgumentException or as a CAS_Exception.
+ *
+ * @class    CAS_Exception
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ */
+interface CAS_Exception
+{
+
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/GracefullTerminationException.php b/vendor/jasig/phpcas/source/CAS/GracefullTerminationException.php
new file mode 100644
index 00000000000..6d845dfac8e
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/GracefullTerminationException.php
@@ -0,0 +1,86 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/GracefullTerminationException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * An exception for terminatinating execution or to throw for unit testing
+ *
+ * @class     CAS_GracefullTerminationException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class CAS_GracefullTerminationException
+extends RuntimeException
+implements CAS_Exception
+{
+
+    /**
+     * Test if exceptions should be thrown or if we should just exit.
+     * In production usage we want to just exit cleanly when prompting the user
+     * for a redirect without filling the error logs with uncaught exceptions.
+     * In unit testing scenarios we cannot exit or we won't be able to continue
+     * with our tests.
+     *
+     * @param string $message Message Text
+     * @param string $code    Error code
+     *
+     * @return void
+     */
+    public function __construct ($message = 'Terminate Gracefully', $code = 0)
+    {
+        // Exit cleanly to avoid filling up the logs with uncaught exceptions.
+        if (self::$_exitWhenThrown) {
+            exit;
+        } else {
+            // Throw exceptions to allow unit testing to continue;
+            parent::__construct($message, $code);
+        }
+    }
+
+    private static $_exitWhenThrown = true;
+    /**
+    * Force phpcas to thow Exceptions instead of calling exit()
+    * Needed for unit testing. Generally shouldn't be used in production due to
+    * an increase in Apache error logging if CAS_GracefulTerminiationExceptions
+    * are not caught and handled.
+    *
+    * @return void
+    */
+    public static function throwInsteadOfExiting()
+    {
+        self::$_exitWhenThrown = false;
+    }
+
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/InvalidArgumentException.php b/vendor/jasig/phpcas/source/CAS/InvalidArgumentException.php
new file mode 100755
index 00000000000..ba43d39f8a1
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/InvalidArgumentException.php
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/InvalidArgumentException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Exception that denotes invalid arguments were passed.
+ *
+ * @class    CAS_InvalidArgumentException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_InvalidArgumentException
+extends InvalidArgumentException
+implements CAS_Exception
+{
+
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/Catalan.php b/vendor/jasig/phpcas/source/CAS/Languages/Catalan.php
new file mode 100644
index 00000000000..a0b64d8eb5f
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/Catalan.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/Catalan.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Iván-Benjamín García Torà <ivaniclixx@gmail.com>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Catalan language class
+ *
+ * @class    CAS_Languages_Catalan
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Iván-Benjamín García Torà <ivaniclixx@gmail.com>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @sa @link internalLang Internationalization @endlink
+ * @ingroup internalLang
+ */
+class CAS_Languages_Catalan implements CAS_Languages_LanguageInterface
+{
+    /**
+    * Get the using server string
+    *
+    * @return string using server
+    */
+    public function getUsingServer()
+    {
+        return 'usant servidor';
+    }
+
+    /**
+    * Get authentication wanted string
+    *
+    * @return string authentication wanted
+    */
+    public function getAuthenticationWanted()
+    {
+        return 'Autentificació CAS necessària!';
+    }
+
+    /**
+    * Get logout string
+    *
+    * @return string logout
+    */
+    public function getLogout()
+    {
+        return 'Sortida de CAS necessària!';
+    }
+
+    /**
+    * Get the should have been redirected string
+    *
+    * @return string should habe been redirected
+    */
+    public function getShouldHaveBeenRedirected()
+    {
+        return 'Ja hauria d\ haver estat redireccionat al servidor CAS. Feu click <a href="%s">aquí</a> per a continuar.';
+    }
+
+    /**
+    * Get authentication failed string
+    *
+    * @return string authentication failed
+    */
+    public function getAuthenticationFailed()
+    {
+        return 'Autentificació CAS fallida!';
+    }
+
+    /**
+    * Get the your were not authenticated string
+    *
+    * @return string not authenticated
+    */
+    public function getYouWereNotAuthenticated()
+    {
+        return '<p>No estàs autentificat.</p><p>Pots tornar a intentar-ho fent click <a href="%s">aquí</a>.</p><p>Si el problema persisteix hauría de contactar amb l\'<a href="mailto:%s">administrador d\'aquest llocc</a>.</p>';
+    }
+
+    /**
+    * Get the service unavailable string
+    *
+    * @return string service unavailable
+    */
+    public function getServiceUnavailable()
+    {
+        return 'El servei `<b>%s</b>\' no està disponible (<b>%s</b>).';
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/English.php b/vendor/jasig/phpcas/source/CAS/Languages/English.php
new file mode 100644
index 00000000000..002c1ba49e9
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/English.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/English.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * English language class
+ *
+ * @class    CAS_Languages_English
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @sa @link internalLang Internationalization @endlink
+ * @ingroup internalLang
+ */
+class CAS_Languages_English implements CAS_Languages_LanguageInterface
+{
+    /**
+     * Get the using server string
+     *
+     * @return string using server
+     */
+    public function getUsingServer()
+    {
+        return 'using server';
+    }
+
+    /**
+     * Get authentication wanted string
+     *
+     * @return string authentication wanted
+     */
+    public function getAuthenticationWanted()
+    {
+        return 'CAS Authentication wanted!';
+    }
+
+    /**
+     * Get logout string
+     *
+     * @return string logout
+     */
+    public function getLogout()
+    {
+        return 'CAS logout wanted!';
+    }
+
+    /**
+     * Get the should have been redirected string
+     *
+     * @return string should habe been redirected
+     */
+    public function getShouldHaveBeenRedirected()
+    {
+        return 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.';
+    }
+
+    /**
+    * Get authentication failed string
+    *
+    * @return string authentication failed
+    */
+    public function getAuthenticationFailed()
+    {
+        return 'CAS Authentication failed!';
+    }
+
+    /**
+    * Get the your were not authenticated string
+    *
+    * @return string not authenticated
+    */
+    public function getYouWereNotAuthenticated()
+    {
+        return '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>';
+    }
+
+    /**
+    * Get the service unavailable string
+    *
+    * @return string service unavailable
+    */
+    public function getServiceUnavailable()
+    {
+        return 'The service `<b>%s</b>\' is not available (<b>%s</b>).';
+    }
+}
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/French.php b/vendor/jasig/phpcas/source/CAS/Languages/French.php
new file mode 100644
index 00000000000..b99847a7f06
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/French.php
@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/French.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * French language class
+ *
+ * @class    CAS_Languages_French
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @sa @link internalLang Internationalization @endlink
+ * @ingroup internalLang
+ */
+class CAS_Languages_French implements CAS_Languages_LanguageInterface
+{
+    /**
+     * Get the using server string
+     *
+     * @return string using server
+     */
+    public function getUsingServer()
+    {
+        return 'utilisant le serveur';
+    }
+
+    /**
+     * Get authentication wanted string
+     *
+     * @return string authentication wanted
+     */
+    public function getAuthenticationWanted()
+    {
+        return 'Authentication CAS nécessaire&nbsp;!';
+    }
+
+    /**
+     * Get logout string
+     *
+     * @return string logout
+     */
+    public function getLogout()
+    {
+        return 'Déconnexion demandée&nbsp;!';
+    }
+
+    /**
+     * Get the should have been redirected string
+     *
+     * @return string should habe been redirected
+     */
+    public function getShouldHaveBeenRedirected()
+    {
+        return 'Vous auriez du etre redirigé(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.';
+    }
+
+    /**
+     * Get authentication failed string
+     *
+     * @return string authentication failed
+     */
+    public function getAuthenticationFailed()
+    {
+        return 'Authentification CAS infructueuse&nbsp;!';
+    }
+
+    /**
+     * Get the your were not authenticated string
+     *
+     * @return string not authenticated
+     */
+    public function getYouWereNotAuthenticated()
+    {
+        return '<p>Vous n\'avez pas été authentifié(e).</p><p>Vous pouvez soumettre votre requete à nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le problème persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>';
+    }
+
+    /**
+     * Get the service unavailable string
+     *
+     * @return string service unavailable
+     */
+    public function getServiceUnavailable()
+    {
+        return 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)';
+    }
+}
+
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/German.php b/vendor/jasig/phpcas/source/CAS/Languages/German.php
new file mode 100644
index 00000000000..ed3150a80c2
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/German.php
@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/German.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Henrik Genssen <hg@mediafactory.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * German language class
+ *
+ * @class    CAS_Languages_German
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Henrik Genssen <hg@mediafactory.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @sa @link internalLang Internationalization @endlink
+ * @ingroup internalLang
+ */
+class CAS_Languages_German implements CAS_Languages_LanguageInterface
+{
+    /**
+     * Get the using server string
+     *
+     * @return string using server
+     */
+    public function getUsingServer()
+    {
+        return 'via Server';
+    }
+
+    /**
+     * Get authentication wanted string
+     *
+     * @return string authentication wanted
+     */
+    public function getAuthenticationWanted()
+    {
+        return 'CAS Authentifizierung erforderlich!';
+    }
+
+    /**
+     * Get logout string
+     *
+     * @return string logout
+     */
+    public function getLogout()
+    {
+        return 'CAS Abmeldung!';
+    }
+
+    /**
+     * Get the should have been redirected string
+     *
+     * @return string should habe been redirected
+     */
+    public function getShouldHaveBeenRedirected()
+    {
+        return 'eigentlich h&auml;ten Sie zum CAS Server weitergeleitet werden sollen. Dr&uuml;cken Sie <a href="%s">hier</a> um fortzufahren.';
+    }
+
+    /**
+     * Get authentication failed string
+     *
+     * @return string authentication failed
+     */
+    public function getAuthenticationFailed()
+    {
+        return 'CAS Anmeldung fehlgeschlagen!';
+    }
+
+    /**
+     * Get the your were not authenticated string
+     *
+     * @return string not authenticated
+     */
+    public function getYouWereNotAuthenticated()
+    {
+        return '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontaktieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>';
+    }
+
+    /**
+     * Get the service unavailable string
+     *
+     * @return string service unavailable
+     */
+    public function getServiceUnavailable()
+    {
+        return 'Der Dienst `<b>%s</b>\' ist nicht verf&uuml;gbar (<b>%s</b>).';
+    }
+}
+
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/Greek.php b/vendor/jasig/phpcas/source/CAS/Languages/Greek.php
new file mode 100644
index 00000000000..eb0f5efefc2
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/Greek.php
@@ -0,0 +1,115 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/Greek.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Vangelis Haniotakis <haniotak@ucnet.uoc.gr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Greek language class
+ *
+ * @class    CAS_Languages_Greek
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Vangelis Haniotakis <haniotak@ucnet.uoc.gr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @sa @link internalLang Internationalization @endlink
+ * @ingroup internalLang
+ */
+class CAS_Languages_Greek implements CAS_Languages_LanguageInterface
+{
+    /**
+     * Get the using server string
+     *
+     * @return string using server
+     */
+    public function getUsingServer()
+    {
+        return '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò';
+    }
+
+    /**
+     * Get authentication wanted string
+     *
+     * @return string authentication wanted
+     */
+    public function getAuthenticationWanted()
+    {
+        return 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!';
+    }
+
+    /**
+     * Get logout string
+     *
+     * @return string logout
+     */
+    public function getLogout()
+    {
+        return 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!';
+    }
+
+    /**
+     * Get the should have been redirected string
+     *
+     * @return string should habe been redirected
+     */
+    public function getShouldHaveBeenRedirected()
+    {
+        return 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.';
+    }
+
+    /**
+     * Get authentication failed string
+     *
+     * @return string authentication failed
+     */
+    public function getAuthenticationFailed()
+    {
+        return 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!';
+    }
+
+    /**
+     * Get the your were not authenticated string
+     *
+     * @return string not authenticated
+     */
+    public function getYouWereNotAuthenticated()
+    {
+        return '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>';
+    }
+
+    /**
+     * Get the service unavailable string
+     *
+     * @return string service unavailable
+     */
+    public function getServiceUnavailable()
+    {
+        return 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).';
+    }
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/Japanese.php b/vendor/jasig/phpcas/source/CAS/Languages/Japanese.php
new file mode 100644
index 00000000000..e9cd121ee72
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/Japanese.php
@@ -0,0 +1,113 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/Japanese.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   fnorif <fnorif@yahoo.co.jp>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Japanese language class. Now Encoding is EUC-JP and LF
+ *
+ * @class    CAS_Languages_Japanese
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   fnorif <fnorif@yahoo.co.jp>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ **/
+class CAS_Languages_Japanese implements CAS_Languages_LanguageInterface
+{
+    /**
+     * Get the using server string
+     *
+     * @return string using server
+     */
+    public function getUsingServer()
+    {
+        return 'using server';
+    }
+
+    /**
+     * Get authentication wanted string
+     *
+     * @return string authentication wanted
+     */
+    public function getAuthenticationWanted()
+    {
+        return 'CAS�ˤ��ǧ�ڤ�Ԥ��ޤ�';
+    }
+
+    /**
+     * Get logout string
+     *
+     * @return string logout
+     */
+    public function getLogout()
+    {
+        return 'CAS����?�����Ȥ��ޤ�!';
+    }
+
+    /**
+     * Get the should have been redirected string
+     *
+     * @return string should habe been redirected
+     */
+    public function getShouldHaveBeenRedirected()
+    {
+        return 'CAS�����Ф˹Ԥ�ɬ�פ�����ޤ�����ưŪ��ž������ʤ����� <a href="%s">������</a> �򥯥�å�����³�Ԥ��ޤ��';
+    }
+
+    /**
+     * Get authentication failed string
+     *
+     * @return string authentication failed
+     */
+    public function getAuthenticationFailed()
+    {
+        return 'CAS�ˤ��ǧ�ڤ˼��Ԥ��ޤ���';
+    }
+
+    /**
+     * Get the your were not authenticated string
+     *
+     * @return string not authenticated
+     */
+    public function getYouWereNotAuthenticated()
+    {
+        return '<p>ǧ�ڤǤ��ޤ���Ǥ���.</p><p>�⤦���٥ꥯ�����Ȥ������������<a href="%s">������</a>�򥯥�å�.</p><p>���꤬��褷�ʤ����� <a href="mailto:%s">���Υ����Ȥδ����</a>���䤤��碌�Ƥ�������.</p>';
+    }
+
+    /**
+     * Get the service unavailable string
+     *
+     * @return string service unavailable
+     */
+    public function getServiceUnavailable()
+    {
+        return '�����ӥ� `<b>%s</b>\' �����ѤǤ��ޤ��� (<b>%s</b>).';
+    }
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/LanguageInterface.php b/vendor/jasig/phpcas/source/CAS/Languages/LanguageInterface.php
new file mode 100644
index 00000000000..5de93aa7b20
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/LanguageInterface.php
@@ -0,0 +1,96 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/LanguageInterface.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Language Interface class for all internationalization files
+ *
+ * @class    CAS_Languages_LanguageInterface
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @sa @link internalLang Internationalization @endlink
+ * @ingroup internalLang
+ */
+
+interface CAS_Languages_LanguageInterface
+{
+    /**
+     * Get the using server string
+     *
+     * @return string using server
+     */
+    public function getUsingServer();
+
+    /**
+     * Get authentication wanted string
+     *
+     * @return string authentication wanted
+     */
+    public function getAuthenticationWanted();
+
+    /**
+     * Get logout string
+     *
+     * @return string logout
+     */
+    public function getLogout();
+
+    /**
+     * Get the should have been redirected string
+     *
+     * @return string should habe been redirected
+     */
+    public function getShouldHaveBeenRedirected();
+
+    /**
+     * Get authentication failed string
+     *
+     * @return string authentication failed
+     */
+    public function getAuthenticationFailed();
+
+    /**
+     * Get the your were not authenticated string
+     *
+     * @return string not authenticated
+     */
+    public function getYouWereNotAuthenticated();
+
+    /**
+     * Get the service unavailable string
+     *
+     * @return string service unavailable
+     */
+    public function getServiceUnavailable();
+
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/Languages/Spanish.php b/vendor/jasig/phpcas/source/CAS/Languages/Spanish.php
new file mode 100644
index 00000000000..5675a41d80c
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Languages/Spanish.php
@@ -0,0 +1,117 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Language/Spanish.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Iván-Benjamín García Torà <ivaniclixx@gmail.com>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Spanish language class
+ *
+ * @class    CAS_Languages_Spanish
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Iván-Benjamín García Torà <ivaniclixx@gmail.com>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+
+ * @sa @link internalLang Internationalization @endlink
+ * @ingroup internalLang
+ */
+class CAS_Languages_Spanish implements CAS_Languages_LanguageInterface
+{
+
+    /**
+     * Get the using server string
+     *
+     * @return string using server
+     */
+    public function getUsingServer()
+    {
+        return 'usando servidor';
+    }
+
+    /**
+     * Get authentication wanted string
+     *
+     * @return string authentication wanted
+     */
+    public function getAuthenticationWanted()
+    {
+        return '¡Autentificación CAS necesaria!';
+    }
+
+    /**
+     * Get logout string
+     *
+     * @return string logout
+     */
+    public function getLogout()
+    {
+        return '¡Salida CAS necesaria!';
+    }
+
+    /**
+     * Get the should have been redirected string
+     *
+     * @return string should habe been redirected
+     */
+    public function getShouldHaveBeenRedirected()
+    {
+        return 'Ya debería haber sido redireccionado al servidor CAS. Haga click <a href="%s">aquí</a> para continuar.';
+    }
+
+    /**
+     * Get authentication failed string
+     *
+     * @return string authentication failed
+     */
+    public function getAuthenticationFailed()
+    {
+        return '¡Autentificación CAS fallida!';
+    }
+
+    /**
+     * Get the your were not authenticated string
+     *
+     * @return string not authenticated
+     */
+    public function getYouWereNotAuthenticated()
+    {
+        return '<p>No estás autentificado.</p><p>Puedes volver a intentarlo haciendo click <a href="%s">aquí</a>.</p><p>Si el problema persiste debería contactar con el <a href="mailto:%s">administrador de este sitio</a>.</p>';
+    }
+
+    /**
+     * Get the service unavailable string
+     *
+     * @return string service unavailable
+     */
+    public function getServiceUnavailable()
+    {
+        return 'El servicio `<b>%s</b>\' no está disponible (<b>%s</b>).';
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php b/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php
new file mode 100755
index 00000000000..ef830979586
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/OutOfSequenceBeforeAuthenticationCallException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class defines Exceptions that should be thrown when the sequence of
+ * operations is invalid. In this case it should be thrown when an
+ * authentication call has not yet happened.
+ *
+ * @class    CAS_OutOfSequenceBeforeAuthenticationCallException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_OutOfSequenceBeforeAuthenticationCallException
+extends CAS_OutOfSequenceException
+implements CAS_Exception
+{
+    /**
+     * Return standard error meessage
+     *
+     * @return void
+     */
+    public function __construct ()
+    {
+        parent::__construct('An authentication call hasn\'t happened yet.');
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeClientException.php b/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeClientException.php
new file mode 100755
index 00000000000..f1ea7e2447e
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeClientException.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/OutOfSequenceBeforeClientException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class defines Exceptions that should be thrown when the sequence of
+ * operations is invalid. In this case it should be thrown when the client() or
+ *  proxy() call has not yet happened and no client or proxy object exists.
+ *
+ * @class    CAS_OutOfSequenceBeforeClientException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_OutOfSequenceBeforeClientException
+extends CAS_OutOfSequenceException
+implements CAS_Exception
+{
+    /**
+     * Return standard error message
+     *
+     * @return void
+     */
+    public function __construct ()
+    {
+        parent::__construct(
+            'this method cannot be called before phpCAS::client() or phpCAS::proxy()'
+        );
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php b/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php
new file mode 100755
index 00000000000..928a7772983
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/OutOfSequenceBeforeProxyException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class defines Exceptions that should be thrown when the sequence of
+ * operations is invalid. In this case it should be thrown when the proxy() call
+ * has not yet happened and no proxy object exists.
+ *
+ * @class    CAS_OutOfSequenceBeforeProxyException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_OutOfSequenceBeforeProxyException
+extends CAS_OutOfSequenceException
+implements CAS_Exception
+{
+
+    /**
+     * Return standard error message
+     *
+     * @return void
+     */
+    public function __construct ()
+    {
+        parent::__construct(
+            'this method cannot be called before phpCAS::proxy()''
+        );
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/OutOfSequenceException.php b/vendor/jasig/phpcas/source/CAS/OutOfSequenceException.php
new file mode 100755
index 00000000000..d101811b60d
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/OutOfSequenceException.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/OutOfSequenceException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class defines Exceptions that should be thrown when the sequence of
+ * operations is invalid. Examples are:
+ *		- Requesting the response before executing a request.
+ *		- Changing the URL of a request after executing the request.
+ *
+ * @class    CAS_OutOfSequenceException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_OutOfSequenceException
+extends BadMethodCallException
+implements CAS_Exception
+{
+
+}
diff --git a/vendor/jasig/phpcas/source/CAS/PGTStorage/AbstractStorage.php b/vendor/jasig/phpcas/source/CAS/PGTStorage/AbstractStorage.php
new file mode 100644
index 00000000000..c1648984ac2
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/PGTStorage/AbstractStorage.php
@@ -0,0 +1,222 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/PGTStorage/AbstractStorage.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Basic class for PGT storage
+ * The CAS_PGTStorage_AbstractStorage class is a generic class for PGT storage.
+ * This class should not be instanciated itself but inherited by specific PGT
+ * storage classes.
+ *
+ * @class CAS_PGTStorage_AbstractStorage
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @ingroup internalPGTStorage
+ */
+
+abstract class CAS_PGTStorage_AbstractStorage
+{
+    /**
+     * @addtogroup internalPGTStorage
+     * @{
+     */
+
+    // ########################################################################
+    //  CONSTRUCTOR
+    // ########################################################################
+
+    /**
+     * The constructor of the class, should be called only by inherited classes.
+     *
+     * @param CAS_Client $cas_parent the CAS _client instance that creates the
+     * current object.
+     *
+     * @return void
+     *
+     * @protected
+     */
+    function __construct($cas_parent)
+    {
+        phpCAS::traceBegin();
+        if ( !$cas_parent->isProxy() ) {
+            phpCAS::error(
+                'defining PGT storage makes no sense when not using a CAS proxy'
+            );
+        }
+        phpCAS::traceEnd();
+    }
+
+    // ########################################################################
+    //  DEBUGGING
+    // ########################################################################
+
+    /**
+     * This virtual method returns an informational string giving the type of storage
+     * used by the object (used for debugging purposes).
+     *
+     * @return void
+     *
+     * @public
+     */
+    function getStorageType()
+    {
+        phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
+    }
+
+    /**
+     * This virtual method returns an informational string giving informations on the
+     * parameters of the storage.(used for debugging purposes).
+     *
+     * @return void
+     *
+     * @public
+     */
+    function getStorageInfo()
+    {
+        phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
+    }
+
+    // ########################################################################
+    //  ERROR HANDLING
+    // ########################################################################
+
+    /**
+     * string used to store an error message. Written by
+     * PGTStorage::setErrorMessage(), read by PGTStorage::getErrorMessage().
+     *
+     * @hideinitializer
+     * @deprecated not used.
+     */
+    var $_error_message=false;
+
+    /**
+     * This method sets en error message, which can be read later by
+     * PGTStorage::getErrorMessage().
+     *
+     * @param string $error_message an error message
+     *
+     * @return void
+     *
+     * @deprecated not used.
+     */
+    function setErrorMessage($error_message)
+    {
+        $this->_error_message = $error_message;
+    }
+
+    /**
+     * This method returns an error message set by PGTStorage::setErrorMessage().
+     *
+     * @return an error message when set by PGTStorage::setErrorMessage(), FALSE
+     * otherwise.
+     *
+     * @deprecated not used.
+     */
+    function getErrorMessage()
+    {
+        return $this->_error_message;
+    }
+
+    // ########################################################################
+    //  INITIALIZATION
+    // ########################################################################
+
+    /**
+     * a boolean telling if the storage has already been initialized. Written by
+     * PGTStorage::init(), read by PGTStorage::isInitialized().
+     *
+     * @hideinitializer
+     */
+    var $_initialized = false;
+
+    /**
+     * This method tells if the storage has already been intialized.
+     *
+     * @return a boolean
+     *
+     * @protected
+     */
+    function isInitialized()
+    {
+        return $this->_initialized;
+    }
+
+    /**
+     * This virtual method initializes the object.
+     *
+     * @return void
+     */
+    function init()
+    {
+        $this->_initialized = true;
+    }
+
+    // ########################################################################
+    //  PGT I/O
+    // ########################################################################
+
+    /**
+     * This virtual method stores a PGT and its corresponding PGT Iuo.
+     *
+     * @param string $pgt     the PGT
+     * @param string $pgt_iou the PGT iou
+     *
+     * @return void
+     *
+     * @note Should never be called.
+     *
+     */
+    function write($pgt,$pgt_iou)
+    {
+        phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
+    }
+
+    /**
+     * This virtual method reads a PGT corresponding to a PGT Iou and deletes
+     * the corresponding storage entry.
+     *
+     * @param string $pgt_iou the PGT iou
+     *
+     * @return void
+     *
+     * @note Should never be called.
+     */
+    function read($pgt_iou)
+    {
+        phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
+    }
+
+    /** @} */
+
+}
+
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/PGTStorage/Db.php b/vendor/jasig/phpcas/source/CAS/PGTStorage/Db.php
new file mode 100644
index 00000000000..c331ca09833
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/PGTStorage/Db.php
@@ -0,0 +1,440 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/PGTStorage/Db.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Daniel Frett <daniel.frett@gmail.com>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+define('CAS_PGT_STORAGE_DB_DEFAULT_TABLE', 'cas_pgts');
+
+/**
+ * Basic class for PGT database storage
+ * The CAS_PGTStorage_Db class is a class for PGT database storage.
+ *
+ * @class    CAS_PGTStorage_Db
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Daniel Frett <daniel.frett@gmail.com>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ * @ingroup internalPGTStorageDb
+ */
+
+class CAS_PGTStorage_Db extends CAS_PGTStorage_AbstractStorage
+{
+    /**
+     * @addtogroup internalCAS_PGTStorageDb
+     * @{
+     */
+
+    /**
+     * the PDO object to use for database interactions
+     */
+    private $_pdo;
+
+    /**
+     * This method returns the PDO object to use for database interactions.
+     *
+     * @return the PDO object
+     */
+    private function _getPdo()
+    {
+        return $this->_pdo;
+    }
+
+    /**
+     * database connection options to use when creating a new PDO object
+     */
+    private $_dsn;
+    private $_username;
+    private $_password;
+    private $_table_options;
+
+    /**
+     * the table to use for storing/retrieving pgt's
+     */
+    private $_table;
+
+    /**
+     * This method returns the table to use when storing/retrieving PGT's
+     *
+     * @return the name of the pgt storage table.
+     */
+    private function _getTable()
+    {
+        return $this->_table;
+    }
+
+    // ########################################################################
+    //  DEBUGGING
+    // ########################################################################
+
+    /**
+     * This method returns an informational string giving the type of storage
+     * used by the object (used for debugging purposes).
+     *
+     * @return an informational string.
+     */
+    public function getStorageType()
+    {
+        return "db";
+    }
+
+    /**
+     * This method returns an informational string giving informations on the
+     * parameters of the storage.(used for debugging purposes).
+     *
+     * @return an informational string.
+     * @public
+     */
+    public function getStorageInfo()
+    {
+        return 'table=`'.$this->_getTable().'\'';
+    }
+
+    // ########################################################################
+    //  CONSTRUCTOR
+    // ########################################################################
+
+    /**
+     * The class constructor.
+     *
+     * @param CAS_Client $cas_parent     the CAS_Client instance that creates
+     * the object.
+     * @param string     $dsn_or_pdo     a dsn string to use for creating a PDO
+     * object or a PDO object
+     * @param string     $username       the username to use when connecting to
+     * the database
+     * @param string     $password       the password to use when connecting to
+     * the database
+     * @param string     $table          the table to use for storing and
+     * retrieving PGT's
+     * @param string     $driver_options any driver options to use when
+     * connecting to the database
+     */
+    public function __construct(
+        $cas_parent, $dsn_or_pdo, $username='', $password='', $table='',
+        $driver_options=null
+    ) {
+        phpCAS::traceBegin();
+        // call the ancestor's constructor
+        parent::__construct($cas_parent);
+
+        // set default values
+        if ( empty($table) ) {
+            $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE;
+        }
+        if ( !is_array($driver_options) ) {
+            $driver_options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);
+        }
+
+        // store the specified parameters
+        if ($dsn_or_pdo instanceof PDO) {
+            $this->_pdo = $dsn_or_pdo;
+        } else {
+            $this->_dsn = $dsn_or_pdo;
+            $this->_username = $username;
+            $this->_password = $password;
+            $this->_driver_options = $driver_options;
+        }
+
+        // store the table name
+        $this->_table = $table;
+
+        phpCAS::traceEnd();
+    }
+
+    // ########################################################################
+    //  INITIALIZATION
+    // ########################################################################
+
+    /**
+     * This method is used to initialize the storage. Halts on error.
+     *
+     * @return void
+     */
+    public function init()
+    {
+        phpCAS::traceBegin();
+        // if the storage has already been initialized, return immediatly
+        if ($this->isInitialized()) {
+            return;
+        }
+
+        // initialize the base object
+        parent::init();
+
+        // create the PDO object if it doesn't exist already
+        if (!($this->_pdo instanceof PDO)) {
+            try {
+                $this->_pdo = new PDO(
+                    $this->_dsn, $this->_username, $this->_password,
+                    $this->_driver_options
+                );
+            }
+            catch(PDOException $e) {
+                phpCAS::error('Database connection error: ' . $e->getMessage());
+            }
+        }
+
+        phpCAS::traceEnd();
+    }
+
+    // ########################################################################
+    //  PDO database interaction
+    // ########################################################################
+
+    /**
+     * attribute that stores the previous error mode for the PDO handle while
+     * processing a transaction
+     */
+    private $_errMode;
+
+    /**
+     * This method will enable the Exception error mode on the PDO object
+     *
+     * @return void
+     */
+    private function _setErrorMode()
+    {
+        // get PDO object and enable exception error mode
+        $pdo = $this->_getPdo();
+        $this->_errMode = $pdo->getAttribute(PDO::ATTR_ERRMODE);
+        $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+    }
+
+    /**
+     * this method will reset the error mode on the PDO object
+     *
+     * @return void
+     */
+    private function _resetErrorMode()
+    {
+        // get PDO object and reset the error mode to what it was originally
+        $pdo = $this->_getPdo();
+        $pdo->setAttribute(PDO::ATTR_ERRMODE, $this->_errMode);
+    }
+
+    // ########################################################################
+    //  database queries
+    // ########################################################################
+    // these queries are potentially unsafe because the person using this library
+    // can set the table to use, but there is no reliable way to escape SQL
+    // fieldnames in PDO yet
+
+    /**
+     * This method returns the query used to create a pgt storage table
+     *
+     * @return the create table SQL, no bind params in query
+     */
+    protected function createTableSql()
+    {
+        return 'CREATE TABLE ' . $this->_getTable()
+            . ' (pgt_iou VARCHAR(255) NOT NULL PRIMARY KEY, pgt VARCHAR(255) NOT NULL)';
+    }
+
+    /**
+     * This method returns the query used to store a pgt
+     *
+     * @return the store PGT SQL, :pgt and :pgt_iou are the bind params contained
+     *         in the query
+     */
+    protected function storePgtSql()
+    {
+        return 'INSERT INTO ' . $this->_getTable()
+            . ' (pgt_iou, pgt) VALUES (:pgt_iou, :pgt)';
+    }
+
+    /**
+     * This method returns the query used to retrieve a pgt. the first column
+     * of the first row should contain the pgt
+     *
+     * @return the retrieve PGT SQL, :pgt_iou is the only bind param contained
+     *         in the query
+     */
+    protected function retrievePgtSql()
+    {
+        return 'SELECT pgt FROM ' . $this->_getTable() . ' WHERE pgt_iou = :pgt_iou';
+    }
+
+    /**
+     * This method returns the query used to delete a pgt.
+     *
+     * @return the delete PGT SQL, :pgt_iou is the only bind param contained in
+     *         the query
+     */
+    protected function deletePgtSql()
+    {
+        return 'DELETE FROM ' . $this->_getTable() . ' WHERE pgt_iou = :pgt_iou';
+    }
+
+    // ########################################################################
+    //  PGT I/O
+    // ########################################################################
+
+    /**
+     * This method creates the database table used to store pgt's and pgtiou's
+     *
+     * @return void
+     */
+    public function createTable()
+    {
+        phpCAS::traceBegin();
+
+        // initialize this PGTStorage object if it hasn't been initialized yet
+        if ( !$this->isInitialized() ) {
+            $this->init();
+        }
+
+        // initialize the PDO object for this method
+        $pdo = $this->_getPdo();
+        $this->_setErrorMode();
+
+        try {
+            $pdo->beginTransaction();
+
+            $query = $pdo->query($this->createTableSQL());
+            $query->closeCursor();
+
+            $pdo->commit();
+        }
+        catch(PDOException $e) {
+            // attempt rolling back the transaction before throwing a phpCAS error
+            try {
+                $pdo->rollBack();
+            }
+            catch(PDOException $e) {
+            }
+            phpCAS::error('error creating PGT storage table: ' . $e->getMessage());
+        }
+
+        // reset the PDO object
+        $this->_resetErrorMode();
+
+        phpCAS::traceEnd();
+    }
+
+    /**
+     * This method stores a PGT and its corresponding PGT Iou in the database.
+     * Echoes a warning on error.
+     *
+     * @param string $pgt     the PGT
+     * @param string $pgt_iou the PGT iou
+     *
+     * @return void
+     */
+    public function write($pgt, $pgt_iou)
+    {
+        phpCAS::traceBegin();
+
+        // initialize the PDO object for this method
+        $pdo = $this->_getPdo();
+        $this->_setErrorMode();
+
+        try {
+            $pdo->beginTransaction();
+
+            $query = $pdo->prepare($this->storePgtSql());
+            $query->bindValue(':pgt', $pgt, PDO::PARAM_STR);
+            $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR);
+            $query->execute();
+            $query->closeCursor();
+
+            $pdo->commit();
+        }
+        catch(PDOException $e) {
+            // attempt rolling back the transaction before throwing a phpCAS error
+            try {
+                $pdo->rollBack();
+            }
+            catch(PDOException $e) {
+            }
+            phpCAS::error('error writing PGT to database: ' . $e->getMessage());
+        }
+
+        // reset the PDO object
+        $this->_resetErrorMode();
+
+        phpCAS::traceEnd();
+    }
+
+    /**
+     * This method reads a PGT corresponding to a PGT Iou and deletes the
+     * corresponding db entry.
+     *
+     * @param string $pgt_iou the PGT iou
+     *
+     * @return the corresponding PGT, or FALSE on error
+     */
+    public function read($pgt_iou)
+    {
+        phpCAS::traceBegin();
+        $pgt = false;
+
+        // initialize the PDO object for this method
+        $pdo = $this->_getPdo();
+        $this->_setErrorMode();
+
+        try {
+            $pdo->beginTransaction();
+
+            // fetch the pgt for the specified pgt_iou
+            $query = $pdo->prepare($this->retrievePgtSql());
+            $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR);
+            $query->execute();
+            $pgt = $query->fetchColumn(0);
+            $query->closeCursor();
+
+            // delete the specified pgt_iou from the database
+            $query = $pdo->prepare($this->deletePgtSql());
+            $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR);
+            $query->execute();
+            $query->closeCursor();
+
+            $pdo->commit();
+        }
+        catch(PDOException $e) {
+            // attempt rolling back the transaction before throwing a phpCAS error
+            try {
+                $pdo->rollBack();
+            }
+            catch(PDOException $e) {
+            }
+            phpCAS::trace('error reading PGT from database: ' . $e->getMessage());
+        }
+
+        // reset the PDO object
+        $this->_resetErrorMode();
+
+        phpCAS::traceEnd();
+        return $pgt;
+    }
+
+    /** @} */
+
+}
+
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/PGTStorage/File.php b/vendor/jasig/phpcas/source/CAS/PGTStorage/File.php
new file mode 100644
index 00000000000..80a1ea1fd73
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/PGTStorage/File.php
@@ -0,0 +1,259 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/PGTStorage/AbstractStorage.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * The CAS_PGTStorage_File class is a class for PGT file storage. An instance of
+ * this class is returned by CAS_Client::SetPGTStorageFile().
+ *
+ * @class    CAS_PGTStorage_File
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ *
+ * @ingroup internalPGTStorageFile
+ */
+
+class CAS_PGTStorage_File extends CAS_PGTStorage_AbstractStorage
+{
+    /**
+     * @addtogroup internalPGTStorageFile
+     * @{
+     */
+
+    /**
+     * a string telling where PGT's should be stored on the filesystem. Written by
+     * PGTStorageFile::PGTStorageFile(), read by getPath().
+     *
+     * @private
+     */
+    var $_path;
+
+    /**
+     * This method returns the name of the directory where PGT's should be stored
+     * on the filesystem.
+     *
+     * @return the name of a directory (with leading and trailing '/')
+     *
+     * @private
+     */
+    function getPath()
+    {
+        return $this->_path;
+    }
+
+    // ########################################################################
+    //  DEBUGGING
+    // ########################################################################
+
+    /**
+     * This method returns an informational string giving the type of storage
+     * used by the object (used for debugging purposes).
+     *
+     * @return an informational string.
+     * @public
+     */
+    function getStorageType()
+    {
+        return "file";
+    }
+
+    /**
+     * This method returns an informational string giving informations on the
+     * parameters of the storage.(used for debugging purposes).
+     *
+     * @return an informational string.
+     * @public
+     */
+    function getStorageInfo()
+    {
+        return 'path=`'.$this->getPath().'\'';
+    }
+
+    // ########################################################################
+    //  CONSTRUCTOR
+    // ########################################################################
+
+    /**
+     * The class constructor, called by CAS_Client::SetPGTStorageFile().
+     *
+     * @param CAS_Client $cas_parent the CAS_Client instance that creates the object.
+     * @param string     $path       the path where the PGT's should be stored
+     *
+     * @return void
+     *
+     * @public
+     */
+    function __construct($cas_parent,$path)
+    {
+        phpCAS::traceBegin();
+        // call the ancestor's constructor
+        parent::__construct($cas_parent);
+
+        if (empty($path)) {
+            $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH;
+        }
+        // check that the path is an absolute path
+        if (getenv("OS")=="Windows_NT") {
+
+            if (!preg_match('`^[a-zA-Z]:`', $path)) {
+                phpCAS::error('an absolute path is needed for PGT storage to file');
+            }
+
+        } else {
+
+            if ( $path[0] != '/' ) {
+                phpCAS::error('an absolute path is needed for PGT storage to file');
+            }
+
+            // store the path (with a leading and trailing '/')
+            $path = preg_replace('|[/]*$|', '/', $path);
+            $path = preg_replace('|^[/]*|', '/', $path);
+        }
+
+        $this->_path = $path;
+        phpCAS::traceEnd();
+    }
+
+    // ########################################################################
+    //  INITIALIZATION
+    // ########################################################################
+
+    /**
+     * This method is used to initialize the storage. Halts on error.
+     *
+     * @return void
+     * @public
+     */
+    function init()
+    {
+        phpCAS::traceBegin();
+        // if the storage has already been initialized, return immediatly
+        if ($this->isInitialized()) {
+            return;
+        }
+        // call the ancestor's method (mark as initialized)
+        parent::init();
+        phpCAS::traceEnd();
+    }
+
+    // ########################################################################
+    //  PGT I/O
+    // ########################################################################
+
+    /**
+     * This method returns the filename corresponding to a PGT Iou.
+     *
+     * @param string $pgt_iou the PGT iou.
+     *
+     * @return a filename
+     * @private
+     */
+    function getPGTIouFilename($pgt_iou)
+    {
+        phpCAS::traceBegin();
+        $filename = $this->getPath().$pgt_iou.'.plain';
+        phpCAS::traceEnd($filename);
+        return $filename;
+    }
+
+    /**
+     * This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
+     * warning on error.
+     *
+     * @param string $pgt     the PGT
+     * @param string $pgt_iou the PGT iou
+     *
+     * @return void
+     *
+     * @public
+     */
+    function write($pgt,$pgt_iou)
+    {
+        phpCAS::traceBegin();
+        $fname = $this->getPGTIouFilename($pgt_iou);
+        if (!file_exists($fname)) {
+            touch($fname);
+            // Chmod will fail on windows
+            @chmod($fname, 0600);
+            if ($f=fopen($fname, "w")) {
+                if (fputs($f, $pgt) === false) {
+                    phpCAS::error('could not write PGT to `'.$fname.'\'');
+                }
+                phpCAS::trace('Successful write of PGT to `'.$fname.'\'');
+                fclose($f);
+            } else {
+                phpCAS::error('could not open `'.$fname.'\'');
+            }
+        } else {
+            phpCAS::error('File exists: `'.$fname.'\'');
+        }
+        phpCAS::traceEnd();
+    }
+
+    /**
+     * This method reads a PGT corresponding to a PGT Iou and deletes the
+     * corresponding file.
+     *
+     * @param string $pgt_iou the PGT iou
+     *
+     * @return the corresponding PGT, or FALSE on error
+     *
+     * @public
+     */
+    function read($pgt_iou)
+    {
+        phpCAS::traceBegin();
+        $pgt = false;
+        $fname = $this->getPGTIouFilename($pgt_iou);
+        if (file_exists($fname)) {
+            if (!($f=fopen($fname, "r"))) {
+                phpCAS::error('could not open `'.$fname.'\'');
+            } else {
+                if (($pgt=fgets($f)) === false) {
+                    phpCAS::error('could not read PGT from `'.$fname.'\'');
+                }
+                phpCAS::trace('Successful read of PGT to `'.$fname.'\'');
+                fclose($f);
+            }
+            // delete the PGT file
+            @unlink($fname);
+        } else {
+            phpCAS::error('No such file `'.$fname.'\'');
+        }
+        phpCAS::traceEnd($pgt);
+        return $pgt;
+    }
+
+    /** @} */
+
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService.php b/vendor/jasig/phpcas/source/CAS/ProxiedService.php
new file mode 100755
index 00000000000..d70ca9c128c
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService.php
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines methods that allow proxy-authenticated service handlers
+ * to interact with phpCAS.
+ *
+ * Proxy service handlers must implement this interface as well as call
+ * phpCAS::initializeProxiedService($this) at some point in their implementation.
+ *
+ * While not required, proxy-authenticated service handlers are encouraged to
+ * implement the CAS_ProxiedService_Testable interface to facilitate unit testing.
+ *
+ * @class    CAS_ProxiedService
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+interface CAS_ProxiedService
+{
+
+    /**
+     * Answer a service identifier (URL) for whom we should fetch a proxy ticket.
+     *
+     * @return string
+     * @throws Exception If no service url is available.
+     */
+    public function getServiceUrl ();
+
+    /**
+     * Register a proxy ticket with the ProxiedService that it can use when
+     * making requests.
+     *
+     * @param string $proxyTicket Proxy ticket string
+     *
+     * @return void
+     * @throws InvalidArgumentException If the $proxyTicket is invalid.
+     * @throws CAS_OutOfSequenceException If called after a proxy ticket has
+     * already been initialized/set.
+     */
+    public function setProxyTicket ($proxyTicket);
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Abstract.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Abstract.php
new file mode 100755
index 00000000000..fade9e70b72
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Abstract.php
@@ -0,0 +1,149 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Abstract.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class implements common methods for ProxiedService implementations included
+ * with phpCAS.
+ *
+ * @class    CAS_ProxiedService_Abstract
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+abstract class CAS_ProxiedService_Abstract
+implements CAS_ProxiedService, CAS_ProxiedService_Testable
+{
+
+    /**
+     * The proxy ticket that can be used when making service requests.
+     * @var string $_proxyTicket;
+     */
+    private $_proxyTicket;
+
+    /**
+     * Register a proxy ticket with the Proxy that it can use when making requests.
+     *
+     * @param string $proxyTicket proxy ticket
+     *
+     * @return void
+     * @throws InvalidArgumentException If the $proxyTicket is invalid.
+     * @throws CAS_OutOfSequenceException If called after a proxy ticket has
+     *         already been initialized/set.
+     */
+    public function setProxyTicket ($proxyTicket)
+    {
+        if (empty($proxyTicket)) {
+            throw new CAS_InvalidArgumentException(
+                'Trying to initialize with an empty proxy ticket.'
+            );
+        }
+        if (!empty($this->_proxyTicket)) {
+            throw new CAS_OutOfSequenceException(
+                'Already initialized, cannot change the proxy ticket.'
+            );
+        }
+        $this->_proxyTicket = $proxyTicket;
+    }
+
+    /**
+     * Answer the proxy ticket to be used when making requests.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before a proxy ticket has
+     * already been initialized/set.
+     */
+    protected function getProxyTicket ()
+    {
+        if (empty($this->_proxyTicket)) {
+            throw new CAS_OutOfSequenceException(
+                'No proxy ticket yet. Call $this->initializeProxyTicket() to aquire the proxy ticket.'
+            );
+        }
+
+        return $this->_proxyTicket;
+    }
+
+    /**
+     * @var CAS_Client $_casClient;
+     */
+    private $_casClient;
+
+    /**
+     * Use a particular CAS_Client->initializeProxiedService() rather than the
+     * static phpCAS::initializeProxiedService().
+     *
+     * This method should not be called in standard operation, but is needed for unit
+     * testing.
+     *
+     * @param CAS_Client $casClient cas client
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after a proxy ticket has
+     * already been initialized/set.
+     */
+    public function setCasClient (CAS_Client $casClient)
+    {
+        if (!empty($this->_proxyTicket)) {
+            throw new CAS_OutOfSequenceException(
+                'Already initialized, cannot change the CAS_Client.'
+            );
+        }
+
+        $this->_casClient = $casClient;
+    }
+
+    /**
+     * Fetch our proxy ticket.
+     *
+     * Descendent classes should call this method once their service URL is available
+     * to initialize their proxy ticket.
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after a proxy ticket has
+     * already been initialized.
+     */
+    protected function initializeProxyTicket()
+    {
+        if (!empty($this->_proxyTicket)) {
+            throw new CAS_OutOfSequenceException(
+                'Already initialized, cannot initialize again.'
+            );
+        }
+        // Allow usage of a particular CAS_Client for unit testing.
+        if (empty($this->_casClient)) {
+            phpCAS::initializeProxiedService($this);
+        } else {
+            $this->_casClient->initializeProxiedService($this);
+        }
+    }
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Exception.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Exception.php
new file mode 100755
index 00000000000..5a1e69622ab
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Exception.php
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Exception.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * An Exception for problems communicating with a proxied service.
+ *
+ * @class    CAS_ProxiedService_Exception
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_ProxiedService_Exception
+extends Exception
+implements CAS_Exception
+{
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Http.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http.php
new file mode 100755
index 00000000000..7c9824fabc1
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http.php
@@ -0,0 +1,91 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Http.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines methods that clients should use for configuring, sending,
+ * and receiving proxied HTTP requests.
+ *
+ * @class    CAS_ProxiedService_Http
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+interface CAS_ProxiedService_Http
+{
+
+    /*********************************************************
+     * Configure the Request
+    *********************************************************/
+
+    /**
+     * Set the URL of the Request
+     *
+     * @param string $url Url to set
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setUrl ($url);
+
+    /*********************************************************
+     * 2. Send the Request
+    *********************************************************/
+
+    /**
+     * Perform the request.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     */
+    public function send ();
+
+    /*********************************************************
+     * 3. Access the response
+    *********************************************************/
+
+    /**
+     * Answer the headers of the response.
+     *
+     * @return array An array of header strings.
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseHeaders ();
+
+    /**
+     * Answer the body of response.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseBody ();
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Abstract.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Abstract.php
new file mode 100755
index 00000000000..abeddf8bed0
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Abstract.php
@@ -0,0 +1,360 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Http/Abstract.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class implements common methods for ProxiedService implementations included
+ * with phpCAS.
+ *
+ * @class    CAS_ProxiedService_Http_Abstract
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+abstract class CAS_ProxiedService_Http_Abstract extends
+CAS_ProxiedService_Abstract implements CAS_ProxiedService_Http
+{
+    /**
+     * The HTTP request mechanism talking to the target service.
+     *
+     * @var CAS_Request_RequestInterface $requestHandler
+     */
+    protected $requestHandler;
+
+    /**
+     * The storage mechanism for cookies set by the target service.
+     *
+     * @var CAS_CookieJar $_cookieJar
+     */
+    private $_cookieJar;
+
+    /**
+     * Constructor.
+     *
+     * @param CAS_Request_RequestInterface $requestHandler request handler object
+     * @param CAS_CookieJar                $cookieJar      cookieJar object
+     *
+     * @return void
+     */
+    public function __construct(CAS_Request_RequestInterface $requestHandler,
+        CAS_CookieJar $cookieJar
+    ) {
+        $this->requestHandler = $requestHandler;
+        $this->_cookieJar = $cookieJar;
+    }
+
+    /**
+     * The target service url.
+     * @var string $_url;
+     */
+    private $_url;
+
+    /**
+     * Answer a service identifier (URL) for whom we should fetch a proxy ticket.
+     *
+     * @return string
+     * @throws Exception If no service url is available.
+     */
+    public function getServiceUrl()
+    {
+        if (empty($this->_url)) {
+            throw new CAS_ProxiedService_Exception(
+                'No URL set via ' . get_class($this) . '->setUrl($url).'
+            );
+        }
+
+        return $this->_url;
+    }
+
+    /*********************************************************
+     * Configure the Request
+     *********************************************************/
+
+    /**
+     * Set the URL of the Request
+     *
+     * @param string $url url to set
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setUrl($url)
+    {
+        if ($this->hasBeenSent()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot set the URL, request already sent.'
+            );
+        }
+        if (!is_string($url)) {
+            throw new CAS_InvalidArgumentException('$url must be a string.');
+        }
+
+        $this->_url = $url;
+    }
+
+    /*********************************************************
+     * 2. Send the Request
+     *********************************************************/
+
+    /**
+     * Perform the request.
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     * @throws CAS_ProxyTicketException If there is a proxy-ticket failure.
+     *		The code of the Exception will be one of:
+     *			PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_FAILURE
+     * @throws CAS_ProxiedService_Exception If there is a failure sending the
+     * request to the target service.
+     */
+    public function send()
+    {
+        if ($this->hasBeenSent()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot send, request already sent.'
+            );
+        }
+
+        phpCAS::traceBegin();
+
+        // Get our proxy ticket and append it to our URL.
+        $this->initializeProxyTicket();
+        $url = $this->getServiceUrl();
+        if (strstr($url, '?') === false) {
+            $url = $url . '?ticket=' . $this->getProxyTicket();
+        } else {
+            $url = $url . '&ticket=' . $this->getProxyTicket();
+        }
+
+        try {
+            $this->makeRequest($url);
+        } catch (Exception $e) {
+            phpCAS::traceEnd();
+            throw $e;
+        }
+    }
+
+    /**
+     * Indicator of the number of requests (including redirects performed.
+     *
+     * @var int $_numRequests;
+     */
+    private $_numRequests = 0;
+
+    /**
+     * The response headers.
+     *
+     * @var array $_responseHeaders;
+     */
+    private $_responseHeaders = array();
+
+    /**
+     * The response status code.
+     *
+     * @var string $_responseStatusCode;
+     */
+    private $_responseStatusCode = '';
+
+    /**
+     * The response headers.
+     *
+     * @var string $_responseBody;
+     */
+    private $_responseBody = '';
+
+    /**
+     * Build and perform a request, following redirects
+     *
+     * @param string $url url for the request
+     *
+     * @return void
+     * @throws CAS_ProxyTicketException If there is a proxy-ticket failure.
+     *		The code of the Exception will be one of:
+     *			PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_FAILURE
+     * @throws CAS_ProxiedService_Exception If there is a failure sending the
+     * request to the target service.
+     */
+    protected function makeRequest($url)
+    {
+        // Verify that we are not in a redirect loop
+        $this->_numRequests++;
+        if ($this->_numRequests > 4) {
+            $message = 'Exceeded the maximum number of redirects (3) in proxied service request.';
+            phpCAS::trace($message);
+            throw new CAS_ProxiedService_Exception($message);
+        }
+
+        // Create a new request.
+        $request = clone $this->requestHandler;
+        $request->setUrl($url);
+
+        // Add any cookies to the request.
+        $request->addCookies($this->_cookieJar->getCookies($url));
+
+        // Add any other parts of the request needed by concrete classes
+        $this->populateRequest($request);
+
+        // Perform the request.
+        phpCAS::trace('Performing proxied service request to \'' . $url . '\'');
+        if (!$request->send()) {
+            $message = 'Could not perform proxied service request to URL`'
+            . $url . '\'. ' . $request->getErrorMessage();
+            phpCAS::trace($message);
+            throw new CAS_ProxiedService_Exception($message);
+        }
+
+        // Store any cookies from the response;
+        $this->_cookieJar->storeCookies($url, $request->getResponseHeaders());
+
+        // Follow any redirects
+        if ($redirectUrl = $this->getRedirectUrl($request->getResponseHeaders())
+        ) {
+            phpCAS::trace('Found redirect:' . $redirectUrl);
+            $this->makeRequest($redirectUrl);
+        } else {
+
+            $this->_responseHeaders = $request->getResponseHeaders();
+            $this->_responseBody = $request->getResponseBody();
+            $this->_responseStatusCode = $request->getResponseStatusCode();
+        }
+    }
+
+    /**
+     * Add any other parts of the request needed by concrete classes
+     *
+     * @param CAS_Request_RequestInterface $request request interface object
+     *
+     * @return void
+     */
+    abstract protected function populateRequest(
+        CAS_Request_RequestInterface $request
+    );
+
+    /**
+     * Answer a redirect URL if a redirect header is found, otherwise null.
+     *
+     * @param array $responseHeaders response header to extract a redirect from
+     *
+     * @return string or null
+     */
+    protected function getRedirectUrl(array $responseHeaders)
+    {
+        // Check for the redirect after authentication
+        foreach ($responseHeaders as $header) {
+            if ( preg_match('/^(Location:|URI:)\s*([^\s]+.*)$/', $header, $matches)
+            ) {
+                return trim(array_pop($matches));
+            }
+        }
+        return null;
+    }
+
+    /*********************************************************
+     * 3. Access the response
+     *********************************************************/
+
+    /**
+     * Answer true if our request has been sent yet.
+     *
+     * @return bool
+     */
+    protected function hasBeenSent()
+    {
+        return ($this->_numRequests > 0);
+    }
+
+    /**
+     * Answer the headers of the response.
+     *
+     * @return array An array of header strings.
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseHeaders()
+    {
+        if (!$this->hasBeenSent()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot access response, request not sent yet.'
+            );
+        }
+
+        return $this->_responseHeaders;
+    }
+
+    /**
+     * Answer HTTP status code of the response
+     *
+     * @return int
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseStatusCode()
+    {
+        if (!$this->hasBeenSent()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot access response, request not sent yet.'
+            );
+        }
+
+        return $this->_responseStatusCode;
+    }
+
+    /**
+     * Answer the body of response.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseBody()
+    {
+        if (!$this->hasBeenSent()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot access response, request not sent yet.'
+            );
+        }
+
+        return $this->_responseBody;
+    }
+
+    /**
+     * Answer the cookies from the response. This may include cookies set during
+     * redirect responses.
+     *
+     * @return array An array containing cookies. E.g. array('name' => 'val');
+     */
+    public function getCookies()
+    {
+        return $this->_cookieJar->getCookies($this->getServiceUrl());
+    }
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Get.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Get.php
new file mode 100755
index 00000000000..78e35de16f1
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Get.php
@@ -0,0 +1,85 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Http/Get.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class is used to make proxied service requests via the HTTP GET method.
+ *
+ * Usage Example:
+ *
+ *	try {
+ *		$service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
+ *		$service->setUrl('http://www.example.com/path/');
+ *		$service->send();
+ *		if ($service->getResponseStatusCode() == 200)
+ *			return $service->getResponseBody();
+ *		else
+ *			// The service responded with an error code 404, 500, etc.
+ *			throw new Exception('The service responded with an error.');
+ *
+ * 	} catch (CAS_ProxyTicketException $e) {
+ *	    if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE)
+ *			return "Your login has timed out. You need to log in again.";
+ *		else
+ *			// Other proxy ticket errors are from bad request format
+ *          // (shouldn't happen) or CAS server failure (unlikely)
+ *          // so lets just stop if we hit those.
+ *			throw $e;
+ *	} catch (CAS_ProxiedService_Exception $e) {
+ *		// Something prevented the service request from being sent or received.
+ *		// We didn't even get a valid error response (404, 500, etc), so this
+ *		// might be caused by a network error or a DNS resolution failure.
+ *		// We could handle it in some way, but for now we will just stop.
+ *		throw $e;
+ *	}
+ *
+ * @class    CAS_ProxiedService_Http_Get
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_ProxiedService_Http_Get
+extends CAS_ProxiedService_Http_Abstract
+{
+
+    /**
+     * Add any other parts of the request needed by concrete classes
+     *
+     * @param CAS_Request_RequestInterface $request request interface
+     *
+     * @return void
+     */
+    protected function populateRequest (CAS_Request_RequestInterface $request)
+    {
+        // do nothing, since the URL has already been sent and that is our
+        // only data.
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Post.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Post.php
new file mode 100755
index 00000000000..7d4ecd3c030
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Http/Post.php
@@ -0,0 +1,152 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Http/Post.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This class is used to make proxied service requests via the HTTP POST method.
+ *
+ * Usage Example:
+ *
+ *	try {
+ * 		$service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_POST);
+ * 		$service->setUrl('http://www.example.com/path/');
+ *		$service->setContentType('text/xml');
+ *		$service->setBody('<?xml version="1.0"?'.'><methodCall><methodName>example.search</methodName></methodCall>');
+ * 		$service->send();
+ *		if ($service->getResponseStatusCode() == 200)
+ *			return $service->getResponseBody();
+ *		else
+ *			// The service responded with an error code 404, 500, etc.
+ *			throw new Exception('The service responded with an error.');
+ *
+ *	} catch (CAS_ProxyTicketException $e) {
+ *		if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE)
+ *			return "Your login has timed out. You need to log in again.";
+ *		else
+ *			// Other proxy ticket errors are from bad request format
+ *          // (shouldn't happen) or CAS server failure (unlikely) so lets just
+ *          // stop if we hit those.
+ *			throw $e;
+ *	} catch (CAS_ProxiedService_Exception $e) {
+ *		// Something prevented the service request from being sent or received.
+ *		// We didn't even get a valid error response (404, 500, etc), so this
+ *		// might be caused by a network error or a DNS resolution failure.
+ *		// We could handle it in some way, but for now we will just stop.
+ *		throw $e;
+ *	}
+ *
+ * @class    CAS_ProxiedService_Http_Post
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_ProxiedService_Http_Post
+extends CAS_ProxiedService_Http_Abstract
+{
+
+    /**
+     * The content-type of this request
+     *
+     * @var string $_contentType
+     */
+    private $_contentType;
+
+    /**
+     * The body of the this request
+     *
+     * @var string $_body
+     */
+    private $_body;
+
+    /**
+     * Set the content type of this POST request.
+     *
+     * @param string $contentType content type
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setContentType ($contentType)
+    {
+        if ($this->hasBeenSent()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot set the content type, request already sent.'
+            );
+        }
+
+        $this->_contentType = $contentType;
+    }
+
+    /**
+     * Set the body of this POST request.
+     *
+     * @param string $body body to set
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setBody ($body)
+    {
+        if ($this->hasBeenSent()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot set the body, request already sent.'
+            );
+        }
+
+        $this->_body = $body;
+    }
+
+    /**
+     * Add any other parts of the request needed by concrete classes
+     *
+     * @param CAS_Request_RequestInterface $request request interface class
+     *
+     * @return void
+     */
+    protected function populateRequest (CAS_Request_RequestInterface $request)
+    {
+        if (empty($this->_contentType) && !empty($this->_body)) {
+            throw new CAS_ProxiedService_Exception(
+                "If you pass a POST body, you must specify a content type via "
+                .get_class($this).'->setContentType($contentType).'
+            );
+        }
+
+        $request->makePost();
+        if (!empty($this->_body)) {
+            $request->addHeader('Content-Type: '.$this->_contentType);
+            $request->addHeader('Content-Length: '.strlen($this->_body));
+            $request->setPostBody($this->_body);
+        }
+    }
+
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Imap.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Imap.php
new file mode 100755
index 00000000000..7461a585a20
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Imap.php
@@ -0,0 +1,280 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Imap.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Provides access to a proxy-authenticated IMAP stream
+ *
+ * @class    CAS_ProxiedService_Imap
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_ProxiedService_Imap
+extends CAS_ProxiedService_Abstract
+{
+
+    /**
+     * The username to send via imap_open.
+     *
+     * @var string $_username;
+     */
+    private $_username;
+
+    /**
+     * Constructor.
+     *
+     * @param string $username Username
+     *
+     * @return void
+     */
+    public function __construct ($username)
+    {
+        if (!is_string($username) || !strlen($username)) {
+            throw new CAS_InvalidArgumentException('Invalid username.');
+        }
+
+        $this->_username = $username;
+    }
+
+    /**
+     * The target service url.
+     * @var string $_url;
+     */
+    private $_url;
+
+    /**
+     * Answer a service identifier (URL) for whom we should fetch a proxy ticket.
+     *
+     * @return string
+     * @throws Exception If no service url is available.
+     */
+    public function getServiceUrl ()
+    {
+        if (empty($this->_url)) {
+            throw new CAS_ProxiedService_Exception(
+                'No URL set via '.get_class($this).'->getServiceUrl($url).'
+            );
+        }
+
+        return $this->_url;
+    }
+
+    /*********************************************************
+     * Configure the Stream
+    *********************************************************/
+
+    /**
+     * Set the URL of the service to pass to CAS for proxy-ticket retrieval.
+     *
+     * @param string $url Url to set
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the stream has been opened.
+     */
+    public function setServiceUrl ($url)
+    {
+        if ($this->hasBeenOpened()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot set the URL, stream already opened.'
+            );
+        }
+        if (!is_string($url) || !strlen($url)) {
+            throw new CAS_InvalidArgumentException('Invalid url.');
+        }
+
+        $this->_url = $url;
+    }
+
+    /**
+     * The mailbox to open. See the $mailbox parameter of imap_open().
+     *
+     * @var string $_mailbox
+     */
+    private $_mailbox;
+
+    /**
+     * Set the mailbox to open. See the $mailbox parameter of imap_open().
+     *
+     * @param string $mailbox Mailbox to set
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the stream has been opened.
+     */
+    public function setMailbox ($mailbox)
+    {
+        if ($this->hasBeenOpened()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot set the mailbox, stream already opened.'
+            );
+        }
+        if (!is_string($mailbox) || !strlen($mailbox)) {
+            throw new CAS_InvalidArgumentException('Invalid mailbox.');
+        }
+
+        $this->_mailbox = $mailbox;
+    }
+
+    /**
+     * A bit mask of options to pass to imap_open() as the $options parameter.
+     *
+     * @var int $_options
+     */
+    private $_options = null;
+
+    /**
+     * Set the options for opening the stream. See the $options parameter of
+     * imap_open().
+     *
+     * @param int $options Options for the stream
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the stream has been opened.
+     */
+    public function setOptions ($options)
+    {
+        if ($this->hasBeenOpened()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot set options, stream already opened.'
+            );
+        }
+        if (!is_int($options)) {
+            throw new CAS_InvalidArgumentException('Invalid options.');
+        }
+
+        $this->_options = $options;
+    }
+
+    /*********************************************************
+     * 2. Open the stream
+    *********************************************************/
+
+    /**
+     * Open the IMAP stream (similar to imap_open()).
+     *
+     * @return resource Returns an IMAP stream on success
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     * @throws CAS_ProxyTicketException If there is a proxy-ticket failure.
+     *		The code of the Exception will be one of:
+     *			PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE
+     *			PHPCAS_SERVICE_PT_FAILURE
+     * @throws CAS_ProxiedService_Exception If there is a failure sending the
+     *         request to the target service.
+     */
+    public function open ()
+    {
+        if ($this->hasBeenOpened()) {
+            throw new CAS_OutOfSequenceException('Stream already opened.');
+        }
+        if (empty($this->_mailbox)) {
+            throw new CAS_ProxiedService_Exception(
+                'You must specify a mailbox via '.get_class($this)
+                .'->setMailbox($mailbox)'
+            );
+        }
+
+        phpCAS::traceBegin();
+
+        // Get our proxy ticket and append it to our URL.
+        $this->initializeProxyTicket();
+        phpCAS::trace('opening IMAP mailbox `'.$this->_mailbox.'\'...');
+        $this->_stream = @imap_open(
+            $this->_mailbox, $this->_username, $this->getProxyTicket(),
+            $this->_options
+        );
+        if ($this->_stream) {
+            phpCAS::trace('ok');
+        } else {
+            phpCAS::trace('could not open mailbox');
+            // @todo add localization integration.
+            $message = 'IMAP Error: '.$url.' '. var_export(imap_errors(), true);
+            phpCAS::trace($message);
+            throw new CAS_ProxiedService_Exception($message);
+        }
+
+        phpCAS::traceEnd();
+        return $this->_stream;
+    }
+
+    /**
+     * Answer true if our request has been sent yet.
+     *
+     * @return bool
+     */
+    protected function hasBeenOpened ()
+    {
+        return !empty($this->_stream);
+    }
+
+    /*********************************************************
+     * 3. Access the result
+    *********************************************************/
+    /**
+     * The IMAP stream
+     *
+     * @var resource $_stream
+     */
+    private $_stream;
+
+    /**
+     * Answer the IMAP stream
+     *
+     * @return resource
+     */
+    public function getStream ()
+    {
+        if (!$this->hasBeenOpened()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot access stream, not opened yet.'
+            );
+        }
+        return $this->_stream;
+    }
+
+    /**
+     * CAS_Client::serviceMail() needs to return the proxy ticket for some reason,
+     * so this method provides access to it.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before the stream has been
+     * opened.
+     */
+    public function getImapProxyTicket ()
+    {
+        if (!$this->hasBeenOpened()) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot access errors, stream not opened yet.'
+            );
+        }
+        return $this->getProxyTicket();
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxiedService/Testable.php b/vendor/jasig/phpcas/source/CAS/ProxiedService/Testable.php
new file mode 100755
index 00000000000..51f07676276
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxiedService/Testable.php
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxiedService/Testabel.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines methods that allow proxy-authenticated service handlers
+ * to be tested in unit tests.
+ *
+ * Classes implementing this interface SHOULD store the CAS_Client passed and
+ * initialize themselves with that client rather than via the static phpCAS
+ * method. For example:
+ *
+ *		/ **
+ *		 * Fetch our proxy ticket.
+ *		 * /
+ *		protected function initializeProxyTicket() {
+ *			// Allow usage of a particular CAS_Client for unit testing.
+ *			if (is_null($this->casClient))
+ *				phpCAS::initializeProxiedService($this);
+ *			else
+ *				$this->casClient->initializeProxiedService($this);
+ *		}
+ *
+ * @class    CAS_ProxiedService_Testabel
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+interface CAS_ProxiedService_Testable
+{
+
+    /**
+     * Use a particular CAS_Client->initializeProxiedService() rather than the
+     * static phpCAS::initializeProxiedService().
+     *
+     * This method should not be called in standard operation, but is needed for unit
+     * testing.
+     *
+     * @param CAS_Client $casClient Cas client object
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after a proxy ticket has
+     *         already been initialized/set.
+     */
+    public function setCasClient (CAS_Client $casClient);
+
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxyChain.php b/vendor/jasig/phpcas/source/CAS/ProxyChain.php
new file mode 100644
index 00000000000..2594d141e51
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxyChain.php
@@ -0,0 +1,127 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxyChain.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * A normal proxy-chain definition that lists each level of the chain as either
+ * a string or regular expression.
+ *
+ * @class    CAS_ProxyChain
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class CAS_ProxyChain
+implements CAS_ProxyChain_Interface
+{
+
+    protected $chain = array();
+
+    /**
+     * A chain is an array of strings or regexp strings that will be matched
+     * against. Regexp will be matched with preg_match and strings will be
+     * matched from the beginning. A string must fully match the beginning of
+     * an proxy url. So you can define a full domain as acceptable or go further
+     * down.
+     * Proxies have to be defined in reverse from the service to the user. If a
+     * user hits service A get proxied via B to service C the list of acceptable
+     * proxies on C would be array(B,A);
+     *
+     * @param array $chain A chain of proxies
+     */
+    public function __construct(array $chain)
+    {
+        // Ensure that we have an indexed array
+        $this->chain = array_values($chain);
+    }
+
+    /**
+     * Match a list of proxies.
+     *
+     * @param array $list The list of proxies in front of this service.
+     *
+     * @return bool
+     */
+    public function matches(array $list)
+    {
+        $list = array_values($list);  // Ensure that we have an indexed array
+        if ($this->isSizeValid($list)) {
+            $mismatch = false;
+            foreach ($this->chain as $i => $search) {
+                $proxy_url = $list[$i];
+                if (preg_match('/^\/.*\/[ixASUXu]*$/s', $search)) {
+                    if (preg_match($search, $proxy_url)) {
+                        phpCAS::trace(
+                            "Found regexp " .  $search . " matching " . $proxy_url
+                        );
+                    } else {
+                        phpCAS::trace(
+                            "No regexp match " .  $search . " != " . $proxy_url
+                        );
+                        $mismatch = true;
+                        break;
+                    }
+                } else {
+                    if (strncasecmp($search, $proxy_url, strlen($search)) == 0) {
+                        phpCAS::trace(
+                            "Found string " .  $search . " matching " . $proxy_url
+                        );
+                    } else {
+                        phpCAS::trace(
+                            "No match " .  $search . " != " . $proxy_url
+                        );
+                        $mismatch = true;
+                        break;
+                    }
+                }
+            }
+            if (!$mismatch) {
+                phpCAS::trace("Proxy chain matches");
+                return true;
+            }
+        } else {
+            phpCAS::trace("Proxy chain skipped: size mismatch");
+        }
+        return false;
+    }
+
+    /**
+     * Validate the size of the the list as compared to our chain.
+     *
+     * @param array $list List of proxies
+     *
+     * @return bool
+     */
+    protected function isSizeValid (array $list)
+    {
+        return (sizeof($this->chain) == sizeof($list));
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/ProxyChain/AllowedList.php b/vendor/jasig/phpcas/source/CAS/ProxyChain/AllowedList.php
new file mode 100644
index 00000000000..62d196ab7f7
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxyChain/AllowedList.php
@@ -0,0 +1,119 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxyChain/AllowedList.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+
+/**
+ * ProxyChain is a container for storing chains of valid proxies that can
+ * be used to validate proxied requests to a service
+ *
+ * @class    CAS_ProxyChain_AllowedList
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class CAS_ProxyChain_AllowedList
+{
+
+    private $_chains = array();
+
+    /**
+     * Check whether proxies are allowed by configuration
+     *
+     * @return bool
+     */
+    public function isProxyingAllowed()
+    {
+        return (count($this->_chains) > 0);
+    }
+
+    /**
+     * Add a chain of proxies to the list of possible chains
+     *
+     * @param CAS_ProxyChain_Interface $chain A chain of proxies
+     *
+     * @return void
+     */
+    public function allowProxyChain(CAS_ProxyChain_Interface $chain)
+    {
+        $this->_chains[] = $chain;
+    }
+
+    /**
+     * Check if the proxies found in the response match the allowed proxies
+     *
+     * @param array $proxies list of proxies to check
+     *
+     * @return bool whether the proxies match the allowed proxies
+     */
+    public function isProxyListAllowed(array $proxies)
+    {
+        phpCAS::traceBegin();
+        if (empty($proxies)) {
+            phpCAS::trace("No proxies were found in the response");
+            phpCAS::traceEnd(true);
+            return true;
+        } elseif (!$this->isProxyingAllowed()) {
+            phpCAS::trace("Proxies are not allowed");
+            phpCAS::traceEnd(false);
+            return false;
+        } else {
+            $res = $this->contains($proxies);
+            phpCAS::traceEnd($res);
+            return $res;
+        }
+    }
+
+    /**
+     * Validate the proxies from the proxy ticket validation against the
+     * chains that were definded.
+     *
+     * @param array $list List of proxies from the proxy ticket validation.
+     *
+     * @return if any chain fully matches the supplied list
+     */
+    public function contains(array $list)
+    {
+        phpCAS::traceBegin();
+        $count = 0;
+        foreach ($this->_chains as $chain) {
+            phpCAS::trace("Checking chain ". $count++);
+            if ($chain->matches($list)) {
+                phpCAS::traceEnd(true);
+                return true;
+            }
+        }
+        phpCAS::trace("No proxy chain matches.");
+        phpCAS::traceEnd(false);
+        return false;
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/source/CAS/ProxyChain/Any.php b/vendor/jasig/phpcas/source/CAS/ProxyChain/Any.php
new file mode 100644
index 00000000000..0cd92f74e96
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxyChain/Any.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxyChain/Any.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * A proxy-chain definition that will match any list of proxies.
+ *
+ * Use this class for quick testing or in certain production screnarios you
+ * might want to allow allow any other valid service to proxy your service.
+ *
+ * THIS CLASS IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY
+ * IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER
+ * ON THIS SERVICE.
+ *
+ * @class    CAS_ProxyChain_Any
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_ProxyChain_Any
+implements CAS_ProxyChain_Interface
+{
+
+    /**
+     * Match a list of proxies.
+     *
+     * @param array $list The list of proxies in front of this service.
+     *
+     * @return bool
+     */
+    public function matches(array $list)
+    {
+        phpCAS::trace("Using CAS_ProxyChain_Any. No proxy validation is performed.");
+        return true;
+    }
+
+}
diff --git a/vendor/jasig/phpcas/source/CAS/ProxyChain/Interface.php b/vendor/jasig/phpcas/source/CAS/ProxyChain/Interface.php
new file mode 100644
index 00000000000..d247115db3a
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxyChain/Interface.php
@@ -0,0 +1,53 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxyChain/Interface.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * An interface for classes that define a list of allowed proxies in front of
+ * the current application.
+ *
+ * @class    CAS_ProxyChain_Interface
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+interface CAS_ProxyChain_Interface
+{
+
+    /**
+     * Match a list of proxies.
+     *
+     * @param array $list The list of proxies in front of this service.
+     *
+     * @return bool
+     */
+    public function matches(array $list);
+
+}
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/source/CAS/ProxyChain/Trusted.php b/vendor/jasig/phpcas/source/CAS/ProxyChain/Trusted.php
new file mode 100644
index 00000000000..7fa6129677a
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxyChain/Trusted.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/ProxyChain/Trusted.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * A proxy-chain definition that defines a chain up to a trusted proxy and
+ * delegates the resposibility of validating the rest of the chain to that
+ * trusted proxy.
+ *
+ * @class    CAS_ProxyChain_Trusted
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_ProxyChain_Trusted
+extends CAS_ProxyChain
+implements CAS_ProxyChain_Interface
+{
+
+    /**
+     * Validate the size of the the list as compared to our chain.
+     *
+     * @param array $list list of proxies
+     *
+     * @return bool
+     */
+    protected function isSizeValid (array $list)
+    {
+        return (sizeof($this->chain) <= sizeof($list));
+    }
+
+}
diff --git a/vendor/jasig/phpcas/source/CAS/ProxyTicketException.php b/vendor/jasig/phpcas/source/CAS/ProxyTicketException.php
new file mode 100755
index 00000000000..723304666dc
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/ProxyTicketException.php
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @class    CAS/ProxyTicketException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ */
+
+/**
+ * An Exception for errors related to fetching or validating proxy tickets.
+ *
+ * @class    CAS_ProxyTicketException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_ProxyTicketException
+extends BadMethodCallException
+implements CAS_Exception
+{
+
+    /**
+     * Constructor
+     *
+     * @param string $message Message text
+     * @param int    $code    Error code
+     *
+     * @return void
+     */
+    public function __construct ($message, $code = PHPCAS_SERVICE_PT_FAILURE)
+    {
+        // Warn if the code is not in our allowed list
+        $ptCodes = array(
+        PHPCAS_SERVICE_PT_FAILURE,
+        PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE,
+        PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE,
+        );
+        if (!in_array($code, $ptCodes)) {
+            trigger_error(
+                'Invalid code '.$code
+                .' passed. Must be one of PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, or PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE.'
+            );
+        }
+
+        parent::__construct($message, $code);
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/Request/AbstractRequest.php b/vendor/jasig/phpcas/source/CAS/Request/AbstractRequest.php
new file mode 100755
index 00000000000..f3dd28b7227
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Request/AbstractRequest.php
@@ -0,0 +1,379 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Request/AbstractRequest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Provides support for performing web-requests via curl
+ *
+ * @class    CAS_Request_AbstractRequest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+abstract class CAS_Request_AbstractRequest
+implements CAS_Request_RequestInterface
+{
+
+    protected $url = null;
+    protected $cookies = array();
+    protected $headers = array();
+    protected $isPost = false;
+    protected $postBody = null;
+    protected $caCertPath = null;
+    protected $validateCN = true;
+    private $_sent = false;
+    private $_responseHeaders = array();
+    private $_responseBody = null;
+    private $_errorMessage = '';
+
+    /*********************************************************
+     * Configure the Request
+    *********************************************************/
+
+    /**
+     * Set the URL of the Request
+     *
+     * @param string $url Url to set
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setUrl ($url)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+
+        $this->url = $url;
+    }
+
+    /**
+     * Add a cookie to the request.
+     *
+     * @param string $name  Name of entry
+     * @param string $value value of entry
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addCookie ($name, $value)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+
+        $this->cookies[$name] = $value;
+    }
+
+    /**
+     * Add an array of cookies to the request.
+     * The cookie array is of the form
+     *     array('cookie_name' => 'cookie_value', 'cookie_name2' => cookie_value2')
+     *
+     * @param array $cookies cookies to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addCookies (array $cookies)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+
+        $this->cookies = array_merge($this->cookies, $cookies);
+    }
+
+    /**
+     * Add a header string to the request.
+     *
+     * @param string $header Header to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addHeader ($header)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+
+        $this->headers[] = $header;
+    }
+
+    /**
+     * Add an array of header strings to the request.
+     *
+     * @param array $headers headers to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addHeaders (array $headers)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+
+        $this->headers = array_merge($this->headers, $headers);
+    }
+
+    /**
+     * Make the request a POST request rather than the default GET request.
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function makePost ()
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+
+        $this->isPost = true;
+    }
+
+    /**
+     * Add a POST body to the request
+     *
+     * @param string $body body to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setPostBody ($body)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+        if (!$this->isPost) {
+            throw new CAS_OutOfSequenceException(
+                'Cannot add a POST body to a GET request, use makePost() first.'
+            );
+        }
+
+        $this->postBody = $body;
+    }
+
+    /**
+     * Specify the path to an SSL CA certificate to validate the server with.
+     *
+     * @param string $caCertPath  path to cert
+     * @param bool   $validate_cn valdiate CN of certificate
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setSslCaCert ($caCertPath,$validate_cn=true)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+        $this->caCertPath = $caCertPath;
+        $this->validateCN = $validate_cn;
+    }
+
+    /*********************************************************
+     * 2. Send the Request
+    *********************************************************/
+
+    /**
+     * Perform the request.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     */
+    public function send ()
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot send again.'
+            );
+        }
+        if (is_null($this->url) || !$this->url) {
+            throw new CAS_OutOfSequenceException(
+                'A url must be specified via setUrl() before the request can be sent.'
+            );
+        }
+        $this->_sent = true;
+        return $this->sendRequest();
+    }
+
+    /**
+     * Send the request and store the results.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     */
+    abstract protected function sendRequest ();
+
+    /**
+     * Store the response headers.
+     *
+     * @param array $headers headers to store
+     *
+     * @return void
+     */
+    protected function storeResponseHeaders (array $headers)
+    {
+        $this->_responseHeaders = array_merge($this->_responseHeaders, $headers);
+    }
+
+    /**
+     * Store a single response header to our array.
+     *
+     * @param string $header header to store
+     *
+     * @return void
+     */
+    protected function storeResponseHeader ($header)
+    {
+        $this->_responseHeaders[] = $header;
+    }
+
+    /**
+     * Store the response body.
+     *
+     * @param string $body body to store
+     *
+     * @return void
+     */
+    protected function storeResponseBody ($body)
+    {
+        $this->_responseBody = $body;
+    }
+
+    /**
+     * Add a string to our error message.
+     *
+     * @param string $message message to add
+     *
+     * @return void
+     */
+    protected function storeErrorMessage ($message)
+    {
+        $this->_errorMessage .= $message;
+    }
+
+    /*********************************************************
+     * 3. Access the response
+    *********************************************************/
+
+    /**
+     * Answer the headers of the response.
+     *
+     * @return array An array of header strings.
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseHeaders ()
+    {
+        if (!$this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has not been sent yet. Cannot '.__METHOD__
+            );
+        }
+        return $this->_responseHeaders;
+    }
+
+    /**
+     * Answer HTTP status code of the response
+     *
+     * @return int
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseStatusCode ()
+    {
+        if (!$this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has not been sent yet. Cannot '.__METHOD__
+            );
+        }
+
+        if (!preg_match(
+            '/HTTP\/[0-9.]+\s+([0-9]+)\s*(.*)/',
+            $this->_responseHeaders[0], $matches
+        )
+        ) {
+            throw new CAS_Request_Exception(
+                'Bad response, no status code was found in the first line.'
+            );
+        }
+
+        return intval($matches[1]);
+    }
+
+    /**
+     * Answer the body of response.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseBody ()
+    {
+        if (!$this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has not been sent yet. Cannot '.__METHOD__
+            );
+        }
+
+        return $this->_responseBody;
+    }
+
+    /**
+     * Answer a message describing any errors if the request failed.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getErrorMessage ()
+    {
+        if (!$this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has not been sent yet. Cannot '.__METHOD__
+            );
+        }
+        return $this->_errorMessage;
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/Request/CurlMultiRequest.php b/vendor/jasig/phpcas/source/CAS/Request/CurlMultiRequest.php
new file mode 100755
index 00000000000..410aba0e6ed
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Request/CurlMultiRequest.php
@@ -0,0 +1,146 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Request/AbstractRequest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines a class library for performing multiple web requests
+ * in batches. Implementations of this interface may perform requests serially
+ * or in parallel.
+ *
+ * @class    CAS_Request_CurlMultiRequest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Request_CurlMultiRequest
+implements CAS_Request_MultiRequestInterface
+{
+    private $_requests = array();
+    private $_sent = false;
+
+    /*********************************************************
+     * Add Requests
+    *********************************************************/
+
+    /**
+     * Add a new Request to this batch.
+     * Note, implementations will likely restrict requests to their own concrete
+     * class hierarchy.
+     *
+     * @param CAS_Request_RequestInterface $request reqest to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     * @throws CAS_InvalidArgumentException If passed a Request of the wrong
+     * implmentation.
+     */
+    public function addRequest (CAS_Request_RequestInterface $request)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+        if (!$request instanceof CAS_Request_CurlRequest) {
+            throw new CAS_InvalidArgumentException(
+                'As a CAS_Request_CurlMultiRequest, I can only work with CAS_Request_CurlRequest objects.'
+            );
+        }
+
+        $this->_requests[] = $request;
+    }
+
+    /**
+     * Retrieve the number of requests added to this batch.
+     *
+     * @return number of request elements
+     */
+    public function getNumRequests()
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot '.__METHOD__
+            );
+        }
+        return count($this->_requests);
+    }
+
+    /*********************************************************
+     * 2. Send the Request
+    *********************************************************/
+
+    /**
+     * Perform the request. After sending, all requests will have their
+     * responses poulated.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     */
+    public function send ()
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot send again.'
+            );
+        }
+        if (!count($this->_requests)) {
+            throw new CAS_OutOfSequenceException(
+                'At least one request must be added via addRequest() before the multi-request can be sent.'
+            );
+        }
+
+        $this->_sent = true;
+
+        // Initialize our handles and configure all requests.
+        $handles = array();
+        $multiHandle = curl_multi_init();
+        foreach ($this->_requests as $i => $request) {
+            $handle = $request->_initAndConfigure();
+            curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
+            $handles[$i] = $handle;
+            curl_multi_add_handle($multiHandle, $handle);
+        }
+
+        // Execute the requests in parallel.
+        do {
+            curl_multi_exec($multiHandle, $running);
+        } while ($running > 0);
+
+        // Populate all of the responses or errors back into the request objects.
+        foreach ($this->_requests as $i => $request) {
+            $buf = curl_multi_getcontent($handles[$i]);
+            $request->_storeResponseBody($buf);
+            curl_multi_remove_handle($multiHandle, $handles[$i]);
+            curl_close($handles[$i]);
+        }
+
+        curl_multi_close($multiHandle);
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/Request/CurlRequest.php b/vendor/jasig/phpcas/source/CAS/Request/CurlRequest.php
new file mode 100755
index 00000000000..ea3201e86be
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Request/CurlRequest.php
@@ -0,0 +1,199 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Request/CurlRequest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Provides support for performing web-requests via curl
+ *
+ * @class    CAS_Request_CurlRequest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Request_CurlRequest
+extends CAS_Request_AbstractRequest
+implements CAS_Request_RequestInterface
+{
+
+    /**
+     * Set additional curl options
+     *
+     * @param array $options option to set
+     *
+     * @return void
+     */
+    public function setCurlOptions (array $options)
+    {
+        $this->_curlOptions = $options;
+    }
+    private $_curlOptions = array();
+
+    /**
+     * Send the request and store the results.
+     *
+     * @return bool true on success, false on failure.
+     */
+    protected function sendRequest ()
+    {
+        phpCAS::traceBegin();
+
+        /*********************************************************
+         * initialize the CURL session
+        *********************************************************/
+        $ch = $this->_initAndConfigure();
+
+        /*********************************************************
+         * Perform the query
+        *********************************************************/
+        $buf = curl_exec($ch);
+        if ( $buf === false ) {
+            phpCAS::trace('curl_exec() failed');
+            $this->storeErrorMessage(
+                'CURL error #'.curl_errno($ch).': '.curl_error($ch)
+            );
+            $res = false;
+        } else {
+            $this->storeResponseBody($buf);
+            phpCAS::trace("Response Body: \n".$buf."\n");
+            $res = true;
+
+        }
+        // close the CURL session
+        curl_close($ch);
+
+        phpCAS::traceEnd($res);
+        return $res;
+    }
+
+    /**
+     * Internal method to initialize our cURL handle and configure the request.
+     * This method should NOT be used outside of the CurlRequest or the
+     * CurlMultiRequest.
+     *
+     * @return resource The cURL handle on success, false on failure
+     */
+    private function _initAndConfigure()
+    {
+        /*********************************************************
+         * initialize the CURL session
+        *********************************************************/
+        $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);
+            }
+        }
+
+        /*********************************************************
+         * Set SSL configuration
+        *********************************************************/
+        if ($this->caCertPath) {
+            if ($this->validateCN) {
+                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
+            } else {
+                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
+            }
+            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
+            curl_setopt($ch, CURLOPT_CAINFO, $this->caCertPath);
+            phpCAS::trace('CURL: Set CURLOPT_CAINFO ' . $this->caCertPath);
+        } else {
+            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
+        }
+
+        /*********************************************************
+         * Configure curl to capture our output.
+        *********************************************************/
+        // return the CURL output into a variable
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+
+        // get the HTTP header with a callback
+        curl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, '_curlReadHeaders'));
+
+        /*********************************************************
+         * Add cookie headers to our request.
+        *********************************************************/
+        if (count($this->cookies)) {
+            $cookieStrings = array();
+            foreach ($this->cookies as $name => $val) {
+                $cookieStrings[] = $name.'='.$val;
+            }
+            curl_setopt($ch, CURLOPT_COOKIE, implode(';', $cookieStrings));
+        }
+
+        /*********************************************************
+         * Add any additional headers
+        *********************************************************/
+        if (count($this->headers)) {
+            curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);
+        }
+
+        /*********************************************************
+         * Flag and Body for POST requests
+        *********************************************************/
+        if ($this->isPost) {
+            curl_setopt($ch, CURLOPT_POST, 1);
+            curl_setopt($ch, CURLOPT_POSTFIELDS, $this->postBody);
+        }
+
+        return $ch;
+    }
+
+    /**
+     * Store the response body.
+     * This method should NOT be used outside of the CurlRequest or the
+     * CurlMultiRequest.
+     *
+     * @param string $body body to stor
+     *
+     * @return void
+     */
+    private function _storeResponseBody ($body)
+    {
+        $this->storeResponseBody($body);
+    }
+
+    /**
+     * Internal method for capturing the headers from a curl request.
+     *
+     * @param handle $ch     handle of curl
+     * @param string $header header
+     *
+     * @return void
+     */
+    private function _curlReadHeaders ($ch, $header)
+    {
+        $this->storeResponseHeader($header);
+        return strlen($header);
+    }
+}
diff --git a/vendor/jasig/phpcas/source/CAS/Request/Exception.php b/vendor/jasig/phpcas/source/CAS/Request/Exception.php
new file mode 100755
index 00000000000..14ff3c6b0df
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Request/Exception.php
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Request/Exception.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * An Exception for problems performing requests
+ *
+ * @class    CAS_Request_Exception
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Request_Exception
+extends Exception
+implements CAS_Exception
+{
+
+}
diff --git a/vendor/jasig/phpcas/source/CAS/Request/MultiRequestInterface.php b/vendor/jasig/phpcas/source/CAS/Request/MultiRequestInterface.php
new file mode 100755
index 00000000000..abc448683a1
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Request/MultiRequestInterface.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Request/MultiRequestInterface.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines a class library for performing multiple web requests
+ * in batches. Implementations of this interface may perform requests serially
+ * or in parallel.
+ *
+ * @class    CAS_Request_MultiRequestInterface
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+interface CAS_Request_MultiRequestInterface
+{
+
+    /*********************************************************
+     * Add Requests
+    *********************************************************/
+
+    /**
+     * Add a new Request to this batch.
+     * Note, implementations will likely restrict requests to their own concrete
+     * class hierarchy.
+     *
+     * @param CAS_Request_RequestInterface $request request interface
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been
+     * sent.
+     * @throws CAS_InvalidArgumentException If passed a Request of the wrong
+     * implmentation.
+     */
+    public function addRequest (CAS_Request_RequestInterface $request);
+
+    /**
+     * Retrieve the number of requests added to this batch.
+     *
+     * @return number of request elements
+     */
+    public function getNumRequests ();
+
+    /*********************************************************
+     * 2. Send the Request
+    *********************************************************/
+
+    /**
+     * Perform the request. After sending, all requests will have their
+     * responses poulated.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     */
+    public function send ();
+}
diff --git a/vendor/jasig/phpcas/source/CAS/Request/RequestInterface.php b/vendor/jasig/phpcas/source/CAS/Request/RequestInterface.php
new file mode 100755
index 00000000000..cc11ba43d9c
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/Request/RequestInterface.php
@@ -0,0 +1,179 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Request/RequestInterface.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines a class library for performing web requests.
+ *
+ * @class    CAS_Request_RequestInterface
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+interface CAS_Request_RequestInterface
+{
+
+    /*********************************************************
+     * Configure the Request
+    *********************************************************/
+
+    /**
+     * Set the URL of the Request
+     *
+     * @param string $url url to set
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setUrl ($url);
+
+    /**
+     * Add a cookie to the request.
+     *
+     * @param string $name  name of cookie
+     * @param string $value value of cookie
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addCookie ($name, $value);
+
+    /**
+     * Add an array of cookies to the request.
+     * The cookie array is of the form
+     *     array('cookie_name' => 'cookie_value', 'cookie_name2' => cookie_value2')
+     *
+     * @param array $cookies cookies to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addCookies (array $cookies);
+
+    /**
+     * Add a header string to the request.
+     *
+     * @param string $header header to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addHeader ($header);
+
+    /**
+     * Add an array of header strings to the request.
+     *
+     * @param array $headers headers to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function addHeaders (array $headers);
+
+    /**
+     * Make the request a POST request rather than the default GET request.
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function makePost ();
+
+    /**
+     * Add a POST body to the request
+     *
+     * @param string $body body to add
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setPostBody ($body);
+
+
+    /**
+     * Specify the path to an SSL CA certificate to validate the server with.
+     *
+     * @param string  $caCertPath  path to cert file
+     * @param boolean $validate_cn validate CN of SSL certificate
+     *
+     * @return void
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     */
+    public function setSslCaCert ($caCertPath, $validate_cn = true);
+
+
+
+    /*********************************************************
+     * 2. Send the Request
+    *********************************************************/
+
+    /**
+     * Perform the request.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     */
+    public function send ();
+
+    /*********************************************************
+     * 3. Access the response
+    *********************************************************/
+
+    /**
+     * Answer the headers of the response.
+     *
+     * @return array An array of header strings.
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseHeaders ();
+
+    /**
+     * Answer HTTP status code of the response
+     *
+     * @return int
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseStatusCode ();
+
+    /**
+     * Answer the body of response.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseBody ();
+
+    /**
+     * Answer a message describing any errors if the request failed.
+     *
+     * @return string
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getErrorMessage ();
+}
diff --git a/vendor/jasig/phpcas/source/CAS/TypeMismatchException.php b/vendor/jasig/phpcas/source/CAS/TypeMismatchException.php
new file mode 100644
index 00000000000..f6f3d6bf1a1
--- /dev/null
+++ b/vendor/jasig/phpcas/source/CAS/TypeMismatchException.php
@@ -0,0 +1,70 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/InvalidArgumentException.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Exception that denotes invalid arguments were passed.
+ *
+ * @class    CAS_InvalidArgumentException
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_TypeMismatchException
+extends CAS_InvalidArgumentException
+{
+    /**
+     * Constructor, provides a nice message.
+     *
+     * @param mixed   $argument     Argument
+     * @param string  $argumentName Argument Name
+     * @param string  $type         Type
+     * @param string  $message      Error Message
+     * @param integer $code         Code
+     *
+     * @return void
+     */
+    public function __construct (
+        $argument, $argumentName, $type, $message = '', $code = 0
+    ) {
+        if (is_object($argument)) {
+            $foundType = get_class($argument).' object';
+        } else {
+            $foundType = gettype($lang);
+        }
+
+        parent::__construct(
+            'type mismatched for parameter '
+            . $argumentName . ' (should be \'' . $type .' \'), '
+            . $foundType . ' given. ' . $message, $code
+        );
+    }
+}
+?>
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/test/CAS/TestHarness/BasicResponse.php b/vendor/jasig/phpcas/test/CAS/TestHarness/BasicResponse.php
new file mode 100755
index 00000000000..afcfc39d637
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/TestHarness/BasicResponse.php
@@ -0,0 +1,467 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/TestHarness/BasicResponse
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * The BasicResponse allows tests to dynamically create a response that can be used
+ * in unit tests.
+ *
+ * @class    CAS_TestHarness_BasicResponse
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class CAS_TestHarness_BasicResponse implements CAS_TestHarness_ResponseInterface
+{
+    protected $scheme = 'http';
+    protected $host = null;
+    protected $port = null;
+    protected $path = '/';
+    protected $queryParams = array();
+    protected $responseHeaders = array();
+    protected $responseBody = '';
+    protected $verifyIsPost = null;
+    protected $postBodyToMatch = null;
+    protected $headersToHave = array();
+    protected $headersToNotHave = array();
+    protected $cookiesToHave = array();
+    protected $cookiesToNotHave = array();
+    protected $certPathToMatch = null;
+    protected $caCertPathToMatch = null;
+
+    /*********************************************************
+     * Creation and configuration.
+     *********************************************************/
+
+    /**
+     * Create a new response.
+     *
+     * @param string  $scheme 'http' or 'https'
+     * @param string  $host   Hostname
+     * @param string  $path   Path
+     * @param integer $port   Portnumber
+     *
+     * @return void
+     */
+    public function __construct($scheme, $host, $path, $port = null)
+    {
+        $this->scheme = $scheme;
+        $this->host = $host;
+        $this->path = $path;
+        $this->port = $port;
+    }
+
+    /**
+     * Add query parameters that must exist for the response to match a URL.
+     *
+     * @param array $queryParams Query paremeters
+     *
+     * @return void
+     */
+    public function matchQueryParameters(array $queryParams)
+    {
+        $this->queryParams = $queryParams;
+    }
+
+    /**
+     * Set an array of response headers to return.
+     *
+     * @param array $responseHeaders headers added to the response
+     *
+     * @return void
+     */
+    public function setResponseHeaders(array $responseHeaders)
+    {
+        $this->responseHeaders = $responseHeaders;
+    }
+
+    /**
+     * Set the response body to return
+     *
+     * @param string $responseBody body to return
+     *
+     * @return void
+     */
+    public function setResponseBody($responseBody)
+    {
+        $this->responseBody = $responseBody;
+    }
+
+    /**
+     * Ensure that the request is a POST request.
+     *
+     * @return void
+     */
+    public function ensureIsPost()
+    {
+        $this->verifyIsPost = true;
+    }
+
+    /**
+     * Ensure that the request is a GET request.
+     *
+     * @return void
+     */
+    public function ensureIsGet()
+    {
+        $this->verifyIsPost = false;
+    }
+
+    /**
+     * Ensure that the POST body equals a given string.
+     *
+     * @param string $postBodyToMatch body of the POST to match
+     *
+     * @return void
+     */
+    public function ensurePostBodyEquals($postBodyToMatch)
+    {
+        $this->postBodyToMatch = $postBodyToMatch;
+    }
+
+    /**
+     * Ensure that the request has a given header string
+     *
+     * @param string $header header that the request must match
+     *
+     * @return void
+     */
+    public function ensureHasHeader($header)
+    {
+        $this->headersToHave[] = $header;
+    }
+
+    /**
+     * Ensure that the request does not have a given header string
+     *
+     * @param string $header header the must not match
+     *
+     * @return void
+     */
+    public function ensureDoesNotHaveHeader($header)
+    {
+        $this->headersToNotHave[] = $header;
+    }
+
+    /**
+     * Ensure that the request has a given cookie
+     *
+     * @param string $name  name of cookie
+     * @param string $value If null, the presense of the cookie will be checked,
+     *  but not its value.
+     *
+     * @return void
+     */
+    public function ensureHasCookie($name, $value = null)
+    {
+        $this->cookiesToHave[$name] = $value;
+    }
+
+    /**
+     * Ensure that the request does not have a given cookie
+     *
+     * @param string $name name of cookie
+     *
+     * @return void
+     */
+    public function ensureDoesNotHaveCookie($name)
+    {
+        $this->cookiesNotToHave[] = $name;
+    }
+
+    /**
+     * Ensure that the request uses a particular cert path.
+     *
+     * @param string $certPath certificate path name
+     *
+     * @return void
+     */
+    public function ensureCertPathEquals($certPath)
+    {
+        $this->certPathToMatch = $certPath;
+    }
+
+    /**
+     * Ensure that the request uses a particular ca cert path.
+     *
+     * @param string $caCertPath certificate path name
+     *
+     * @return void
+     */
+    public function ensureCaCertPathEquals($caCertPath)
+    {
+        $this->caCertPathToMatch = $caCertPath;
+    }
+
+    /*********************************************************
+     * Interface methods
+     *********************************************************/
+
+    /**
+     * Test if this response should be supplied for the URL passed.
+     *
+     * @param string $url url that should be matched
+     *
+     * @return bool
+     */
+    public function matchesUrl($url)
+    {
+        $parts = parse_url($url);
+        if ($parts['scheme'] != $this->scheme) {
+            return false;
+        }
+        if ($parts['host'] != $this->host) {
+            return false;
+        }
+
+        if ($this->scheme == 'https') {
+            $defaultPort = 443;
+        } else {
+            $defaultPort = 80;
+        }
+        if (isset($parts['port'])) {
+            if ($this->port && $parts['port'] != $this->port) {
+                return false;
+            }
+            if ($parts['port'] != $defaultPort) {
+                return false;
+            }
+            // Allow no port to be manually specified if we are using the
+            // default port for our scheme
+        } else {
+            if ($this->port && $this->port != $defaultPort) {
+                return false;
+            }
+        }
+
+        if ($parts['path'] != $this->path) {
+            return false;
+        }
+
+        if (count($this->queryParams)) {
+            if (!isset($parts['query'])) {
+                return false;
+            }
+
+            parse_str($parts['query'], $query);
+            foreach ($this->queryParams as $name => $value) {
+                if (!isset($query[$name])) {
+                    return false;
+                }
+                if ($query[$name] != $value) {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Answer an array of response headers.
+     *
+     * @return array
+     */
+    public function getResponseHeaders()
+    {
+        return $this->responseHeaders;
+    }
+
+    /**
+     * Answer HTTP status code of the response
+     *
+     * @return int
+     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
+     */
+    public function getResponseStatusCode()
+    {
+        if (!$this->sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has not been sent yet. Cannot ' . __METHOD__
+            );
+        }
+        if (!preg_match(
+            '/HTTP\/[0-9.]+\s+([0-9]+)\s*(.*)/',
+            $this->responseHeaders[0], $matches
+        )
+        ) {
+            throw new CAS_Request_Exception(
+                "Bad response, no status code was found in the first line."
+            );
+        }
+
+        return intval($matches[1]);
+    }
+
+    /**
+     * Answer the response body
+     *
+     * @return string
+     */
+
+    public function getResponseBody()
+    {
+        return $this->responseBody;
+    }
+
+    /*********************************************************
+     * Validation of the request
+     *********************************************************/
+
+    /**
+     * Validate that the URL or its components (port, query parameters, etc)
+     * pass muster.
+     *
+     * @param string $url url to check
+     *
+     * @return bool TRUE if the URL is valid.
+     */
+    public function validateUrl($url)
+    {
+        return $this->matchesUrl($url);
+    }
+
+    /**
+     * Validate an array of request headers.
+     *
+     * @param array $headers headers to validate
+     *
+     * @return bool TRUE if the headers are valid.
+     */
+    public function validateRequestHeaders(array $headers)
+    {
+        foreach ($this->headersToHave as $headerToCheck) {
+            if (!in_array($headerToCheck, $headers)) {
+                return false;
+            }
+        }
+        foreach ($this->headersToNotHave as $headerToCheck) {
+            if (in_array($headerToCheck, $headers)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Validate an array of request cookies.
+     *
+     * @param array $cookies cookies to check
+     *
+     * @return bool TRUE if the cookies are valid.
+     */
+    public function validateRequestCookies(array $cookies)
+    {
+        foreach ($this->cookiesToHave as $name => $value) {
+            if (!isset($cookies[$name])) {
+                return false;
+            }
+            if (!is_null($value) && $cookies[$name] != $value) {
+                return false;
+            }
+        }
+        foreach ($this->cookiesToNotHave as $name) {
+            if (isset($cookies[$name])) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Validate the type of request.
+     *
+     * @param bool $isPost if the request should be POST
+     *
+     * @return bool TRUE if the type is valid.
+     */
+    public function validateRequestIsPost($isPost)
+    {
+        if ($this->verifyIsPost === true && !$isPost) {
+            return false;
+        } else if ($this->verifyIsPost === false && $isPost) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Validate the body of the post request.
+     *
+     * @param string $postBody POST body
+     *
+     * @return bool TRUE if the post body is valid.
+     */
+    public function validatePostBody($postBody)
+    {
+        if (!is_null($this->postBodyToMatch)
+            && $this->postBodyToMatch != $postBody
+        ) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Validate an SSL certificate path.
+     *
+     * @param string $certPath certificate path
+     *
+     * @return bool TRUE if the cert path is correct.
+     */
+    public function validateCert($certPath)
+    {
+        if (!is_null($this->certPathToMatch)
+            && $this->certPathToMatch != $certPath
+        ) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Validate an SSL CA certificate path.
+     *
+     * @param string $caCertPath certificate path
+     *
+     * @return bool TRUE if the cert path is correct.
+     */
+    public function validateCaCert($caCertPath)
+    {
+        if (!is_null($this->caCertPathToMatch)
+            && $this->caCertPathToMatch != $caCertPath
+        ) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/vendor/jasig/phpcas/test/CAS/TestHarness/DummyMultiRequest.php b/vendor/jasig/phpcas/test/CAS/TestHarness/DummyMultiRequest.php
new file mode 100755
index 00000000000..e257e6fbd7a
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/TestHarness/DummyMultiRequest.php
@@ -0,0 +1,128 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/TestHarness/DummyMultiRequest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * This interface defines a class library for performing multiple web requests
+ * in batches. Implementations of this interface may perform requests serially
+ * or in parallel.
+ *
+ * @class    CAS_TestHarness_DummyMultiRequest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class CAS_TestHarness_DummyMultiRequest implements
+CAS_Request_MultiRequestInterface
+{
+    private $_requests = array();
+    private $_sent = false;
+
+    /*********************************************************
+     * Add Requests
+     *********************************************************/
+
+    /**
+     * Add a new Request to this batch.
+     * Note, implementations will likely restrict requests to their own concrete
+     * class hierarchy.
+     *
+     * @param CAS_Request_RequestInterface $request request interface
+     *
+     * @return void
+     *
+     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
+     * @throws CAS_InvalidArgumentException If passed a Request of the wrong
+     * implmentation.
+     */
+    public function addRequest(CAS_Request_RequestInterface $request)
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot ' . __METHOD__
+            );
+        }
+        if (!$request instanceof CAS_TestHarness_DummyRequest) {
+            throw new CAS_InvalidArgumentException(
+                'As a CAS_TestHarness_DummyMultiRequest, I can only work with CAS_TestHarness_DummyRequest objects.'
+            );
+        }
+
+        $this->_requests[] = $request;
+    }
+
+    /*********************************************************
+     * 2. Send the Request
+     *********************************************************/
+
+    /**
+     * Perform the request. After sending, all requests will have their
+     * responses poulated.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     *
+     * @throws CAS_OutOfSequenceException If called multiple times.
+     */
+    public function send()
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot send again.'
+            );
+        }
+        if (!count($this->_requests)) {
+            throw new CAS_OutOfSequenceException(
+                'At least one request must be added via addRequest() before the multi-request can be sent.'
+            );
+        }
+        $this->_sent = true;
+
+        // Run all of our requests.
+        foreach ($this->_requests as $request) {
+            $request->send();
+        }
+    }
+
+    /**
+     * Retrieve the number of requests added to this batch.
+     *
+     * @return number of request elements
+     */
+    public function getNumRequests()
+    {
+        if ($this->_sent) {
+            throw new CAS_OutOfSequenceException(
+                'Request has already been sent cannot ' . __METHOD__
+            );
+        }
+        return count($this->_requests);
+    }
+}
diff --git a/vendor/jasig/phpcas/test/CAS/TestHarness/DummyRequest.php b/vendor/jasig/phpcas/test/CAS/TestHarness/DummyRequest.php
new file mode 100755
index 00000000000..005d80b274c
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/TestHarness/DummyRequest.php
@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/TestHarness/DummyRequest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Provides support for performing dummy web-requests
+ *
+ * @class    CAS_TestHarness_DummyRequest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_TestHarness_DummyRequest extends CAS_Request_AbstractRequest
+implements CAS_Request_RequestInterface
+{
+    private static $_responses = array();
+
+    /**
+     * Configure a URL/Response that the test harness will respond to.
+     *
+     * @param CAS_TestHarness_ResponseInterface $response response interface
+     *
+     * @return void
+     */
+    public static function addResponse(
+        CAS_TestHarness_ResponseInterface $response
+    ) {
+        self::$_responses[] = $response;
+    }
+
+    /**
+     * Clear out the URLs/Responses that the test harness will respond to.
+     *
+     * @return void
+     */
+    public static function clearResponses()
+    {
+        self::$_responses = array();
+    }
+
+    /**
+     * Send the request and store the results.
+     *
+     * @return bool TRUE on success, FALSE on failure.
+     */
+    protected function sendRequest()
+    {
+        foreach (self::$_responses as $response) {
+            if ($response->matchesUrl($this->url)) {
+                if (!$response->validateUrl($this->url)) {
+                    $this->storeErrorMessage('Validation of url failed.');
+                    return false;
+                }
+                if (!$response->validateRequestHeaders($this->headers)) {
+                    $this->storeErrorMessage('Validation of headers failed.');
+                    return false;
+                }
+                if (!$response->validateRequestCookies($this->cookies)) {
+                    $this->storeErrorMessage('Validation of cookies failed.');
+                    return false;
+                }
+                if (!$response->validateRequestIsPost($this->isPost)) {
+                    $this->storeErrorMessage(
+                        'Validation of GET/POST type failed.'
+                    );
+                    return false;
+                }
+                if (!$response->validatePostBody($this->postBody)) {
+                    $this->storeErrorMessage('Validation of POST body failed.');
+                    return false;
+                }
+                if (!$response->validateCaCert($this->caCertPath)) {
+                    $this->storeErrorMessage('Validation of CA cert failed.');
+                    return false;
+                }
+
+                $this->storeResponseHeaders($response->getResponseHeaders());
+                $this->storeResponseBody($response->getResponseBody());
+                return true;
+            }
+        }
+        // 		print_r("\n404 URL ".$this->url." not found in test harness.\n");
+
+        $this->storeErrorMessage(
+            '404 URL ' . $this->url . ' not found in test harness.'
+        );
+        return false;
+    }
+}
diff --git a/vendor/jasig/phpcas/test/CAS/TestHarness/ResponseInterface.php b/vendor/jasig/phpcas/test/CAS/TestHarness/ResponseInterface.php
new file mode 100755
index 00000000000..a93c01f62d3
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/TestHarness/ResponseInterface.php
@@ -0,0 +1,136 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/TestHarness/ResponseInterface.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Implementations of this interface can validate a request and provide response
+ * headers and body, allowing the spoofing of responses to web requests for testing
+ * purposes.
+ *
+ * @class    CAS_TestHarness_ResponseInterface
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+interface CAS_TestHarness_ResponseInterface
+{
+
+    /**
+     * Test if this response should be supplied for the URL passed.
+     *
+     * @param string $url url to match
+     *
+     * @return bool
+     */
+    public function matchesUrl($url);
+
+    /**
+     * Answer an array of response headers.
+     *
+     * @return array
+     */
+    public function getResponseHeaders();
+
+    /**
+     * Answer the response body
+     *
+     * @return string
+     */
+    public function getResponseBody();
+
+    /*********************************************************
+     * Validation of the request
+     *********************************************************/
+
+    /**
+     * Validate that the URL or its components (port, query parameters, etc)
+     * pass muster.
+     *
+     * @param string $url url to validate
+     *
+     * @return bool TRUE if the URL is valid.
+     */
+    public function validateUrl($url);
+
+    /**
+     * Validate an array of request headers.
+     *
+     * @param array $headers headers to validate
+     *
+     * @return bool TRUE if the headers are valid.
+     */
+    public function validateRequestHeaders(array $headers);
+
+    /**
+     * Validate an array of request cookies.
+     *
+     * @param array $cookies cookies to validate
+     *
+     * @return bool TRUE if the cookies are valid.
+     */
+    public function validateRequestCookies(array $cookies);
+
+    /**
+     * Validate the type of request.
+     *
+     * @param bool $isPost if POST true or false
+     *
+     * @return bool TRUE if the type is valid.
+     */
+    public function validateRequestIsPost($isPost);
+
+    /**
+     * Validate the body of the post request.
+     *
+     * @param string $postBody POST body
+     *
+     * @return bool TRUE if the post body is valid.
+     */
+    public function validatePostBody($postBody);
+
+    /**
+     * Validate an SSL certificate path.
+     *
+     * @param string $certPath certificate path
+     *
+     * @return bool TRUE if the cert path is correct.
+     */
+    public function validateCert($certPath);
+
+    /**
+     * Validate an SSL CA certificate path.
+     *
+     * @param string $caCertPath ca certificate path
+     *
+     * @return bool TRUE if the cert path is correct.
+     */
+    public function validateCaCert($caCertPath);
+
+}
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/AuthenticationTest.php b/vendor/jasig/phpcas/test/CAS/Tests/AuthenticationTest.php
new file mode 100644
index 00000000000..3b198cf0de8
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/AuthenticationTest.php
@@ -0,0 +1,143 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/AuthenticationTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of service tickets.
+ *
+ * @class    CAS_Tests_AuthenticationTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_AuthenticationTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        //     	phpCAS::setDebug(dirname(__FILE__).'/../test.log');
+        // 		error_reporting(E_ALL);
+
+        CAS_GracefullTerminationException::throwInsteadOfExiting();
+
+        $_SERVER['SERVER_NAME'] = 'www.clientapp.com';
+        $_SERVER['SERVER_PORT'] = '80';
+        $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+        $_SERVER['SERVER_ADMIN'] = 'root@localhost';
+        $_SERVER['REQUEST_URI'] = '/';
+        $_SERVER['SCRIPT_NAME'] = '/index.php';
+        $_SERVER['PHP_SELF'] = '/index.php';
+        $_SESSION = array();
+
+        $this->object = new CAS_Client(
+            CAS_VERSION_2_0, // Server Version
+            true, // Proxy
+            'cas.example.edu', // Server Hostname
+            443, // Server port
+            '/cas/', // Server URI
+            false // Start Session
+        );
+
+        $this->object->setRequestImplementation('CAS_TestHarness_DummyRequest');
+        $this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
+
+        /*********************************************************
+         * Enumerate our responses
+         *********************************************************/
+
+        // Set up our response.
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/serviceValidate'
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response
+            ->setResponseBody(
+                "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+"
+            );
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+        CAS_TestHarness_DummyRequest::clearResponses();
+        $_SESSION = array();
+    }
+
+    /**
+     * Test that the user is redirected to the CAS server
+     *
+     * @return void
+     */
+    public function testRedirect()
+    {
+        try {
+            ob_start();
+            $this->object->forceAuthentication();
+            $this->assertTrue(
+                false, 'Should have thrown a CAS_GracefullTerminationException.'
+            );
+        } catch (CAS_GracefullTerminationException $e) {
+            ob_end_clean();
+            // It would be great to test for the existance of headers here, but
+            // the don't get set properly due to output before the test.
+        }
+    }
+}
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/Cas20AttributesTest.php b/vendor/jasig/phpcas/test/CAS/Tests/Cas20AttributesTest.php
new file mode 100755
index 00000000000..5046622519d
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/Cas20AttributesTest.php
@@ -0,0 +1,382 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/Cas20AttributeTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of service tickets.
+ *
+ * @class    CAS_Tests_Cas20AttributeTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_Cas20AttributesTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $_SERVER['SERVER_NAME'] = 'www.service.com';
+        $_SERVER['SERVER_PORT'] = '80';
+        $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+        $_SERVER['SERVER_ADMIN'] = 'root@localhost';
+        $_SERVER['REQUEST_URI'] = '/';
+        $_SERVER['SCRIPT_NAME'] = '/index.php';
+        $_SERVER['PHP_SELF'] = '/index.php';
+        $_SESSION = array();
+
+        $this->object = new CAS_Client(
+            CAS_VERSION_2_0, // Server Version
+            false, // Proxy
+            'cas.example.edu', // Server Hostname
+            443, // Server port
+            '/cas/', // Server URI
+            false // Start Session
+        );
+
+        $this->object->setRequestImplementation('CAS_TestHarness_DummyRequest');
+        $this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
+        $this->object->setNoClearTicketsFromUrl();
+        // 		phpCAS::setDebug(dirname(__FILE__).'/../test.log');
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+        CAS_TestHarness_DummyRequest::clearResponses();
+    }
+
+    /**
+     * Verify that phpCAS will successfully fetch RubyCAS-style attributes:
+     *
+     * @return void
+     */
+    public function testRubycasAttributes()
+    {
+        // Set up our response.
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/serviceValidate'
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+
+        <cas:attraStyle>RubyCAS</cas:attraStyle>
+        <cas:surname>Smith</cas:surname>
+        <cas:givenName>John</cas:givenName>
+        <cas:memberOf>CN=Staff,OU=Groups,DC=example,DC=edu</cas:memberOf>
+        <cas:memberOf>CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu</cas:memberOf>
+
+        <cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+"
+        );
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->isAuthenticated();
+
+        // Verify that we have attributes from this response
+        $attras = $this->object->getAttributes();
+        $this->assertTrue($this->object->hasAttribute('attraStyle'));
+        // direct access
+        $this
+            ->assertEquals('RubyCAS', $this->object->getAttribute('attraStyle'));
+        // array access
+        $this->assertArrayHasKey('attraStyle', $attras);
+        $this->assertEquals('RubyCAS', $attras['attraStyle']);
+
+        $this->validateUserAttributes();
+    }
+
+    /**
+     * Verify that phpCAS will successfully fetch RubyCAS-style attributes:
+     *
+     * @return void
+     */
+    public function testJasigAttributes()
+    {
+        // Set up our response.
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/serviceValidate'
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+
+        <cas:attributes>
+            <cas:attraStyle>Jasig</cas:attraStyle>
+            <cas:surname>Smith</cas:surname>
+            <cas:givenName>John</cas:givenName>
+            <cas:memberOf>CN=Staff,OU=Groups,DC=example,DC=edu</cas:memberOf>
+            <cas:memberOf>CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu</cas:memberOf>
+        </cas:attributes>
+
+        <cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+"
+        );
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->isAuthenticated();
+
+        // Verify that we have attributes from this response
+        $attras = $this->object->getAttributes();
+        $this->assertTrue($this->object->hasAttribute('attraStyle'));
+        // direct access
+        $this->assertEquals('Jasig', $this->object->getAttribute('attraStyle'));
+        // array access
+        $this->assertArrayHasKey('attraStyle', $attras);
+        $this->assertEquals('Jasig', $attras['attraStyle']);
+
+        $this->validateUserAttributes();
+
+    }
+    /**
+     * Test Jasig Attributes with international characters
+     *
+     * @return void
+     */
+    public function testJasigAttributesInternational()
+    {
+        // Set up our response.
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/serviceValidate'
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>Iñtërnâtiônàlizætiøn</cas:user>
+        <cas:attributes>
+            <cas:attraStyle>Jasig</cas:attraStyle>
+            <cas:givenName>Iñtërnâtiônàlizætiøn</cas:givenName>
+        </cas:attributes>
+        <cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+"
+        );
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->isAuthenticated();
+
+        // Verify that we have attributes from this response
+        $attras = $this->object->getAttributes();
+        $this->assertTrue($this->object->hasAttribute('attraStyle'));
+        // direct access
+        $this->assertEquals('Jasig', $this->object->getAttribute('attraStyle'));
+        // array access
+        $this->assertArrayHasKey('attraStyle', $attras);
+        $this->assertEquals('Jasig', $attras['attraStyle']);
+
+        $this->assertTrue($this->object->hasAttribute('givenName'));
+        // direct access
+        $this->assertEquals(
+            'Iñtërnâtiônàlizætiøn',
+            $this->object->getAttribute('givenName')
+        );
+        // array access
+        $this->assertArrayHasKey('givenName', $attras);
+        $this->assertEquals('Iñtërnâtiônàlizætiøn', $attras['givenName']);
+
+    }
+
+    /**
+     * Verify that phpCAS will successfully fetch name-value-style attributes:
+     *
+     * @return void
+     */
+    public function testNameValueAttributes()
+    {
+        // Set up our response.
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/serviceValidate'
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+
+        <cas:attribute name='attraStyle' value='Name-Value' />
+        <cas:attribute name='surname' value='Smith' />
+        <cas:attribute name='givenName' value='John' />
+        <cas:attribute name='memberOf' value='CN=Staff,OU=Groups,DC=example,DC=edu' />
+        <cas:attribute name='memberOf' value='CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu' />
+
+        <cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+"
+        );
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->isAuthenticated();
+
+        // Verify that we have attributes from this response
+        $attras = $this->object->getAttributes();
+        $this->assertTrue(
+            $this->object->hasAttribute('attraStyle'),
+            "Should have an attraStyle attribute"
+        );
+        // direct access
+        $this->assertEquals(
+            'Name-Value',
+            $this->object->getAttribute('attraStyle')
+        );
+        // array access
+        $this->assertArrayHasKey('attraStyle', $attras);
+        $this->assertEquals('Name-Value', $attras['attraStyle']);
+
+        $this->validateUserAttributes();
+    }
+
+    /**
+     * Validate user attributes.
+     *
+     * @return void
+     */
+    public function validateUserAttributes()
+    {
+        $attras = $this->object->getAttributes();
+        $this->assertInternalType('array', $attras);
+
+        if (count($attras) != 4 || !is_array($attras['memberOf'])) {
+            print "\n";
+            print_r($attras);
+        }
+
+        $this->assertEquals(4, count($attras));
+
+        $this->assertTrue($this->object->hasAttribute('givenName'));
+        // direct access
+        $this->assertEquals('John', $this->object->getAttribute('givenName'));
+        // array access
+        $this->assertArrayHasKey('givenName', $attras);
+        $this->assertEquals('John', $attras['givenName']);
+
+        $this->assertTrue($this->object->hasAttribute('surname'));
+        // direct access
+        $this->assertEquals('Smith', $this->object->getAttribute('surname'));
+        // array access
+        $this->assertArrayHasKey('surname', $attras);
+        $this->assertEquals('Smith', $attras['surname']);
+
+        $this->assertTrue($this->object->hasAttribute('memberOf'));
+        // direct access
+        $memberOf = $this->object->getAttribute('memberOf');
+        $this->assertInternalType('array', $memberOf);
+        $this->assertEquals(2, count($memberOf));
+        $this->assertTrue(
+            in_array('CN=Staff,OU=Groups,DC=example,DC=edu', $memberOf)
+        );
+        $this->assertTrue(
+            in_array(
+                'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu',
+                $memberOf
+            )
+        );
+        // array access
+        $this->assertArrayHasKey('memberOf', $attras);
+        $this->assertInternalType('array', $attras['memberOf']);
+        $this->assertEquals(2, count($attras['memberOf']));
+        $this->assertTrue(
+            in_array('CN=Staff,OU=Groups,DC=example,DC=edu', $attras['memberOf'])
+        );
+        $this->assertTrue(
+            in_array(
+                'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu',
+                $attras['memberOf']
+            )
+        );
+    }
+
+}
+?>
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/CookieJarTest.php b/vendor/jasig/phpcas/test/CAS/Tests/CookieJarTest.php
new file mode 100755
index 00000000000..5cb237d65c7
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/CookieJarTest.php
@@ -0,0 +1,919 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/CookieJarTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test harness for the cookie Jar to allow us to test protected methods.
+ *
+ * @class    CAS_Tests_CookieJarExposed
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class CAS_Tests_CookieJarExposed extends CAS_CookieJar
+{
+    /**
+     * Wrapper to call protected methods
+     *
+     * @param string $method function name
+     * @param array  $args   function args
+     *
+     * @throws BadMethodCallException
+     *
+     * @return mixed
+     */
+    public function __call($method, array $args = array())
+    {
+        if (!method_exists($this, $method)) {
+            throw new BadMethodCallException("method '$method' does not exist");
+        }
+        return call_user_func_array(array($this, $method), $args);
+    }
+}
+
+/**
+ * Test class for verifying the operation of cookie handling methods used in
+ * serviceWeb() proxy calls.
+ *
+ * @class    CAS_Tests_CookieJarTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_CookieJarTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $this->cookieArray = array();
+        $this->object = new CAS_Tests_CookieJarExposed($this->cookieArray);
+
+        $this->serviceUrl_1 = 'http://service.example.com/lookup/?action=search&query=username';
+        $this->responseHeaders_1 = array('HTTP/1.1 302 Found',
+            'Date: Tue, 07 Sep 2010 17:51:54 GMT',
+            'Server: Apache/2.2.3 (Red Hat)', 'X-Powered-By: PHP/5.1.6',
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; path=/',
+            'Expires: Thu, 19 Nov 1981 08:52:00 GMT',
+            'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0',
+            'Pragma: no-cache',
+            'Location: https://cas.example.edu:443/cas/login?service=http%3A%2F%2Fservice.example.edu%2Flookup%2F%3Faction%3Dsearch%26query%3Dusername',
+            'Content-Length: 525', 'Connection: close',
+            'Content-Type: text/html; charset=UTF-8',
+        );
+        $this->serviceUrl_1b = 'http://service.example.com/lookup/?action=search&query=another_username';
+        $this->serviceUrl_1c = 'http://service.example.com/make_changes.php';
+
+        // Verify that there are no cookies to start.
+        $this->assertEquals(
+            0, count($this->object->getCookies($this->serviceUrl_1))
+        );
+        $this->assertEquals(
+            0, count($this->object->getCookies($this->serviceUrl_1b))
+        );
+        $this->assertEquals(
+            0, count($this->object->getCookies($this->serviceUrl_1c))
+        );
+
+        // Add service cookies as if we just made are request to serviceUrl_1
+        // and recieved responseHeaders_1 as the header to the response.
+        $this->object
+            ->storeCookies($this->serviceUrl_1, $this->responseHeaders_1);
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+
+    }
+
+    /*********************************************************
+     * Tests of public (interface) methods
+     *********************************************************/
+
+    /**
+     * Verify that our first response will set a cookie that will be available to
+     * the same URL.
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesSameUrl()
+    {
+        // Verify that our cookie is available.
+        $cookies = $this->object->getCookies($this->serviceUrl_1);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+    }
+
+    /**
+     * Verify that our first response will set a cookie that is available to a second
+     * request to a different url on the same host.
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesSamePathDifferentQuery()
+    {
+        // Verify that our cookie is available.
+        $cookies = $this->object->getCookies($this->serviceUrl_1b);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+    }
+
+    /**
+     * Verify that our first response will set a cookie that is available to a second
+     * request to a different url on the same host.
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesDifferentPath()
+    {
+        // Verify that our cookie is available.
+        $cookies = $this->object->getCookies($this->serviceUrl_1c);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+    }
+
+    /**
+     * Verify that our cookies set with the 'secure' token will only go to https
+     * URLs.
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesSecure()
+    {
+        $headers = array('Set-Cookie: person="bob jones"; path=/; Secure');
+        $url = 'https://service.example.com/lookup/?action=search&query=username';
+        $this->object->storeCookies($url, $headers);
+
+        // Ensure that only the SID cookie not available to non https URLs
+        $cookies = $this->object
+            ->getCookies('http://service.example.com/lookup/');
+        $this->assertArrayHasKey('SID', $cookies);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+        $this->assertArrayNotHasKey('person', $cookies);
+
+        // Ensure that the SID cookie is avalailable to https urls.
+        $cookies = $this->object
+            ->getCookies('https://service.example.com/lookup/');
+        $this->assertArrayHasKey('SID', $cookies);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+        $this->assertArrayHasKey('person', $cookies);
+        $this->assertEquals('bob jones', $cookies['person']);
+    }
+
+    /**
+     * Verify that our cookies set with the 'secure' token will only go to https
+     * URLs.
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesSecureLC()
+    {
+        $headers = array('Set-Cookie: person="bob jones"; path=/; secure');
+        $url = 'https://service.example.com/lookup/?action=search&query=username';
+        $this->object->storeCookies($url, $headers);
+
+        // Ensure that only the SID cookie not available to non https URLs
+        $cookies = $this->object
+            ->getCookies('http://service.example.com/lookup/');
+        $this->assertArrayHasKey('SID', $cookies);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+        $this->assertArrayNotHasKey('person', $cookies);
+
+        // Ensure that the SID cookie is avalailable to https urls.
+        $cookies = $this->object
+            ->getCookies('https://service.example.com/lookup/');
+        $this->assertArrayHasKey('SID', $cookies);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+        $this->assertArrayHasKey('person', $cookies);
+        $this->assertEquals('bob jones', $cookies['person']);
+    }
+
+    /**
+     * Verify that when no domain is set for the cookie, it will be unavailable
+     * to other hosts
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesDifferentHost()
+    {
+        // Verify that our cookie isn't available when the hostname is changed.
+        $cookies = $this->object
+            ->getCookies('http://service2.example.com/make_changes.php');
+        $this->assertEquals(0, count($cookies));
+
+        // Verify that our cookie isn't available when the domain is changed.
+        $cookies = $this->object
+            ->getCookies('http://service.example2.com/make_changes.php');
+        $this->assertEquals(0, count($cookies));
+
+        // Verify that our cookie isn't available when the tdl is changed.
+        $cookies = $this->object
+            ->getCookies('http://service.example.org/make_changes.php');
+        $this->assertEquals(0, count($cookies));
+    }
+
+    /**
+     * Verify that our set with the domain name will work
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesDomain()
+    {
+        $headers = array(
+            'Set-Cookie: SID="thisisthesid"; domain=".example.org"; path=/'
+        );
+        $url = 'http://host.example.org/path/to/somthing';
+        $this->object->storeCookies($url, $headers);
+
+        // Ensure the SID cookie is available to the domain
+        $cookies = $this->object->getCookies('http://example.org/path/');
+        $this->assertArrayHasKey(
+            'SID', $cookies, "example.org should match .example.org cookies"
+        );
+
+        // Ensure the SID cookie is available to the host
+        $cookies = $this->object->getCookies('http://host.example.org/path/');
+        $this->assertArrayHasKey(
+            'SID', $cookies, "host.example.org should match .example.org cookies"
+        );
+        $this->assertEquals(
+            'thisisthesid', $cookies['SID'],
+            "host.example.org should match .example.org cookies"
+        );
+
+        // Ensure the SID cookie is NOT available to a subdomain of the host
+        // See RFC 2965 section 3.3.2  Rejecting Cookies for more details:
+        // http://www.ietf.org/rfc/rfc2965.txt
+        $cookies = $this->object
+            ->getCookies('http://sub.host.example.org/path/');
+        $this->assertArrayNotHasKey(
+            'SID', $cookies,
+            "sub.host.example.org shouldn't match .example.org cookies"
+        );
+    }
+
+    /**
+     * Verify that our set with the host name explicitly will work
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesDomainHost()
+    {
+        $headers = array(
+            'Set-Cookie: SID="thisisthesid"; domain="host.example.org"; path=/'
+        );
+        $url = 'http://host.example.org/path/to/somthing';
+        $this->object->storeCookies($url, $headers);
+
+        // Ensure the SID cookie is NOT available to the domain
+        $cookies = $this->object->getCookies('http://example.org/path/');
+        $this->assertArrayNotHasKey(
+            'SID', $cookies,
+            "example.org shouldn't match host.example.org cookies"
+        );
+
+        // Ensure the SID cookie is available to the host
+        $cookies = $this->object->getCookies('http://host.example.org/path/');
+        $this->assertArrayHasKey(
+            'SID', $cookies,
+            "host.example.org should match host.example.org cookies"
+        );
+        $this->assertEquals(
+            'thisisthesid', $cookies['SID'],
+            "host.example.org should match host.example.org cookies"
+        );
+
+        // Ensure the SID cookie is NOT available to a subdomain of the host
+        // See RFC 2965 section 3.3.2  Rejecting Cookies for more details:
+        // http://www.ietf.org/rfc/rfc2965.txt
+        $cookies = $this->object
+            ->getCookies('http://sub.host.example.org/path/');
+        $this->assertArrayNotHasKey(
+            'SID', $cookies,
+            "sub.host.example.org shouldn't match host.example.org cookies"
+        );
+    }
+
+    /**
+     * Verify that our set with the host name explicitly will work
+     *
+     * @return void
+     */
+    public function testPublicGetCookiesDomainHostDotted()
+    {
+        $headers = array(
+            'Set-Cookie: SID="thisisthesid"; domain=".host.example.org"; path=/'
+        );
+        $url = 'http://host.example.org/path/to/somthing';
+        $this->object->storeCookies($url, $headers);
+
+        // Ensure the SID cookie is NOT available to the domain
+        $cookies = $this->object->getCookies('http://example.org/path/');
+        $this->assertArrayNotHasKey(
+            'SID', $cookies,
+            "example.org shouldn't match .host.example.org cookies"
+        );
+
+        // Ensure the SID cookie is available to the host
+        $cookies = $this->object->getCookies('http://host.example.org/path/');
+        $this->assertArrayHasKey(
+            'SID', $cookies,
+            "host.example.org should match .host.example.org cookies"
+        );
+        $this->assertEquals(
+            'thisisthesid', $cookies['SID'],
+            "host.example.org should match host.example.org cookies"
+        );
+
+        // Ensure the SID cookie IS available to a subdomain of the host
+        $cookies = $this->object
+            ->getCookies('http://sub.host.example.org/path/');
+        $this->assertArrayHasKey(
+            'SID', $cookies,
+            "sub.host.example.org should match .host.example.org cookies"
+        );
+    }
+
+    /**
+     * Verify that cookies are getting stored in our storage array.
+     *
+     * @return void
+     */
+    public function testPublicStoreCookies()
+    {
+        $array = array();
+        $cookieJar = new CAS_CookieJar($array);
+        $this->assertEquals(0, count($array));
+        $cookieJar->storeCookies($this->serviceUrl_1, $this->responseHeaders_1);
+        $this->assertEquals(1, count($array));
+    }
+
+    /**
+     * Verify that cookie header with max-age value will be available for that
+     * length of time.
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesMaxAge()
+    {
+        // Verify that we have on cookie to start.
+        $this->assertEquals(
+            1, count($this->object->getCookies($this->serviceUrl_1))
+        );
+
+        // Send set-cookie header to remove the cookie
+        $headers = array('Set-Cookie2: person="bob jones"; path=/; max-age=2');
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        // Ensure that the cookie exists after 1 second
+        sleep(1);
+        $cookies = $this->object->getCookies($this->serviceUrl_1);
+        $this->assertArrayHasKey('person', $cookies);
+        $this->assertEquals('bob jones', $cookies['person']);
+
+        // Wait 3 total seconds and then ensure that the cookie has been removed
+        sleep(2);
+        $cookies = $this->object->getCookies($this->serviceUrl_1);
+        $this->assertArrayNotHasKey('person', $cookies);
+    }
+
+    /**
+     * Verify that cookie header with max-age=0 will remove the cookie.
+     * Documented in RFC2965 section 3.2.2
+     * http://www.ietf.org/rfc/rfc2965.txt
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesRemoveViaMaxAge0()
+    {
+        // Verify that we have on cookie to start.
+        $this->assertEquals(
+            1, count($this->object->getCookies($this->serviceUrl_1))
+        );
+
+        // Send set-cookie header to remove the cookie
+        $headers = array(
+            'Set-Cookie2: SID=k1jut1r1bqrumpei837kk4jks0; path=/; max-age=0'
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $this->assertEquals(
+            0, count($this->object->getCookies($this->serviceUrl_1))
+        );
+    }
+
+    /**
+     * Verify that cookie header with expires in the past will remove the cookie.
+     * Documented in RFC2965 section 3.2.2
+     * http://www.ietf.org/rfc/rfc2965.txt
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesRemoveViaExpiresPast()
+    {
+        // Verify that we have on cookie to start.
+        $this->assertEquals(
+            1, count($this->object->getCookies($this->serviceUrl_1))
+        );
+
+        // Send set-cookie header to remove the cookie
+        $headers = array(
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; path=/; expires=Fri, 31-Dec-2009 23:59:59 GMT'
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $this->assertEquals(
+            0, count($this->object->getCookies($this->serviceUrl_1))
+        );
+    }
+
+    /**
+     * Verify that cookie header that expires in the past will not be stored.
+     *
+     * http://www.ietf.org/rfc/rfc2965.txt
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesDontStoreExpiresPast()
+    {
+        // Verify that we have on cookie to start.
+        $this->assertEquals(
+            1, count($this->object->getCookies($this->serviceUrl_1))
+        );
+
+        // Send set-cookie header to remove the cookie
+        $headers = array(
+            'Set-Cookie: bob=jones; path=/; expires='
+            . gmdate('D, d-M-Y H:i:s e', time() - 90000)
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1);
+        $this->assertEquals(1, count($cookies));
+        $this->assertArrayNotHasKey('jones', $cookies);
+    }
+
+    /**
+     * Verify that cookie header that expires in the futre will not be removed.
+     *
+     * http://www.ietf.org/rfc/rfc2965.txt
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesExpiresFuture()
+    {
+        // Verify that we have on cookie to start.
+        $this->assertEquals(
+            1, count($this->object->getCookies($this->serviceUrl_1))
+        );
+
+        // Send set-cookie header to remove the cookie
+        $headers = array(
+            'Set-Cookie: bob=jones; path=/; expires='
+            . gmdate('D, d-M-Y H:i:s e', time() + 600)
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1);
+        $this->assertEquals(2, count($cookies));
+        $this->assertEquals('jones', $cookies['bob']);
+    }
+
+    /**
+     * Test the inclusion of an httponly attribute.
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesHttponly()
+    {
+        $headers = array(
+            'Set-Cookie: SID="hello world"; path=/; domain=.example.com; HttpOnly'
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1b);
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals('hello world', $cookies['SID']);
+        $this->assertEquals(
+            1, count($cookies),
+            "Should only a single SID cookie, not a cookie for the HttpOnly attribute"
+        );
+    }
+
+    /**
+     * Test the inclusion of an comment attribute.
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesComment()
+    {
+        $headers = array(
+            'Set-Cookie: SID="hello world"; path=/; domain=.example.com; HttpOnly; comment="A session cookie"'
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1b);
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals('hello world', $cookies['SID']);
+        $this->assertEquals(
+            1, count($cookies),
+            "Should only a single SID cookie, not a cookie for the comment attribute"
+        );
+    }
+
+    /**
+     * Test the inclusion of a semicolon in a quoted cookie value.
+     *
+     * Note: As of September 12th, the current implementation is known to
+     * fail this test since it explodes values on the semicolon symbol. This
+     * behavior is not ideal but should be ok for most cases. Since this is the
+     * default behaviour for most browsers anyway the test is disabled.
+     */
+    /*
+     public function test_public_storeCookies_QuotedSemicolon()
+     {
+     $headers = array('Set-Cookie: SID="hello;world"; path=/; domain=.example.com');
+     $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+     $cookies = $this->object->getCookies($this->serviceUrl_1b);
+
+     $this->assertInternalType('array', $cookies);
+     $this->assertEquals('hello;world', $cookies['SID'], "\tNote: The implementation as of Sept 15, 2010 makes the assumption \n\tthat semicolons will not be present in quoted attribute values. \n\tWhile attribute values that contain semicolons are allowed by \n\tRFC2965, they are hopefully rare enough to ignore for our purposes.");
+     $this->assertEquals(1, count($cookies));
+     }
+     */
+
+    /**
+     * Test the inclusion of an equals in a quoted cookie value.
+     *
+     * Note: As of September 12th, the current implementation is known to
+     * fail this test since it explodes values on the equals symbol. This
+     * behavior is not ideal but should be ok for most cases.
+     *
+     * @return void
+     */
+    public function testPublicStoreCookiesQuotedEquals()
+    {
+        $headers = array(
+            'Set-Cookie: SID="hello=world"; path=/; domain=.example.com'
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1b);
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(
+            'hello=world', $cookies['SID'],
+            "\tNote: The implementation as of Sept 15, 2010 makes the assumption \n\tthat equals symbols will not be present in quoted attribute values. \n\tWhile attribute values that contain equals symbols are allowed by \n\tRFC2965, they are hopefully rare enough to ignore for our purposes."
+        );
+        $this->assertEquals(1, count($cookies));
+    }
+
+    /**
+     * Test the inclusion of an escaped quote in a quoted cookie value.
+     *
+     *  @return void
+     */
+    public function testPublicStoreCookiesQuotedEscapedQuote()
+    {
+        $headers = array(
+            'Set-Cookie: SID="hello\"world"; path=/; domain=.example.com'
+        );
+        $this->object->storeCookies($this->serviceUrl_1, $headers);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1b);
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals('hello"world', $cookies['SID']);
+        $this->assertEquals(1, count($cookies));
+    }
+
+    /*********************************************************
+     * Tests of protected (implementation) methods
+     *
+     * Most of these should likely be reworked to test their edge
+     * cases via the two public methods to allow refactoring of the
+     * protected methods without breaking the tests.
+     *********************************************************/
+
+    /**
+     * Test the basic operation of parseCookieHeaders.
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeaders()
+    {
+        $cookies = $this->object->parseCookieHeaders(
+            $this->responseHeaders_1, 'service.example.com'
+        );
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies[0]['value']);
+        $this->assertEquals('/', $cookies[0]['path']);
+        $this->assertEquals('service.example.com', $cookies[0]['domain']);
+        $this->assertFalse($cookies[0]['secure']);
+    }
+
+    /**
+     * Test the addition of a domain to the parsing of cookie headers
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeadersWithDomain()
+    {
+        $headers = array(
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; path=/; domain=.example.com'
+        );
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies[0]['value']);
+        $this->assertEquals('/', $cookies[0]['path']);
+        $this->assertEquals('.example.com', $cookies[0]['domain']);
+        $this->assertFalse($cookies[0]['secure']);
+    }
+
+    /**
+     * Test the addition of a domain to the parsing of cookie headers
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeadersWithHostname()
+    {
+        $headers = array(
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; path=/; domain=service.example.com'
+        );
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies[0]['value']);
+        $this->assertEquals('/', $cookies[0]['path']);
+        $this->assertEquals('service.example.com', $cookies[0]['domain']);
+        $this->assertFalse($cookies[0]['secure']);
+    }
+
+    /**
+     * Test the usage of a hostname that is different from the default URL.
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeadersNonDefaultHostname()
+    {
+        $headers = array(
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; path=/; domain=service2.example.com'
+        );
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies[0]['value']);
+        $this->assertEquals('/', $cookies[0]['path']);
+        $this->assertEquals('service2.example.com', $cookies[0]['domain']);
+        $this->assertFalse($cookies[0]['secure']);
+    }
+
+    /**
+     * Test the the inclusion of a path in the cookie.
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeadersWithPath()
+    {
+        $headers = array(
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; path=/something/; domain=service2.example.com'
+        );
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies[0]['value']);
+        $this->assertEquals('/something/', $cookies[0]['path']);
+        $this->assertEquals('service2.example.com', $cookies[0]['domain']);
+        $this->assertFalse($cookies[0]['secure']);
+    }
+
+    /**
+     * Test the addition of a 'Secure' parameter
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeadersSecure()
+    {
+        $headers = array(
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; Secure; path=/something/; domain=service2.example.com'
+        );
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies[0]['value']);
+        $this->assertEquals('/something/', $cookies[0]['path']);
+        $this->assertEquals('service2.example.com', $cookies[0]['domain']);
+        $this->assertTrue($cookies[0]['secure']);
+    }
+
+    /**
+     * Test the addition of a 'Secure' parameter that is lower-case
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeadersSecureLC()
+    {
+        $headers = array(
+            'Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; secure; path=/something/; domain=service2.example.com'
+        );
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies[0]['value']);
+        $this->assertEquals('/something/', $cookies[0]['path']);
+        $this->assertEquals('service2.example.com', $cookies[0]['domain']);
+        $this->assertTrue($cookies[0]['secure']);
+    }
+
+    /**
+     * Test the inclusion of a trailing semicolon
+     *
+     * @return void
+     */
+    public function testProtectedParseCookieHeadersTrailingSemicolon()
+    {
+        $headers = array('Set-Cookie: SID="hello world"; path=/;');
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('SID', $cookies[0]['name']);
+        $this->assertEquals('hello world', $cookies[0]['value']);
+        $this->assertEquals('/', $cookies[0]['path']);
+        $this->assertEquals('service.example.com', $cookies[0]['domain']);
+        $this->assertFalse($cookies[0]['secure']);
+    }
+
+    /**
+     * Test setting a single service cookie
+     *
+     * @return void
+     */
+    public function testProtectedSetCookie()
+    {
+        $cookies = $this->object->getCookies($this->serviceUrl_1c);
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+    }
+
+    /**
+     * Test setting a single service cookie
+     *
+     * @return void
+     */
+    public function testProtectedStoreCookieWithDuplicates()
+    {
+        $headers = array('Set-Cookie: SID="hello world"; path=/');
+        $cookiesToSet = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+        $this->object->storeCookie($cookiesToSet[0]);
+
+        $headers = array('Set-Cookie: SID="goodbye world"; path=/');
+        $cookiesToSet = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+        $this->object->storeCookie($cookiesToSet[0]);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1c);
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(1, count($cookies));
+        $this->assertEquals('goodbye world', $cookies['SID']);
+    }
+
+    /**
+     * Test setting two service cookies
+     *
+     * @return void
+     */
+    public function testProtectedStoreCookieTwoCookies()
+    {
+        // Second cookie
+        $headers = array('Set-Cookie: message="hello world"; path=/');
+        $cookiesToSet = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+        $this->object->storeCookie($cookiesToSet[0]);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1c);
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(2, count($cookies));
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+        $this->assertEquals('hello world', $cookies['message']);
+    }
+
+    /**
+     * Test setting two service cookies
+     *
+     * @return void
+     */
+    public function testProtectedStoreCookieTwoCookiesOneAtDomain()
+    {
+
+        // Second cookie
+        $headers = array(
+            'Set-Cookie: message="hello world"; path=/; domain=.example.com'
+        );
+        $cookiesToSet = $this->object
+            ->parseCookieHeaders($headers, 'service.example.com');
+        $this->object->storeCookie($cookiesToSet[0]);
+
+        $cookies = $this->object->getCookies($this->serviceUrl_1c);
+        $this->assertInternalType('array', $cookies);
+        $this->assertEquals(2, count($cookies));
+        $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);
+        $this->assertEquals('hello world', $cookies['message']);
+    }
+
+    /**
+     * Test matching a domain cookie.
+     *
+     * @return void
+     */
+    public function testProtectedCookieMatchesTargetDomainCookie()
+    {
+        $headers = array(
+            'Set-Cookie: message="hello world"; path=/; domain=.example.com'
+        );
+        $cookies = $this->object
+            ->parseCookieHeaders($headers, 'otherhost.example.com');
+
+        $this->assertTrue(
+            $this->object->cookieMatchesTarget(
+                $cookies[0],
+                parse_url('http://service.example.com/make_changes.php')
+            )
+        );
+    }
+
+}
+?>
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/MultiRequestTest.php b/vendor/jasig/phpcas/test/CAS/Tests/MultiRequestTest.php
new file mode 100755
index 00000000000..fbf4850140a
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/MultiRequestTest.php
@@ -0,0 +1,164 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/MultiRequestTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of service tickets.
+ *
+ * @class    CAS_Tests_MultiRequestTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_MultiRequestTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+
+        /*********************************************************
+         * Enumerate our responses
+         *********************************************************/
+        $response = new CAS_TestHarness_BasicResponse(
+            'http', 'www.jasig.org', '/some/path'
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody("I am Jasig");
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        $response = new CAS_TestHarness_BasicResponse(
+            'http', 'www.example.org', '/some/other/path'
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody("I am Example");
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        $response = new CAS_TestHarness_BasicResponse(
+            'http', 'www.educause.edu', '/path'
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody("I am Educause");
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+        CAS_TestHarness_DummyRequest::clearResponses();
+    }
+
+    /**
+     * Test a single request
+     *
+     * @return voud
+     */
+    public function testSingle()
+    {
+        $request = new CAS_TestHarness_DummyRequest();
+        $request->setUrl('http://www.example.org/some/other/path');
+        $this->assertTrue($request->send());
+        $this->assertEquals("I am Example", $request->getResponseBody());
+    }
+
+    /**
+     * Test a multiple requests
+     *
+     * @return void
+     */
+    public function testMultiple()
+    {
+        $multi = new CAS_TestHarness_DummyMultiRequest();
+
+        $request1 = new CAS_TestHarness_DummyRequest();
+        $request1->setUrl('http://www.jasig.org/some/path');
+        $multi->addRequest($request1);
+
+        $request2 = new CAS_TestHarness_DummyRequest();
+        $request2->setUrl('http://www.example.org/some/other/path');
+        $multi->addRequest($request2);
+
+        $request3 = new CAS_TestHarness_DummyRequest();
+        $request3->setUrl('http://www.educause.edu/path');
+        $multi->addRequest($request3);
+
+        $multi->send();
+
+        $this->assertEquals("I am Jasig", $request1->getResponseBody());
+        $this->assertEquals("I am Example", $request2->getResponseBody());
+        $this->assertEquals("I am Educause", $request3->getResponseBody());
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/ProxyChainsTest.php b/vendor/jasig/phpcas/test/CAS/Tests/ProxyChainsTest.php
new file mode 100644
index 00000000000..ff97e7064e0
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/ProxyChainsTest.php
@@ -0,0 +1,411 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/MultiRequestTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of the proxy-chains validation system
+ *
+ * @class    CAS_Tests_ProxyChainsTests
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_ProxyChainsTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $this->object = new CAS_ProxyChain_AllowedList;
+        $this->list_size_0 = array();
+        $this->list_size_1 = array('https://service1.example.com/rest',);
+        $this->list_size_2 = array('https://service1.example.com/rest',
+            'http://service2.example.com/my/path',
+        );
+        $this->list_size_3 = array('https://service1.example.com/rest',
+            'http://service2.example.com/my/path',
+            'http://service3.example.com/other/',
+        );
+        $this->list_size_4 = array('https://service1.example.com/rest',
+            'http://service2.example.com/my/path',
+            'http://service3.example.com/other/',
+            'https://service4.example.com/',
+        );
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+
+    }
+
+    /*********************************************************
+     * Tests of public (interface) methods
+     *********************************************************/
+
+    /**
+     * Verify that not configuring any proxies will prevent acccess.
+     *
+     * @return void
+     */
+    public function testNone()
+    {
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should be ok with no proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should prevent proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should prevent proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should prevent proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should prevent proxies in front.'
+        );
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain_Any will work with any URL.
+     *
+     * @return void
+     */
+    public function testAny()
+    {
+        $this->object->allowProxyChain(new CAS_ProxyChain_Any);
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should allow any proxies in front.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should allow any proxies in front.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should allow any proxies in front.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should allow any proxies in front.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should allow any proxies in front.'
+        );
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain will only allow an exact match to
+     * the chain.
+     *
+     * @return void
+     */
+    public function testExactMatch2()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://service1.example.com/rest',
+                    'http://service2.example.com/my/path',
+                )
+            )
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should be ok with no proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_2),
+            'Should allow an exact match in length and URL'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_3),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_4),
+            'Should not allow inexact matches in length.'
+        );
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain will only allow an exact match to
+     * the chain.
+     *
+     * @return void
+     */
+    public function testExactMatch2Failure()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://service1.example.com/rest',
+                    'http://other.example.com/my/path',
+                )
+            )
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should be ok with no proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_2),
+            'Should not allow inexact URL match'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_3),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_4),
+            'Should not allow inexact matches in length.'
+        );
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain_Trusted will allow an exact match or
+     * greater length of chain.
+     *
+     * @return void
+     */
+    public function testTrustedMatch2()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain_Trusted(
+                array('https://service1.example.com/rest',
+                    'http://service2.example.com/my/path',
+                )
+            )
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should be ok with no proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_2),
+            'Should allow an exact match in length and URL'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_3),
+            'Should allow an exact match or greater in length'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_4),
+            'Should allow an exact match or greater in length'
+        );
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain will match strings as prefixes
+     *
+     * @return void
+     */
+    public function testPrefixMatch3()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://service1.example.com/',
+                    'http://service2.example.com/my',
+                    'http://service3.example.com/',
+                )
+            )
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should be ok with no proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_2),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_3),
+            'Should allow an exact match in length and URL'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_4),
+            'Should not allow inexact matches in length.'
+        );
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain will match with Regular expressions
+     *
+     * @return void
+     */
+    public function testRegexMatch2()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain(
+                array('/^https?:\/\/service1\.example\.com\/.*/',
+                    '/^http:\/\/service[0-9]\.example\.com\/[^\/]+\/path/',
+                )
+            )
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should be ok with no proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_2),
+            'Should allow an exact match in length and URL'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_3),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_4),
+            'Should not allow inexact matches in length.'
+        );
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain will match a mixture of with Regular
+     * expressions and plain strings
+     *
+     * @return void
+     */
+    public function testMixedRegexMatch3()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://service1.example.com/',
+                    '/^http:\/\/service[0-9]\.example\.com\/[^\/]+\/path/',
+                    'http://service3.example.com/',
+                )
+            )
+        );
+        $this->assertTrue($this->object->isProxyListAllowed($this->list_size_0));
+        $this->assertFalse($this->object->isProxyListAllowed($this->list_size_1));
+        $this->assertFalse($this->object->isProxyListAllowed($this->list_size_2));
+        $this->assertTrue($this->object->isProxyListAllowed($this->list_size_3));
+        $this->assertFalse($this->object->isProxyListAllowed($this->list_size_4));
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain_Trusted will match a mixture of with
+     * Regular expressions and plain strings
+     *
+     * @return void
+     */
+    public function testMixedRegexTrusted3()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain_Trusted(
+                array('https://service1.example.com/',
+                    '/^http:\/\/service[0-9]\.example\.com\/[^\/]+\/path/',
+                    'http://service3.example.com/',
+                )
+            )
+        );
+        $this->assertTrue($this->object->isProxyListAllowed($this->list_size_0));
+        $this->assertFalse($this->object->isProxyListAllowed($this->list_size_1));
+        $this->assertFalse($this->object->isProxyListAllowed($this->list_size_2));
+        $this->assertTrue($this->object->isProxyListAllowed($this->list_size_3));
+        $this->assertTrue($this->object->isProxyListAllowed($this->list_size_4));
+    }
+
+    /**
+     * Verify that using the CAS_ProxyChain will allow regex modifiers
+     *
+     * @return void
+     */
+    public function testRegexModifiers()
+    {
+        $this->object->allowProxyChain(
+            new CAS_ProxyChain(
+                array('/^https?:\/\/service1\.EXAMPLE\.com\/.*/i',
+                    '/^http:\/\/serVice[0-9]\.example\.com\/[^\/]+\/path/ix',
+                )
+            )
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_0),
+            'Should be ok with no proxies in front.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_1),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertTrue(
+            $this->object->isProxyListAllowed($this->list_size_2),
+            'Should allow modifiers on Regular expressions'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_3),
+            'Should not allow inexact matches in length.'
+        );
+        $this->assertFalse(
+            $this->object->isProxyListAllowed($this->list_size_4),
+            'Should not allow inexact matches in length.'
+        );
+    }
+}
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/ProxyTicketValidationTest.php b/vendor/jasig/phpcas/test/CAS/Tests/ProxyTicketValidationTest.php
new file mode 100755
index 00000000000..6621098c111
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/ProxyTicketValidationTest.php
@@ -0,0 +1,464 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/ProxyTicketValidationTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of service tickets.
+ *
+ * @class    CAS_Tests_ProxyTicketValidationTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_ProxyTicketValidationTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $_SERVER['SERVER_NAME'] = 'www.service.com';
+        $_SERVER['SERVER_PORT'] = '80';
+        $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+        $_SERVER['SERVER_ADMIN'] = 'root@localhost';
+        $_SERVER['REQUEST_URI'] = '/';
+        $_SERVER['SCRIPT_NAME'] = '/index.php';
+        $_SERVER['PHP_SELF'] = '/index.php';
+        $_SESSION = array();
+
+        // 		$_GET['ticket'] = 'ST-123456-asdfasdfasgww2323radf3';
+
+        $this->object = new CAS_Client(
+            CAS_VERSION_2_0, // Server Version
+            false, // Proxy
+            'cas.example.edu', // Server Hostname
+            443, // Server port
+            '/cas/', // Server URI
+            false // Start Session
+        );
+
+        $this->object->setRequestImplementation('CAS_TestHarness_DummyRequest');
+        $this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
+
+        /*********************************************************
+         * Enumerate our responses
+         *********************************************************/
+        // Valid ticket response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxyValidate'
+        );
+        $response->matchQueryParameters(
+            array('service' => 'http://www.service.com/',
+                'ticket' => 'ST-123456-asdfasdfasgww2323radf3',
+            )
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+        <cas:proxies>
+            <cas:proxy>http://firstproxy.com/mysite/test</cas:proxy>
+            <cas:proxy>https://anotherdomain.org/mysite/test2</cas:proxy>
+        </cas:proxies>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        // Invalid ticket response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxyValidate'
+        );
+        $response->matchQueryParameters(
+            array('service' => 'http://www.service.com/',)
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                    'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                    'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                    'Cache-Control: no-cache, no-store',
+                    'Content-Type: text/html;charset=UTF-8',
+                    'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                    'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationFailure code='INVALID_TICKET'>
+        Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized
+    </cas:authenticationFailure>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+        CAS_TestHarness_DummyRequest::clearResponses();
+    }
+
+    /**
+     * Test that a service ticket can be successfully validated.
+     *
+     * @return void
+     */
+    public function testValidationSuccess()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()
+            ->allowProxyChain(new CAS_ProxyChain_Any());
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertTrue($result);
+        $this->assertEquals(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+        <cas:proxies>
+            <cas:proxy>http://firstproxy.com/mysite/test</cas:proxy>
+            <cas:proxy>https://anotherdomain.org/mysite/test2</cas:proxy>
+        </cas:proxies>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+", $text_response
+        );
+        $this->assertInstanceOf('DOMElement', $tree_response);
+    }
+
+    /**
+     * Test that our list of proxies is available
+     *
+     * @return void
+     */
+    public function testValidationSuccessProxyList()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()
+            ->allowProxyChain(new CAS_ProxyChain_Any());
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertTrue($result);
+        $this->assertEquals(
+            array('http://firstproxy.com/mysite/test',
+                'https://anotherdomain.org/mysite/test2'
+            ),
+            $this->object->getProxies(),
+            "The list of proxies in front of the client."
+        );
+    }
+
+    /**
+     * Test that a service ticket can be successfully fails.
+     *
+     * @return void
+     *
+     * @expectedException CAS_AuthenticationException
+     * @outputBuffering enabled
+     */
+    public function testInvalidTicketFailure()
+    {
+        $this->object->setTicket('ST-1856339-aA5Yuvrxzpv8Tau1cYQ7');
+        ob_start();
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        ob_end_clean();
+        $this->assertTrue($result);
+        $this->assertEquals(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationFailure code='INVALID_TICKET'>
+        Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized
+    </cas:authenticationFailure>
+</cas:serviceResponse>
+",
+            $text_response
+        );
+        $this->assertInstanceOf('DOMElement', $tree_response);
+    }
+
+    /**
+     * Test that our list of proxies is not availible on ticket failure.
+     *
+     * @return void
+     */
+    public function testInvalidTicketProxyList()
+    {
+        $this->object->setTicket('ST-1856339-aA5Yuvrxzpv8Tau1cYQ7');
+        ob_start();
+        try {
+            $result = $this->object
+                ->validateCAS20($url, $text_response, $tree_response);
+        } catch (CAS_AuthenticationException $e) {
+        }
+        ob_end_clean();
+        $this->assertEquals(
+            array(), $this->object->getProxies(),
+            "The list of proxies in front of the client."
+        );
+    }
+
+    /**
+     * Test allowed proxies
+     *
+     * @return void
+     */
+    public function testAllowedProxiesStringSuccess()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('http://firstproxy.com',
+                    'https://anotherdomain.org/mysite/test2'
+                )
+            )
+        );
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://anotherdomain.php')
+            )
+        );
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertTrue($result);
+        $this->assertEquals(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+        <cas:proxies>
+            <cas:proxy>http://firstproxy.com/mysite/test</cas:proxy>
+            <cas:proxy>https://anotherdomain.org/mysite/test2</cas:proxy>
+        </cas:proxies>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+",
+            $text_response
+        );
+        $this->assertInstanceOf('DOMElement', $tree_response);
+    }
+    /**
+     * Test that the trusted proxy allows any proxies beyond the one we trust.
+     *
+     * @return void
+     */
+    public function testAllowedProxiesTrustedSuccess()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain_Trusted(
+                array('http://firstproxy.com')
+            )
+        );
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://anotherdomain.php')
+            )
+        );
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertTrue($result);
+        $this->assertEquals(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+        <cas:proxies>
+            <cas:proxy>http://firstproxy.com/mysite/test</cas:proxy>
+            <cas:proxy>https://anotherdomain.org/mysite/test2</cas:proxy>
+        </cas:proxies>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+",
+            $text_response
+        );
+        $this->assertInstanceOf('DOMElement', $tree_response);
+    }
+
+    /**
+     * Test that proxies fail if one is missing from the chain
+     *
+     * @return void
+     *
+     * @expectedException CAS_AuthenticationException
+     * @outputBuffering enabled
+     */
+    public function testAllowedProxiesStringFailureMissingProxy()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://anotherdomain.php')
+            )
+        );
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertFalse($result);
+    }
+
+    /**
+     * Test that proxies fail if in wrong order and definded as string
+     *
+     * @return void
+     *
+     * @expectedException CAS_AuthenticationException
+     * @outputBuffering enabled
+     */
+    public function testAllowedProxiesStringFailureWrongOrder()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://anotherdomain.org/mysite/test2',
+                    'http://firstproxy.com'
+                )
+            )
+        );
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('https://anotherdomain.php')
+            )
+        );
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertFalse($result);
+    }
+
+    /**
+     * Test that if proxies exist a response with proxies will fail unless allowed
+     *
+     * @return void
+     *
+     * @expectedException CAS_AuthenticationException
+     * @outputBuffering enabled
+     */
+    public function testAllowedProxiesFailure()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        // By default no proxies are allowed.
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertFalse($result);
+    }
+
+    /**
+     * Test that regexp filtering of allowed proxies works
+     *
+     * @return void
+     */
+    public function testAllowedProxiesRegexpSuccess()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(array('/badregexp/'))
+        );
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('/http\:\/\/firstproxy\.com.*$/',
+                    '/^https\:\/\/anotherdomain.org\/mysite\/test2$/'
+                )
+            )
+        );
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertTrue($result);
+    }
+
+    /**
+     * Wrong regexp to mach proxies
+     *
+     * @return void
+     *
+     * @expectedException CAS_AuthenticationException
+     * @outputBuffering enabled
+     */
+    public function testAllowedProxiesRegexpFailureWrong()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('/^http:\/\/secondproxy\.com/', '/^https.*$/')
+            )
+        );
+        $result = $this->object->validateCAS20(
+            $url, $text_response, $tree_response
+        );
+        $this->assertFalse($result);
+    }
+
+    /**
+     * Wrong order of valid regexp
+     *
+     * @return void
+     *
+     * @expectedException CAS_AuthenticationException
+     * @outputBuffering enabled
+     */
+    public function testAllowedProxiesRegexpFailureWrongOrder()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $this->object->getAllowedProxyChains()->allowProxyChain(
+            new CAS_ProxyChain(
+                array('/^https\:\/\/anotherdomain.org\/mysite\/test2$/',
+                    '/http\:\/\/firstproxy\.com.*$/'
+                )
+            )
+        );
+        $result = $this->object->validateCAS20(
+            $url, $text_response, $tree_response
+        );
+        $this->assertFalse($result);
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/ServiceMailTest.php b/vendor/jasig/phpcas/test/CAS/Tests/ServiceMailTest.php
new file mode 100755
index 00000000000..a7ba3e425a0
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/ServiceMailTest.php
@@ -0,0 +1,340 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/ServiceMailTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of service tickets.
+ *
+ * @class    CAS_Tests_ServiceMailTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_ServiceMailTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        //     	phpCAS::setDebug(dirname(__FILE__).'/../test.log');
+        // 		error_reporting(E_ALL);
+
+        $_SERVER['SERVER_NAME'] = 'www.clientapp.com';
+        $_SERVER['SERVER_PORT'] = '80';
+        $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+        $_SERVER['SERVER_ADMIN'] = 'root@localhost';
+        $_SERVER['REQUEST_URI'] = '/';
+        $_SERVER['SCRIPT_NAME'] = '/index.php';
+        $_SERVER['PHP_SELF'] = '/index.php';
+        $_SESSION = array();
+
+        $this->object = new CAS_Client(
+            CAS_VERSION_2_0, // Server Version
+            true, // Proxy
+            'cas.example.edu', // Server Hostname
+            443, // Server port
+            '/cas/', // Server URI
+            false // Start Session
+        );
+
+        $this->object->setRequestImplementation('CAS_TestHarness_DummyRequest');
+        $this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
+
+        // Bypass PGT storage since CAS_Client->callback() will exit. Just build
+        // up the session manually so that we are in a state from which we can
+        // attempt to fetch proxy tickets and make proxied requests.
+
+        $_SESSION['phpCAS']['user'] = 'jdoe';
+        $_SESSION['phpCAS']['pgt'] = 'PGT-clientapp-abc123';
+        $_SESSION['phpCAS']['proxies'] = array();
+        $_SESSION['phpCAS']['service_cookies'] = array();
+        $_SESSION['phpCAS']['attributes'] = array();
+
+        // Force Authentication to initialize the client.
+        $this->object->forceAuthentication();
+
+        /*********************************************************
+         * Enumerate our responses
+         *********************************************************/
+
+        /*********************************************************
+         * 1. Valid Proxy ticket and service
+         *********************************************************/
+
+        // Proxy ticket Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxy'
+        );
+        $response->matchQueryParameters(
+            array(
+                'targetService' => 'imap://mail.example.edu/path/to/something',
+                'pgt' => 'PGT-clientapp-abc123',
+                )
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:proxySuccess>
+        <cas:proxyTicket>PT-asdfas-dfasgww2323radf3</cas:proxyTicket>
+    </cas:proxySuccess>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        /*********************************************************
+         * 2. Proxy Ticket Error
+         *********************************************************/
+
+        // Error Proxy ticket Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxy'
+        );
+        $response->matchQueryParameters(
+            array(
+                'targetService' => 'imap://mail.example.edu/path/that/doesnt/exist',
+                'pgt' => 'PGT-clientapp-abc123',
+            )
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:proxyFailure code='INTERNAL_ERROR'>
+        an internal error occurred during ticket validation
+    </cas:proxyFailure>
+</cas:serviceResponse>
+"
+        );
+
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        /*********************************************************
+         * Ensure that IMAP constants are defined even if the IMAP
+         * module is not installed.
+         *********************************************************/
+        if (!defined('OP_READONLY')) {
+            // Not sure what this should actually  be. It is defined as:
+            //  REGISTER_LONG_CONSTANT(
+            //      "OP_READONLY", OP_READONLY, CONST_PERSISTENT | CONST_CS
+            //  );
+            // in http://php-imap.sourcearchive.com/lines/5.1.2-1/php__imap_8c-source.html
+            // For now, just ensure that it is an integer.
+            define('OP_READONLY', 1);
+        }
+
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+        CAS_TestHarness_DummyRequest::clearResponses();
+    }
+
+    /**
+     * Test that we can at least retrieve a proxy-ticket for the service.
+     *
+     * @return void
+     */
+    public function testRetrievePT()
+    {
+        $pt = $this->object->retrievePT(
+            'imap://mail.example.edu/path/to/something', $err_code, $err_msg
+        );
+        $this->assertEquals('PT-asdfas-dfasgww2323radf3', $pt);
+    }
+
+    /**
+     * Test that we can at least retrieve a proxy-ticket for the service.
+     *
+     * @return void
+     */
+    public function testServiceMail()
+    {
+        // Stop here and mark this test as incomplete.
+        $this->markTestIncomplete('This test has not been implemented yet.');
+
+        //      $stream = $this->object->serviceMail(
+        //          'mailbox_name',
+        //          'imap://mail.example.edu/path/to/something',
+        //          OP_READONLY, $err_code, $err_msg, $pt
+        //      );
+        //      $this->assertInternalType('resource', $stream);
+        //      $this->assertEquals(PHPCAS_SERVICE_OK, $err_code);
+        //      $this->assertEquals('', $err_msg);
+        //      $this->assertEquals('PT-asdfas-dfasgww2323radf3', $pt);
+    }
+
+    /**
+     * Verify that proxy-ticket Exceptions are caught and converted to error
+     * codes in serviceMail().
+     *
+     * @return void
+     */
+    public function testServiceMailPtError()
+    {
+        $stream = $this->object->serviceMail(
+            'mailbox_name', 'imap://mail.example.edu/path/that/doesnt/exist',
+            OP_READONLY, $err_code, $err_msg, $pt
+        );
+        $this->assertFalse(
+            $stream, "serviceMail() should have returned false on a PT error."
+        );
+        $this->assertEquals(PHPCAS_SERVICE_PT_FAILURE, $err_code);
+        $this->assertStringStartsWith("PT retrieving failed", $err_msg);
+        $this->assertFalse($pt, '$pt should be false.');
+    }
+
+    /**
+     * Verify that proxied-service Exceptions are caught and converted to error
+     * codes in serviceMail().
+     *
+     * @return void
+     */
+    public function testServiceMailServiceError()
+    {
+        // Stop here and mark this test as incomplete.
+        $this->markTestIncomplete('This test has not been implemented yet.');
+
+        //      $stream = $this->object->serviceMail(
+        //          'mailbox_name', 'ssh://me.example.net', OP_READONLY,
+        //          $err_code, $err_msg, $pt
+        //      );
+        //      $this->assertFalse(
+        //          $stream,
+        //          "serviceMail() should have returned false on a service error."
+        //      );
+        //      $this->assertEquals(PHPCAS_SERVICE_NOT_AVAILABLE, $err_code);
+        //      $this->assertStringStartsWith("The service", $err_msg);
+        //      $this->assertFalse($pt, '$pt should be false.');
+    }
+
+    /**
+     * Direct usage of the Proxied Imap service.
+     *
+     * @return void
+     */
+    public function testImap()
+    {
+        // Stop here and mark this test as incomplete.
+        $this->markTestIncomplete('This test has not been implemented yet.');
+
+        //     	$service = $this->object->getProxiedService(
+        //          PHPCAS_PROXIED_SERVICE_IMAP
+        //      );
+        //     	$service->setServiceUrl('imap://mail.example.edu/path/to/something');
+        //     	$service->setMailbox('mailbox_name');
+        //     	$service->setOptions(OP_READONLY);
+        //     	$stream = $service->open();
+        //     	$this->assertInternalType('resource', $stream);
+        //     	$this->assertInternalType('resource', $service->getStream());
+        //     	$this->assertEquals(
+        //          'PT-asdfas-dfasgww2323radf3', $service->getImapProxyTicket()
+        //      );
+
+    }
+
+    /**
+     * Verify that a CAS_ProxyTicketException is thrown if we try to access a service
+     * that results in a proxy-ticket failure.
+     *
+     * @return void
+     *
+     * @expectedException CAS_ProxyTicketException
+     */
+    public function testPtException()
+    {
+        $service = $this->object->getProxiedService(PHPCAS_PROXIED_SERVICE_IMAP);
+        $service->setServiceUrl(
+            'imap://mail.example.edu/path/that/doesnt/exist'
+        );
+        $service->setMailbox('mailbox_name');
+        $service->setOptions(OP_READONLY);
+        $stream = $service->open();
+    }
+
+    /**
+     * Verify that sending fails if we try to access a service
+     * that has a valid proxy ticket, but where the service has a sending error.
+     *
+     * @return void
+     *
+     * @expectedException CAS_ProxiedService_Exception
+     */
+    public function testHttpGetServiceFailure()
+    {
+        // Stop here and mark this test as incomplete.
+        $this->markTestIncomplete('This test has not been implemented yet.');
+
+        //     	$service = $this->object->getProxiedService(
+        //          PHPCAS_PROXIED_SERVICE_IMAP
+        //      );
+        //     	$service->setServiceUrl('ssh://me.example.net');
+        //     	$service->setMailbox('mailbox_name');
+        //     	$service->setOptions(OP_READONLY);
+        //     	$stream = $service->open();
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/ServiceTicketValidationTest.php b/vendor/jasig/phpcas/test/CAS/Tests/ServiceTicketValidationTest.php
new file mode 100755
index 00000000000..95aeb51757c
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/ServiceTicketValidationTest.php
@@ -0,0 +1,205 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/ServiceTicketValidationTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of service tickets.
+ *
+ * @class    CAS_Tests_ServiceTicketValidationTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_ServiceTicketValidationTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $_SERVER['SERVER_NAME'] = 'www.service.com';
+        $_SERVER['SERVER_PORT'] = '80';
+        $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+        $_SERVER['SERVER_ADMIN'] = 'root@localhost';
+        $_SERVER['REQUEST_URI'] = '/';
+        $_SERVER['SCRIPT_NAME'] = '/index.php';
+        $_SERVER['PHP_SELF'] = '/index.php';
+        $_SESSION = array();
+
+        // 		$_GET['ticket'] = 'ST-123456-asdfasdfasgww2323radf3';
+
+        $this->object = new CAS_Client(
+            CAS_VERSION_2_0, // Server Version
+            false, // Proxy
+            'cas.example.edu', // Server Hostname
+            443, // Server port
+            '/cas/', // Server URI
+            false // Start Session
+        );
+
+        $this->object->setRequestImplementation('CAS_TestHarness_DummyRequest');
+        $this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
+
+        /*********************************************************
+         * Enumerate our responses
+         *********************************************************/
+        // Valid ticket response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/serviceValidate'
+        );
+        $response->matchQueryParameters(
+            array('service' => 'http://www.service.com/',
+                'ticket' => 'ST-123456-asdfasdfasgww2323radf3',
+            )
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+             )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+            <cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        // Invalid ticket response
+        $response = new CAS_TestHarness_BasicResponse(
+        	'https', 'cas.example.edu', '/cas/serviceValidate'
+        );
+        $response->matchQueryParameters(
+            array('service' => 'http://www.service.com/',)
+        );
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationFailure code='INVALID_TICKET'>
+        Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized
+    </cas:authenticationFailure>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+        CAS_TestHarness_DummyRequest::clearResponses();
+    }
+
+    /**
+     * Test that a service ticket can be successfully validated.
+     *
+     * @return void
+     */
+    public function testValidationSuccess()
+    {
+        $this->object->setTicket('ST-123456-asdfasdfasgww2323radf3');
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        $this->assertTrue($result);
+        $this->assertEquals(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationSuccess>
+        <cas:user>jsmith</cas:user>
+            <cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
+    </cas:authenticationSuccess>
+</cas:serviceResponse>
+",
+            $text_response
+        );
+        $this->assertInstanceOf('DOMElement', $tree_response);
+    }
+
+    /**
+     * Test that a service ticket can be successfully fails.
+     *
+     * @return void
+     *
+     * @expectedException CAS_AuthenticationException
+     * @outputBuffering enabled
+     */
+    public function testInvalidTicketFailure()
+    {
+        $this->object->setTicket('ST-1856339-aA5Yuvrxzpv8Tau1cYQ7');
+        ob_start();
+        $result = $this->object
+            ->validateCAS20($url, $text_response, $tree_response);
+        ob_end_clean();
+        $this->assertTrue($result);
+        $this->assertEquals(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:authenticationFailure code='INVALID_TICKET'>
+        Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized
+    </cas:authenticationFailure>
+</cas:serviceResponse>
+",
+            $text_response
+        );
+        $this->assertInstanceOf('DOMElement', $tree_response);
+    }
+
+}
+?>
diff --git a/vendor/jasig/phpcas/test/CAS/Tests/ServiceWebTest.php b/vendor/jasig/phpcas/test/CAS/Tests/ServiceWebTest.php
new file mode 100755
index 00000000000..9798ee389d7
--- /dev/null
+++ b/vendor/jasig/phpcas/test/CAS/Tests/ServiceWebTest.php
@@ -0,0 +1,521 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     CAS/Tests/ServiceWebTest.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+/**
+ * Test class for verifying the operation of service tickets.
+ *
+ * @class    CAS_Tests_ServiceWebTest
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+class CAS_Tests_ServiceWebTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CAS_Client
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        //     	phpCAS::setDebug(dirname(__FILE__).'/../test.log');
+        // 		error_reporting(E_ALL);
+
+        $_SERVER['SERVER_NAME'] = 'www.clientapp.com';
+        $_SERVER['SERVER_PORT'] = '80';
+        $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
+        $_SERVER['SERVER_ADMIN'] = 'root@localhost';
+        $_SERVER['REQUEST_URI'] = '/';
+        $_SERVER['SCRIPT_NAME'] = '/index.php';
+        $_SERVER['PHP_SELF'] = '/index.php';
+        $_SESSION = array();
+
+        $this->object = new CAS_Client(
+            CAS_VERSION_2_0, // Server Version
+            true, // Proxy
+            'cas.example.edu', // Server Hostname
+            443, // Server port
+            '/cas/', // Server URI
+            false // Start Session
+        );
+
+        $this->object->setRequestImplementation('CAS_TestHarness_DummyRequest');
+        $this->object->setCasServerCACert('/path/to/ca_cert.crt', true);
+
+        // Bypass PGT storage since CAS_Client->callback() will exit. Just build
+        // up the session manually so that we are in a state from which we can
+        // attempt to fetch proxy tickets and make proxied requests.
+        $_SESSION['phpCAS']['user'] = 'jdoe';
+        $_SESSION['phpCAS']['pgt'] = 'PGT-clientapp-abc123';
+        $_SESSION['phpCAS']['proxies'] = array();
+        $_SESSION['phpCAS']['service_cookies'] = array();
+        $_SESSION['phpCAS']['attributes'] = array();
+
+        // Force Authentication to initialize the client.
+        $this->object->forceAuthentication();
+
+        /*********************************************************
+         * Enumerate our responses
+         *********************************************************/
+
+        /*********************************************************
+         * 1. Valid Proxy ticket and service
+         *********************************************************/
+
+        // Proxy ticket Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxy'
+        );
+        $response->matchQueryParameters(
+            array(
+                'targetService' => 'http://www.service.com/my_webservice',
+                'pgt' => 'PGT-clientapp-abc123',
+            )
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:proxySuccess>
+        <cas:proxyTicket>PT-asdfas-dfasgww2323radf3</cas:proxyTicket>
+    </cas:proxySuccess>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        // Valid Service Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'http', 'www.service.com', '/my_webservice'
+        );
+        $response->matchQueryParameters(
+            array('ticket' => 'PT-asdfas-dfasgww2323radf3',)
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/plain;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody("Hello from the service.");
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        /*********************************************************
+         * 2. Proxy Ticket Error
+         *********************************************************/
+
+        // Error Proxy ticket Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxy'
+        );
+        $response->matchQueryParameters(
+            array(
+                'targetService' => 'http://www.service.com/my_other_webservice',
+                'pgt' => 'PGT-clientapp-abc123',
+            )
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:proxyFailure code='INTERNAL_ERROR'>
+        an internal error occurred during ticket validation
+    </cas:proxyFailure>
+</cas:serviceResponse>
+"
+        );
+
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        /*********************************************************
+         * 3. Server that doesn't respond/exist (sending failure)
+         *********************************************************/
+
+        // Proxy ticket Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxy'
+        );
+        $response->matchQueryParameters(
+            array('targetService' => 'ssh://me.example.net',
+                'pgt' => 'PGT-clientapp-abc123',
+            )
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:proxySuccess>
+        <cas:proxyTicket>PT-ssh-1234abce</cas:proxyTicket>
+    </cas:proxySuccess>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        /*********************************************************
+         * 4. Service With Error status.
+         *********************************************************/
+
+        // Proxy ticket Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxy'
+        );
+        $response->matchQueryParameters(
+            array(
+                'targetService' => 'http://www.service.com/my_webservice_that_has_problems',
+                'pgt' => 'PGT-clientapp-abc123',
+            )
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:proxySuccess>
+        <cas:proxyTicket>PT-12345-abscasdfasdf</cas:proxyTicket>
+    </cas:proxySuccess>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        // Service Error Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'http', 'www.service.com', '/my_webservice_that_has_problems'
+        );
+        $response->matchQueryParameters(
+            array('ticket' => 'PT-12345-abscasdfasdf',)
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 500 INTERNAL SERVER ERROR',
+                'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/plain;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody("Problems have Occurred.");
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        /*********************************************************
+         * 5. Valid Proxy ticket and POST service
+         *********************************************************/
+
+        // Proxy ticket Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'https', 'cas.example.edu', '/cas/proxy'
+        );
+        $response->matchQueryParameters(
+            array(
+                'targetService' => 'http://www.service.com/post_webservice',
+                'pgt' => 'PGT-clientapp-abc123',
+            )
+        );
+        $response->ensureIsGet();
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/html;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
+    <cas:proxySuccess>
+        <cas:proxyTicket>PT-posting-dfasgww2323radf3</cas:proxyTicket>
+    </cas:proxySuccess>
+</cas:serviceResponse>
+"
+        );
+        $response->ensureCaCertPathEquals('/path/to/ca_cert.crt');
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+        // Valid Service Response
+        $response = new CAS_TestHarness_BasicResponse(
+            'http', 'www.service.com', '/post_webservice'
+        );
+        $response->matchQueryParameters(
+            array('ticket' => 'PT-posting-dfasgww2323radf3',)
+        );
+        $response->ensureIsPost();
+        $response->ensurePostBodyEquals(
+            '<request><method>doSomething</method><param type="string">with this</param></request>'
+        );
+        $response->ensureHasHeader(
+            'Content-Length: '
+            . strlen(
+                '<request><method>doSomething</method><param type="string">with this</param></request>'
+            )
+        );
+        $response->ensureHasHeader('Content-Type: text/xml');
+        $response->setResponseHeaders(
+            array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',
+                'Server: Apache-Coyote/1.1', 'Pragma: no-cache',
+                'Expires: Thu, 01 Jan 1970 00:00:00 GMT',
+                'Cache-Control: no-cache, no-store',
+                'Content-Type: text/xml;charset=UTF-8',
+                'Content-Language: en-US', 'Via: 1.1 cas.example.edu',
+                'Connection: close', 'Transfer-Encoding: chunked',
+            )
+        );
+        $response->setResponseBody(
+            "<result><string>Yay, it worked.</string></result>"
+        );
+        CAS_TestHarness_DummyRequest::addResponse($response);
+
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+        CAS_TestHarness_DummyRequest::clearResponses();
+    }
+
+    /**
+     * Test that we can at least retrieve a proxy-ticket for the service.
+     *
+     * @return void
+     */
+    public function testRetrievePT()
+    {
+        $pt = $this->object->retrievePT(
+            'http://www.service.com/my_webservice', $err_code, $err_msg
+        );
+        $this->assertEquals('PT-asdfas-dfasgww2323radf3', $pt);
+    }
+
+    /**
+     * Test that we can at least retrieve a proxy-ticket for the service.
+     *
+     * @return void
+     */
+    public function testServiceWeb()
+    {
+        $result = $this->object->serviceWeb(
+            'http://www.service.com/my_webservice', $err_code, $output
+        );
+        $this->assertTrue($result, $output);
+        $this->assertEquals(PHPCAS_SERVICE_OK, $err_code);
+        $this->assertEquals("Hello from the service.", $output);
+    }
+
+    /**
+     * Verify that proxy-ticket Exceptions are caught and converted to error
+     * codes in serviceWeb().
+     *
+     * @return void
+     */
+    public function testServiceWebPtError()
+    {
+        $result = $this->object->serviceWeb(
+            'http://www.service.com/my_other_webservice', $err_code, $output
+        );
+        $this->assertFalse(
+            $result,
+            "serviceWeb() should have returned false on a PT error."
+        );
+        $this->assertEquals(PHPCAS_SERVICE_PT_FAILURE, $err_code);
+        $this->assertStringStartsWith("PT retrieving failed", $output);
+    }
+
+    /**
+     * Verify that proxied-service Exceptions are caught and converted to error
+     * codes in serviceWeb().
+     *
+     * @return void
+     */
+    public function testServiceWebServiceError()
+    {
+        $result = $this->object->serviceWeb(
+            'ssh://me.example.net', $err_code, $output
+        );
+        $this->assertFalse(
+            $result,
+            "serviceWeb() should have returned false on a service error."
+        );
+        $this->assertEquals(PHPCAS_SERVICE_NOT_AVAILABLE, $err_code);
+        $this->assertStringStartsWith("The service", $output);
+    }
+
+    /**
+     * Direct usage of the Proxied GET service.
+     *
+     * @return void
+     */
+    public function testHttpGet()
+    {
+        $service = $this->object
+            ->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
+        $service->setUrl('http://www.service.com/my_webservice');
+        $service->send();
+        $this->assertEquals(200, $service->getResponseStatusCode());
+        $this->assertEquals(
+            "Hello from the service.", $service->getResponseBody()
+        );
+    }
+
+    /**
+     * Verify that a CAS_ProxyTicketException is thrown if we try to access a service
+     * that results in a proxy-ticket failure.
+     *
+     * @return void
+     *
+     * @expectedException CAS_ProxyTicketException
+     */
+    public function testPtException()
+    {
+        $service = $this->object
+            ->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
+        $service->setUrl('http://www.service.com/my_other_webservice');
+        $this->assertFalse($service->send(), 'Sending should have failed');
+    }
+
+    /**
+     * Verify that sending fails if we try to access a service
+     * that has a valid proxy ticket, but where the service has a sending error.
+     *
+     * @return void
+     *
+     * @expectedException CAS_ProxiedService_Exception
+     */
+    public function testHttpGetServiceFailure()
+    {
+        $service = $this->object
+            ->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
+        $service->setUrl('ssh://me.example.net');
+        $service->send();
+    }
+
+    /**
+     * Verify that sending fails if we try to access a service
+     * that has a valid proxy ticket, but where the service sends an HTTP error
+     * status.
+     *
+     * @return void
+     */
+    public function testHttpGetService500Error()
+    {
+        $service = $this->object
+            ->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
+        $service
+            ->setUrl('http://www.service.com/my_webservice_that_has_problems');
+        $service->send();
+        $this->assertEquals(500, $service->getResponseStatusCode());
+        $this->assertEquals(
+            "Problems have Occurred.", $service->getResponseBody()
+        );
+    }
+
+    /**
+     * Direct usage of the Proxied POST service.
+     *
+     * @return void
+     */
+    public function testHttpPost()
+    {
+        $service = $this->object
+            ->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_POST);
+        $service->setUrl('http://www.service.com/post_webservice');
+        $service->setBody(
+            '<request><method>doSomething</method><param type="string">with this</param></request>'
+        );
+        $service->setContentType('text/xml');
+        $service->send();
+        $this->assertEquals(200, $service->getResponseStatusCode());
+        $this->assertEquals(
+            "<result><string>Yay, it worked.</string></result>",
+            $service->getResponseBody()
+        );
+    }
+}
+?>
diff --git a/vendor/jasig/phpcas/test/README.txt b/vendor/jasig/phpcas/test/README.txt
new file mode 100755
index 00000000000..d193398b49d
--- /dev/null
+++ b/vendor/jasig/phpcas/test/README.txt
@@ -0,0 +1,42 @@
+**************************
+* Unit Tests for phpCAS
+**************************
+
+These unit tests currently only cover a small portion of the operation of phpCAS.
+
+
+**************************
+* Running tests
+**************************
+1. Install PHPUnit using instructions on this page:
+	http://pear.phpunit.de/
+
+2. cd to the phpcas/test/ directory.
+
+3. Run the following command:
+	phpunit TestSuite.php
+
+
+
+**************************
+* Creating tests
+**************************
+Any files you place in phpcas/test/tests/ whose name ends with 'Test.php' will
+be added as a test file.
+
+A template test file can be created via the following:
+1. Create the skeleton.
+	phpunit --skeleton-test  CAS_Client source/CAS/Client.php
+
+2. Move the skeleton to our tests/ directory.
+	mv source/CAS/CAS_ClientTest.php test/tests/ClientTest.php
+
+Notes:
+
+You may want to clear the session in the setUp() method of the test so that each
+test has a clean state to start from.
+
+If you want to test methods that require authentication, then we need a real CAS
+server to be configured for testing. Alternatively, a dummy 'CAS server' might be
+implemented with static XML documents or simple PHP scripts that given certain
+parameters always return the same content.
\ No newline at end of file
diff --git a/vendor/jasig/phpcas/test/TestSuite.php b/vendor/jasig/phpcas/test/TestSuite.php
new file mode 100755
index 00000000000..f0b78a05fdc
--- /dev/null
+++ b/vendor/jasig/phpcas/test/TestSuite.php
@@ -0,0 +1,102 @@
+<?php
+
+/**
+ * Licensed to Jasig under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * Jasig licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP Version 5
+ *
+ * @file     TestSuite.php
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+ob_start();
+require_once dirname(__FILE__) . '/../source/CAS.php';
+
+/**
+ * Suite of all tests
+ *
+ * @class    TestSuite
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Adam Franco <afranco@middlebury.edu>
+ * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ */
+
+class TestSuite extends PHPUnit_Framework_TestSuite
+{
+    /**
+     * Create a new testsuite
+     *
+     * @return PhpcasTestSuite
+     */
+    public static function suite()
+    {
+        $suite = new TestSuite('phpCAS Test Suite');
+
+        self::recursiveAddTests($suite, dirname(__FILE__) . '/CAS/Tests');
+        return $suite;
+    }
+
+    /**
+    * Empty function
+    *
+    * @return void
+    */
+    protected function setUp()
+    {
+
+    }
+
+    /**
+     * Empty function
+     *
+     * @return void
+     */
+    protected function tearDown()
+    {
+
+    }
+
+    /**
+     * Recursively add test files in subdirectories
+     *
+     * @param PHPUnit_Framework_TestSuite $suite a test suite class
+     * @param string                      $dir   dir from which to add tests
+     *
+     * @return void
+     *
+     * @access protected
+     */
+    protected static function recursiveAddTests(
+        PHPUnit_Framework_TestSuite $suite, $dir
+    ) {
+        foreach (scandir($dir) as $file) {
+            if (preg_match('/Test\.php$/', $file)) {
+                $suite->addTestFile($dir . '/' . $file);
+            } else if (is_dir($dir . '/' . $file)
+                && preg_match('/^[a-z0-9]+/i', $file)
+            ) {
+                self::recursiveAddTests($suite, $dir . '/' . $file);
+            }
+        }
+    }
+}
diff --git a/vendor/jasig/phpcas/utils/Doxyfile b/vendor/jasig/phpcas/utils/Doxyfile
new file mode 100644
index 00000000000..0d778057397
--- /dev/null
+++ b/vendor/jasig/phpcas/utils/Doxyfile
@@ -0,0 +1,209 @@
+# Doxyfile 1.3.6
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = phpCAS
+PROJECT_NUMBER         = "version ${phpcas.version}"
+OUTPUT_DIRECTORY       = ${basedir}/tmp/CAS-${phpcas.version}/docs
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = YES
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = 
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = ${basedir}/tmp/CAS-${phpcas.version}
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = NO
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = ${basedir}/tmp/CAS-${phpcas.version}
+FILE_PATTERNS          = "*.php"
+RECURSIVE              = YES
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = ${basedir}/tmp/CAS-${phpcas.version}/docs/examples
+EXAMPLE_PATTERNS       = 
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = YES
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = api
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+GRAPHICAL_HIERARCHY    = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 0
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
diff --git a/vendor/jasig/phpcas/utils/ant_doxygen.jar b/vendor/jasig/phpcas/utils/ant_doxygen.jar
new file mode 100644
index 0000000000000000000000000000000000000000..82e24ceee628b58b4f6418e76d8916574b3deeb1
GIT binary patch
literal 11519
zcma)i1yohr_C6vA96;d!(%p!3OAAPMcOAOByE&wEw{#;Z-KBI(96F>!@{jM{`@GlZ
zd%yo4W5*bKesiro*V=2%_+%xX!T_Lt99^h<4F7ug^Mderml9SKcr7L^LNEKL7(7(x
zqgW%dn6u{NYqQ4_{qJH@0@7k4!U~FXQX;2P!$Xo1uj$5+C0^5v4u7tZXP9JO*{~aa
z3$&#bl^hjSf(m;=KEgjfDqIvwUPRp_9Zz&l;U;qYthY(*nFs)<Bi|L!nmi!<y(hkh
zyr{7Ukl{MumeQixq6zg^Z=j%5sd@j=X_&{}Slb!@yTAV_f%K<@p|y*vG05s~lAnGt
z0Pq({2Wx8!`@hL2hyQ2WHs*}~rv%gAB%;9o)B*e0rUS^{;eUwy7?*#E{PR11)r9(Y
zvH$$oU&S$hC;rbbhKFi@>@6;ASPIV*D5&Yj6Xg+PV4-JkuV`Wi0@3~JQ7d{#x|1J0
z=pj2WhD-hkn&vBJnAR8mMZLwO29j!@qy`H;XyI)vx@%1e=uiq?pBEtR2@2h`p5zA)
z<}E(s&6_O<B0skA%W1il*}7<cVq`>jyqlM?w(^s^{F(T6c(!=VNrQ(fSWM?zAHo(0
zTp+fjadk;52HFv>drGJ>T5x&{jd~2?i7y-ulpV?ZwO$Ci^5I|GO`hC7LFJ8mpRudS
zs4B&ZU$>!^RfVr{E+U_B^EI3@S~ybR_JEG4617Un*cZvd7i}Fz+A*+>Nx$FhmGerV
zR{iQF$h~@BMg|RkN|6h((<(6R9MiWIstNgwWG{q)2dPJD(2PO!iLmjLO%Iae1|LR$
zF(xr4)~DXN20>;0?O92IV#yKQV+Z*$63uMY>CQ)-(<aPYq7U@EaDA{lz_E0bl-qxg
zIy}^m$*7_O5lM%Kf+~5mGx?*be+>9vBl*YB2>mgM-&$K4nHv9L{|FTX7hDz8`^?v_
zGvi!U@p+*p;~Y{cv(<PX;G*ZniVP~y@)OnvtMTE&W>wAKg_g38bJ+s2S6c_=r~+$I
z;L&64rt@QLk)$|M1byrhY61lt2R#V`*@pMaE#?w#dhTyG4~AP@nIDE*E<Ns(Ctg6!
zQh5-VaL}$|5X7z8kZb#Ckl`J-TY9(1_m*%A>AZ%pGHDM@%nZ1E0<-tK<bv4;Tx!4?
zpcdiY$BR_&0%(x}g3t7o8senvjfvaZ<^Qrpqtl(c0Vx=S2Xdo);p~di?ha~+;)@(`
zX#>AF3WIQa$aXH#@(p(df4YK~t{iyJy-2#63*=P}eX$B5&<vGvsYJ+JSIRtD(+0cS
z67r68-2qRuHN!uPCK<Y^_r`%gS6^?DaTBeA!8J_0hXSu!+ZXA@uVUfw!Grz;`?^E;
z9F!2^f<D))YH&qA2R)>Osg(k<H|(AiY<+YjMc*1|eR_nCy$p&XSY373_8^4d4ZLu<
zA`U)<e*pn{k*)SYhfBV$Z<}JNDdNd3$UsvaZ<KkH#Tt=P<e<P^vZrU6C!EEVyCun^
zR;sF%H=8_|oTpSp9xs+WgAg|}bqQ#g2j|hPjO-YxOk<7JY!dq-J6<%^CSaTGQrIVF
zCw#}#_7X!F`6B4IL|ceGK5~`jk}x%u2sT035!r;@NX<V8$dBHwjrHM10|N&Q&nz_5
zhc;Z!6M&IZ&Ny?~1$m54CZeBNl7nJKS?d;b_II2780Y&wkiWOr1ez2!t3Cz$9O|-x
zb|V```jHBPu>8iMW(*x)bH1xrbQ6Et;J`nGY%<W8iV@2!(cG%iK_sfqEK{KS;#pye
z5zMD+A5%jNGJ#ckGZjc#_UJbub8gfqCu&jR*RoTnyNYO9WycLT;SLI`uxux83Ey&A
z7p6jR%p*!drE#3(dYx)7ibF3<(xB#1%~a5MVlGTHNJ@k1ix|~gsnB<jgeQfZYbmD-
zfL-`u4(HKMu5=QuQ<4keeTsGLc^7hLW92SXc=KfxIXt%GQu`JMmiY{66&JFSmf`OV
z?hHvyqmeHoc!=X^m4R)P)A+kerW)>T-5*tJD>NbyT-Mg(n@UPp$IDmp88EoR`p|D-
z_{cT43P20nD_I#BD2cCJ@c0yt?76d7FtN~}?7hS^F6|jWF@=6Qt1|#Ee@gOOW!<|T
zr8vK3J;}~Pj9Xt7!p;$Zc2J_ip=xU$xPZ>Co6On4QdL*jcOgc6Z%oeKa1xdJiuAr4
zmZ7&R6XO=vJN}3r*1M07>{g+p?Z_JTp+f<9ufbrY1RdYU#cE(wG_m+n>4=Y8i7J7F
z7M*+KwtBEE;9Z%YF;<`{{aZOl3w}aI1rZV5*L~#?CQscRDIH!Luvy|t<-ZqJ$8}?x
z&#2Wl$EnLD6&sl}$M-RVE9I)d&%;VJ*AZP<>K4$Fg?B7I%x4~bLsf94tE!D8MaAq7
zM#%vW&RJ!QmG(Bj%E6P7XDA>h;#AAg6ao9^VTXUq>l7DqYj7wEXfk3%Uj<t2Ld#{t
zi}lAADh33%V`v9$g(YV-oMOU@p@tR8cav190;j?XSBu?nWZ+A+E6o6(bm9`XGdw4I
z*V%e#DjTm9tAt;la-N^61@P0npX|%=cSxTM+<iN_H{TzUAqIfK<SpK;L%@!e>e`e|
z*xlT#dZwlLN!=|jGF`&7B2dZ|fl)yMWXHZ8yopy4DC?xK?O-We5g(fXaG0uLBYz_B
zRk&7<7tMHCwiZnbZ(T`)WgK-rW2GkMd6PWqHNJ5nFdTQX3E43HO=+rUd9ouSFg!td
zL_eBqiCM8iBq8cn|2(>D3(=A{ac#C_gXB8N^b-)CLZ$aQDgC{vVzE*Bvp7%aDM2lQ
z6zK$(&OX_c6tbiJsPL<=rMA%;?SNUHXg0gr#dtOrKkFVOHeq}-Q)R<*JqQ#ZC@3tG
zX^*}bN@Fwbq0>4;{<!&KFW4@vK|f?_c)QYy@MT_gX&%2W;}d+g>ZX+GVCs6qo*~&c
znTA}6O=|Vk?OKjLRl|%(J#Xr;cUU;}t!r!1Ggk<!5z)-ILrcdH+rVBs^7Tdzp=jrV
zM|Uz1?dv9t4VI^oFcd`43RHWU{NJe?Om+)Qd#FX9WbO~<GOe6mwYX9}(NStVZ|tWC
zx74eXGV|b-Fb=(IoTM1?NK{?ixYz=uURj>tQ9xEQalBYKG8|)#t#W4Ia84RnfDMG@
zLA~6{7qF>XUMh~31SNytdO->e;9Jdu+(T9in+Vn+$cd2(sdq(sRm*af2eO(IYFVmz
zW0kH2ezIzEABLe(LSU^y_Q0{_fhJ<>`AB)Zv*3wkQu7@H)94yb4pL)k;?iCSGB^%J
z0+x}7AMe;m+>moD3tnSkQ_dMZJl*t84W_drSe7Rc3U(ajIglBvwhSJ;=3@W~RKhyr
zSe3$|7*h>u_4@$FXk;FPY30@m6*aDHXktLdFTf_Hr|^JYzTfsjMQUXiK@*MQn>{D>
zdzTFUnuWuR?o-%E{b=J<*wMB5O@Ma~S&Hk|aoS^#aGpf`;XB}#RmuBi@iq@DuKIiN
zms))Y35X{|%sMt}o%octQwSE8PEy%*ZPBfkc~kA?^A?V6=FkVmDLj;NtCwk}7tcOt
zGbIJnbY8mjA&k&020|J#wi&raj|uu*!<lf-#_br~lfnx8woN}sbSi8UHSq|7YI583
zptHH1*siVmb5E(JHQw9k<kIWEFO+Jss2-(YS8p1^^<*^vn*MHaGnOHW0Cz$=$d2{%
zwMGA;KwI<J;m0$Ti}Z%0Sp<tD<o5DdC|Ue3%~18LPGRu|xo~-C3#cE+CF%0GucKDY
z+&{Vl&nf|M>ELnz7Xq?S!-|fOH~XA4_h>vzC?;a3&3hgh&BadJ4_x*v*M&4s&*(j0
z#-CMOQ%fo;-V^@ixc}kbR3vQ=Z#{av>yH5l#sBheWbLdCK=$^3IylPTozaxg?+c`u
zCmd!45n*7o=k{ZT<@gm|W}_E<tQ{AmE@Y6>j?EsBOmp4wYhDYwp=+>-Y&$B+Vl#_c
zlW~iD2!HT%SvHJ)Muq1l{Vmn?u=UXMviWjphwtI;0?vnnF8GT-B@6c)nCzJ%QV>e?
z;X8GPfK?PJ-uyKa_z|oaBgLL76o(yK%}4_rX%nm&8~HA3&g0rJV?mRykT7G`w1g;Q
z7AzbJGF@?Dby$@cxtMs$O+j6tE9o!_+e&GW7_ut@3&|ZKacOXVM?$!;X@<gTp^Z`q
z3ee6NFCRreDb`562OOk^yd~&DK+ggZZpm8(VN?{lC<#c+XC#l<na`qd!mj$(^v1>X
z<0`W;lHg4YUQn6vayaPUo|!DKRQj!0O)&Ln!$#nz_hG=e9k8fWPHwE}@<?m+9q^Cq
z$ZWWnop3m7PJCQ1=|b*sw|r$_gi(8fok4@}?XA*>#H8ss9<_9(${sj+1m;XE2CcD)
zMl4H9XPU#9sj3%I)UtP?j{Cg?u&*!~F5W~kzVfA-R<$VZl<qO-((ZG`kAhS}8@-te
zh>Aw}nC^_mOU#GkDqa!EepKM6R6ousJ80ODtDD&t{5>_vG=E=k3}sU&qi@b+)FGK+
zQA`9<YXA@^$6nCmr7VEFZYj%R9_>8<+H=w~=+&e#_9S<V7jOq?<ZOQJK;H+YJA}Og
zdt`jTmKvQW4{od}UkT*E9kuV;P=cedOXD<RtA`RuLw+?9z&r#l)l(N5H&UZh%>Zrz
zHf>&XfSiK9cL=Lh`Eh}o3Wx&gXeosllSL(EWcoajA$gSH3jBvFetskJTDc~&u2*X~
z38HvZ$=@B8CBrZSRp@Xr4SD2gByF~$573e1w#K}MnMB2?#ZwS7fJ)L+E^ACuhcqT3
zjpK%nEy0%<v~8?<fRA+IVic4k%vL!S^2Gq4^Cd1FMi|UMM5o?3BYn7TgmaQ9<@01$
zUPWL}Y@y5cY&cKs3f#DdXuVWMEEy~YaF^7h6oTd<Zk_7j5%k&7gSfGxxKk+%{2|JY
z^!4XZMa=86dDN-8sdK#D>5UE@@zeOoa3<zg=0tBDxvUEZ&F1_7wT7<o<R!)~58JC8
zOS!Q_=`N#mvO3Lq5Oa^*H4Xgbfz+A(DX4gzW2+gn*(!xaN9)0nFWqW`)aR+GhkTBt
zr0K2sdx{?JTr%>hj7wkVUpK$CC#lbpqqPgS$qDCNWK)XKV8hW<2`{KK7*n3CgV$Xe
zHW{t@09tb6VOmMqYM9Zzp$@*67U%cOcZqD~diJeI#F~cB+L%;Jx9F|+)`6c~E=w6p
zCidW>K+(N;8>KKJaJ)8Tzc^AMoZTZ{<!~S+P;_^9#9qCzQn5(JS~>Up%m+@#o99!n
z@bYVbuXtWRK4XdQ0uKnRKe4x$AwISt+{GAhkd@xr!gKcBI*ZVgs9$8=F;6a#q>ae%
za$>>kMApP&hvw}Lfc+NSTN3RJc%C)m40!(@2H@m4Gp(|sYk3EK_ZBtJw)n;xrhJr?
zL0e=(mj&+@!|Z8qQx3@F-R2lK!7I`@Bq8V}dy~e1b#8|fO`tYcFo>m&wk1tclD9OP
zf_6ll$=*bYZ6w!{dt9-%cu%F$Lbf$<2E}ImT1kH_07()ca<W@;JTFj+Yr3zQRr^tp
z8b^DJ&tb+EuO!H;@LAPdu&S27s^MEzFU425aWDv_V-0ltk(bmQr*EcTT>BD)vN_!a
z^v1YaU}g4+Tvr{No6s95V5bhv#v+OK71L-?pO`?Ls5?J~!GjhvEzB0NEfAF}+xmo@
zaYGl!eE6z(i$oN6=H_g$af^wxYMFDy!E`#Jtn)9C(n1SKV<;YHMj>DD{_OWGyN%u+
zQ6jG3Z=$--$EsYrLp0L7LIHblgD#ceg8^MKj^N<+WAAL%&2+X+8Lh@+`i+`%IBaZk
zi+5y1%p&q-3JxFy0*YgnvzcPX&3NoD+WBp#nENCR<}O0x?zMu4?`l;X`X2tdRp>yi
zk-dP1g35Xd1x5S6whBc(dvmhK{lW%h=ivIshT$o{U^T&y!jsB!+{;?)m}-OI`%HWw
zqABi;*fsy^lOnU2FdB?*f8tcCvMT=rn4GW|tB5YJp#?xu4=BRGq&kQq3u-k>js2+R
zXzAr;CSe;?sjgNJ_X+iO1I-94hD5_?7402zB=ozO+`Oz(LE(&Ck~^tLjOYFaN+R{>
zi^?`p#9l<#NY|UKbIiy?wHm#VhaV4=;|nuP8Oh8on-3}!RH?o(Nm_CscVyKDw1HZ4
zCj_%OijovM%S|0Y<(L}<h>)Uc>PwM<MQ1_5F3z->N}t*wq;bGEa~B_4>Z7IdFGna*
zq7z>y@PmXVYPpLeEG?N0rDa?eE!hHx7)}=*xjN5p&Q)sd?_}R%u+m&B5{L3|e)8&X
z*EUxbQWi+po3qsr>H0ovjj(Wp-**D0)H~}ud!CTvMRvVj$WvpvYNcARg%G88AvAK4
z>Uli<00)3&lDru$IQ1QrY!s1iIUE=KQ2vUx;-!wf-`oy-bBAoQL#BbO%ab!1yN4w>
zS2u~%vv&Qnu{yX9k}L0ZPpqRq@sHuTitx&DJ-c}Z^F`ROZ~HLB6MsCBV*EH{boC^9
z+W(lPT9H?fcGnBkJri_m=ITSu!^nTaTpL@CM|=<42(^xy1mLH8(~~P5PD;Et`3|6V
zgW!0GHPOV@j$M?T=B1pHj1m&%qsH`fIItM|TddN+o@y6<-aYg`C)PI~&q(FRtl`pQ
zo`v-Pnpl52AWG&6xJp=F&k^>G)J)OfF{&)7;E6TmtuZu&Bml6f^0lI`wRfvI174>t
zHMk3QXq+2wSIE*9kurNtVtdCy+%E)Q<-IiGNWAnMJ^jk={cw6i2t{%1A4E)>#}Fdi
z*g~I(3mC+ie|sziD}gh4WG4}psBi^ESlm#i2TLe+T#UXPQy8VR7@x@6=#jIcfUHI<
zI%0fs)~NYyU=I_3gnXweTUCylNlhP*&cUXrxB*h|&0pd5Z`yBk{1&S9%yZ1PL8Tgb
zd5ib0@y_)4?b^BfY4`?bkmUE)Dob?BuA-OLh@b6>Rj^_U_AD5X;<PH%OB>!aD}6%`
z+?)40R(E-Y+78Ha{LG3?$Bio<nY4I`P-0<ky>!m`RKq}YVx(R(r+5lkuWW(rkm>1H
z*P+cwIZ}bX+6`6xAmSK8Epl`6dO`WXLz^1n?YxnLq!zl6UX{w8FA)1Gw>0)tK7xYv
zy`ql+m+S8|@`Vuxx=>=jvkpX4sO^MIXpx2cvv(ID4MBodWW?o(o_>~`4O_KF?onk*
z<znez7$=FI&d#T18E{aFwn&c^&X?)4WeosfTH`qCAF@d5S!(Fl?*qN9y~<eAxh&@e
zs2y6uW*j7S<=>&Y;$y}b_w!WTa`iHd+T3&E=Nq8I;<FW?Pdaee416dQ<g|aEs=@gl
z0J87Em~`|ArN$>6N0!O(kYsd7^s`X0BL-Rd19IPr-hn4yWYV5;;ml4S^S3U<NFXRS
ze$AarwzROYi7K8vYGiNRneLxfxl-?Azf$gS<{}upEqp(oRTwk03}Nb;dpP&amf4MH
z5+HtO)`i+5%RVd5zEHV8xXSWn5^gR`zR%{Gy3N_M!<<Fl>g^Ykfb)-wYfOQpR8&@z
zh4f7tA*Lt0Cq{6$0tt}bVeTW^jt2#alw1?(s1Rn6{Oaz3&_O+WCh&#~7iu*=MoMVD
z?yMqbT+kAH!R^k4_Ay74dYZ`Uz&>*Q^~+kE%jdb;Thf7gw?g!tB3aIEX`J7M;d|??
zT!L(h#1vP9bdkQ$x1-!8Ib_LP(5KHE?!mp060e*9!@4t$>mWJdOGXlvRZJWJfez4s
zz&_o;Zr*u-1tCHs86uoX+YJ`}jqG;eIAh(51I+$5majySAAKOt4`LxAtEj|;#A8BR
z1ZTsDQVwIR-!ZELdD3FR#6)x5rt`H&NeQ!(ArZAp*)i-pd}5P{{fin&VVa}SjcnL%
zdSLE|C0E=;QqL5p9qDF=jV)16*onT3ONH9wQ)l%FN`t%MY+l?Qh4G~-3OD`!W*2(D
zv~Z&2r-sz#pFr5O0-wP>-!ywH0`Q3qV=wOEn^^?fF)4dfx8GM#Y%7`gjKQs|pA}L9
z<l>_#w8Kod7zl}<g|Z3UBp>s|96V6>J1#_hp_&m|!jLa+@S253^X+SIe{ww#mB?)D
z-PK4jdPw}v+{h<^g6=j<p^Ck$)~wceVEUEl9pcYr=|`45Q)dmM<8iMOeD;5YM#>;N
zdsAzxKUOA3MJ)wf5W3gb{aC4w8h~uEGUShS2|*Sqlf{aN`5pn2vna(dSZAGTv55|h
z`$lZ3VP6NY2n%)aMS@c`w<X26)*Q|{x!fj(?t|_T&RbI9!}ORq58X#IqPDoV_V16k
zqN1LVRppWRDWZI80JfLVl&`T8Yh$h<!;(JHRLEYDT0Kr^&{AOxV~n4~1@!i~Duf`w
zzNfj40qTo~m=cczjL;3Spf4K~m@P|sS8j-gzGP+$NYbqX2uG#A4jLmO?qEL?xqwWp
zLvRwBO%!)ENx(pV`3f%!4)QS2A@fzA<d8!jHc8cDitT4nC8UzH6leSinkb`SOzd^j
z=5B21b;<Cpy}eh9)L5@DstcKMg|!`FpTpK;b!st%z;xt%(q_feu6*%*xUBRz=M9&n
zC~FPd>lV!ki6vHyY~%(f4Fe8r-21i{zA5#4(lN%8F-Am|)*kYk)B369c}Fug&#lc}
z5R5~iv;>s9-h`MpM5G0&tz%2Oo9>mX?c}|lCA1y7jeCP0gMMs}qup+b>>Mq7R33E6
zKtH^NJvt}Nsbr=i)%a1XDE~fO;0oEaAplFx3+qAA(=q-H4nP$}U(P=g=IyfHVByWv
z_kF1o1OszV?cEiz7u47n?*te{85v_+yW&IDt>Voj3fvQ&ayrYZ8={#<C{#--Cb_g@
zRM{5dFD0}noVvMGJ-W`R@_TrW`qk;^5yPHNN=3YP>&8JLX_G4hY6dY^(V5KC0t<xd
zk8&4nGqhXav7`n3WQG&96ESz3gDm8lZWu(p=W&}Zqa!w@u7~n01t<_JQLKG?^0ltc
zq9+4d0!1}ns-y8hnpmh3Q;xPSvS|0R`4KxjxUb(gAu8d-blExJepq{v9kekdh35`q
zX{BKF#+&EC7s#wh<cfha0K`arhk{333Y=x~Z4M7t?ZPO9;8;jzg>k3DP96b-`_a9}
zo^lJxL$$8d!Bg2TEq5OK1B;FCk-RL%FM|?l(T+G_`yGtVbiOnPBHS6DjfzA3p^qSz
zWIdcok}fA2XZ;c0xCHHO{scM(3OQaG;>bD%ZQ8&-?tApb51XxdPOT)-ItokHh4F9=
zk(S^XPrx#91b!HfNQ?i@b3I^YZ8w2i;`vMIVR_Ewm)DR`itAP%l0*IkoD8Q2Ld!P0
z{=F??)W&dL7Sr;mLIbxYuDS3tO+&(^w-0uR*=Y`>^E*zWhqD0$Qf!PU02bToP=<kg
zDMH8ZU=f0QuQt_gjVK+|b~L0F_LNC9@QSmW+nh$}`tm;)fq11S&|;5ewxP%KM=|n8
zaq(X@HW{lwi*3TPS`yH5C_K)NTFzPu5(hV3L=4D1Uvsv};h_iM$U`!w&-KmsthUYC
zUKIuec=7Yma5Z~g*%^IH<1{w<wl#AD=Y!*fv`u9~g(E8quct&=y7Q&7T(3))>=Sj?
z{CzhfOm{s0+VFAOiYAdVZwqRO&J_=Jv?*6cO9oQ2-DFi0-7BNd);Djl7vE^Nb+l%0
zxIp)uXxZyZl{J~W-nqTOis3=_1b^hio;w*ws54!t>xCpxn(I{{pqb+E^5V^q=A5pl
z&I-<Vv&mB+<&k`pdw7pvi1}81$+xz#<s}{DvLSqTu*gAf&6CU9&pD7_Sbvx!yrFx>
zsT;}+^z0aq)hHyiFp1RYK||)s8epLJe8VY7wdOj=CI1@w93wQ)0o!(sE_N1@20WSF
zdd4~JZSma8@{E&Zo-7ry2o+UHJW5qfubk)s`JaXtkUZ5~d^9-jzYWjyhv5~St^ZhQ
zg{7;kI%Sc#--?O@Q}`)AIzcm`bby<PlmrDGsPw%NWGp*L1yEL+xw6FZub_AVQ?5XV
zqk+~p3(k%A8Bfl}s`XZ?B5Al0TLUSw3)Tf_przn9sRm-#;$;smUcwlp(UW(iQY5Dx
z%)~5?3g;zNO;=wHCO-AMi#e>X@{ka3LVZ=WFcRg;hXJ?R+36pSBk9+yhTN4Zek8%8
zNOFU;oU7OitIZMHfy()=u|q5H4R5>ZR#C2TJAxO#FJYSO_i3lpF(cHY@9k*Jqn<@&
z_?i#O3TU6f<@aM(PycC){3L8r9XKc`A!H~hsz;mryY&3qN~Gdr?fMT31uE}&<Emir
z7`&NQO{P^|oE6(s6iZXoHWSDqo}|bUg@_c<HYTk1vI&DXsz~2W7v{?8*RTY>R8Oc@
z5LKa)m=#MGa$1XxtCP*TYlpjsN_cSu(SaIGjiJ?079jlEeAs$3%5(Vj=G*qU_i_V5
z7NK=hwn1;88s=!jm=72?BFWwW-dL-@iQzB^T=QBs1}%0B8uNsS;3eY3NKe}AtNzMv
zP4q5K%+cnt%{2AsDyo-+cJ{}5n7kx$gz?8Asya3X^aL0SglMvam`#1%C$`v`(Z^y{
zUV^>vnRv+|6HL6MkQ%0p*kexY%*10@Y@N7ca%`Q1V+?Ga_~Tk|g=No-tsK(lhNDv4
zzN0iBS8Wa#0VMj5E4Wt$;KXi>R&vOKl?U8%yscR8rJ=`iAYsGNTLg^{5rI8wJc(Zb
z#^j6GjKgZ)Y8&-Pq#8%T#m}As7pn~Q$&y6_J9B~DF`Nf!o1e`Z)w~y(m>bp98%9-6
z=VW{1DwpO)vF@`amA4Yorf5AozM3<JDYu%;Rnw<W0RrhH=vB4OmX$7+K{toRS6k%)
z(~boGYv^(sYvG)GU@Oo#Fa?ge5$vcbm|Nj4DX8!zX_|aL#L&*ImV+-p6~U55VkE)O
ziu}~ja3=+uX>==~IH{^(YIQGi7$bBold;bAu0=279C7O`4?c|2^^+=HGnHPwYQhd|
zgk}d*xarVJpi{;~b+YMK$8MIBCeyKt!q0lzwM=Rcl?jBicugZXwt)$zJS7@U_=U>L
zy&++DMwBkV=ihgsCJ_?3lSUK#*CTO-nadDqW3@52y=;dA38}9bSrESB#1-lxWA`l9
zHbqaLD);K1T_{QA1X-ew8{?5qut>u4b;w|V*Q&ABkT$Nv8RF_DWzda{90(90aej$a
zc`E>E#_XI1bWIH1OVZBLIr4m6EL2#z?48?8^3oOFv~^GksPq|H)tD{pjI8|8lRUEh
zqQv`#!soDzU{MYt;Ia(g9f<GlW9Gdhs^XD=$y)gkKp92F2A>_hbPWTRuS=>mB02>=
zfb>|AC`P<HWR9bJeD}^J#8gfu3MPkm*B|&1Igr%Mj4WF8@i%x@-q<Jo9QB(*?yd<@
zb^!^Vw1i1WZ_?6xUq)7pF!C!dnV`33G}y>JenonYR{>mukcG}MQI6t*wW@U!S<r2#
zT(9ppM2buq4GS_<g6A@YMRp$2u)WYMZbaD1rjwnz<nJJ>j0B6{i1MVty#(Nr9BhVF
zbw+bn)^O}J8ug~cv~TB4HWD2rSB-u;D~Vta%L0sBaf|Y`A4Sd?^xK#0npf$5Gso@-
z2Lov?RoX*GTrWD_bom`ihvi)P!|V`a-WRSQYbMzAQB3TBi^4G*x6=)GRGr{V)7Zv0
zkgk`T<Siy5-5gOS0XeyoE$|;dVRwPYqjyrL%Je?Telcn^Idz;dkFB3_FI{6b|K5_3
zn(*b)Tl@4{g~Ux);Inywku%{OQ<|2BWfk*?A=R=HTorF9+j7B2;z>GB0U1o;aEob7
zCfE{P=Q)H{kb31%(F@Ev+IS5QG_=mvcv}=1I@zLNzir(mR?leiMu83)`T2e|bqbXR
z9i7rpMGLb?1bh@}+)%nzn@>w4Gy;vo<)5Un@LFH1X^YpA25%W2%#_R(6-SV_s8*i2
zR<CY>HD@BhC^IBY<s&a9$!eYtr5JuI_U}B}>Y+*P^77gWzN#olelVCFraHi|jIDWh
zCge^)_gT(8L3qJ00FKDZN_@Wq4^5LN=yjZr;%6rJAsS6cNpxT0ST&3@f<|JN&6x#6
zw(|nC-w>2;Z93I7I%uF_yP$pGmP|)RW+^X)M~X)|_B5i~Xe_LXRj}{svn0wc5kIch
zq7!nnd%1r7hoy@tIpKL}iS|xq^sz{LAy*sZ{LBtiss(p4+YG4YgsKl0`=l+muohjp
zv;GrU^qHUfjNl#0_35o`Zp>#_8x3I7Au2XE<SYs`V9&&vtQ5<4GGlk$DK{o_cX}Ny
z0dG<{4rx1@{q7>rc_OJy4i@>%*%6+6K6zNMN18m{?ndMYzzpSS47#J(VYO*p(IpHy
zJ9B&P)|6ly(zzODli0Tfzm!4nZo3TL6C<_xm0(-nA-r{o$^5}E!p;H4R7}{>bB)4S
z-bj4BL{%dd(KDK%W1QzX0lc)#39lC0Mg>20NLDcQRuGNI=)Po6uG1K9FKI#IbKe+>
zIJG0WKBS&W+)6Jk;+509<mj22TyVyJhiik1FX*Q7^hxBBR%bJP=ad72RK%->dhrp<
zce^rJ-I>(Kd)iK?4s#=l)(B6#BKqFkShWU_dZxb<$MSdvmsorsh4>)&p#Av<?-@A^
zfpr|+-ByJ5g3ALJ1g&;^$wYm_&gTjAeJ9dGJozR2=Jg?mxGTy7Kgz?p!WHK0t9oBa
z*gjHPxsI<BHPAbDhVkC0AxpL3*Y*4JW+d`&rI5MkHG3!3>+tFreLOKDJ9gcXIcY1}
zwLm*W<eUYZ?7G)&vJy|A(VzZz=HBB@{dk~29SHom|Bc7@7wq>;z8}Irjyzw=$Lqgg
zf8+K2z2V=n@BRh<SHpFWkAHB~{%Z60Y`mX{nLiPKxfXwK>v!zDpU5YVp4xxXqyCQn
z9b4}wp79a?2Y2shU;j5k;a`X!T)v-(UrBX8*nB_RaC}7k$?f~^kRR;6pOB=#Aivu2
z*Oq>;{eHsQ{to+{F@J^sVE_GufBPN$FD~F;UH?5B@GmuazNC-Y`d_($KW+7Ug4<7Y
z<YVsRKgaVobhlqs{#sN1snY6^`T1W}{-eVDtIl7G4?lG#KZa%hRp)O?5x;8wHT(Qi
z^T{Kx_J3;r!^{4=!r$eMeku&b{vQhekwyAd=dWStPo0tYzY9u##s3;j{lvo&{=okl
nTm6dvH3IpGM<e?Gk4I!BU>|d7KlsY%P>hd1X2XvK4(k5_7Ivu-

literal 0
HcmV?d00001

diff --git a/vendor/jasig/phpcas/utils/build-example.properties b/vendor/jasig/phpcas/utils/build-example.properties
new file mode 100644
index 00000000000..9407a20be16
--- /dev/null
+++ b/vendor/jasig/phpcas/utils/build-example.properties
@@ -0,0 +1,30 @@
+#
+# build-example.properties
+# This file is used by developers to generate distributions,
+# copy to build.properties before running ant tasks.
+#
+
+#
+# path to the doxygen executable
+#
+
+doxygen.path=C:/Program Files/doxygen/bin/doxygen.exe
+
+#
+# path to the git executable
+#
+
+git.path=/opt/local/bin/git
+
+#
+# path to the php executable
+#
+
+php.path=/usr/bin/php
+
+#
+# information used to connect to the jasig website and upload/manage releases
+#
+
+upload.username=anonymous
+upload.password=yourpassword
diff --git a/vendor/jasig/phpcas/utils/build.xml b/vendor/jasig/phpcas/utils/build.xml
new file mode 100644
index 00000000000..7dbc4c77a29
--- /dev/null
+++ b/vendor/jasig/phpcas/utils/build.xml
@@ -0,0 +1,395 @@
+<project name="phpcas-devel" default="prepare" basedir=".">
+
+  <property file="version.properties"/>
+  <property file="build.properties"/>
+  <property name="upload.host" value="jasig01.managed.contegix.com" />
+  <property name="upload.remotedir" value="/var/www/domains/jasig.org/downloads/htdocs/cas-clients/php" />
+
+  <taskdef name="doxygen"
+           classname="org.doxygen.tools.DoxygenTask"
+           classpath="ant_doxygen.jar"/>
+
+  <!-- compute current date -->
+  <tstamp>
+    <format property="date" pattern="d-MMMM-yyyy HH:mma" locale="en"/>
+  </tstamp>
+
+  <!-- ==========================================================
+    Meta targets
+  -->
+  <target name="prepare"
+    description="Prepare the release: tag, dist, markdev"
+    depends="tag,dist,markdev" />
+
+  <!-- ==========================================================
+    Create release tags.
+  -->
+  <target name="tag" description="Update the PHPCAS_VERSION and tag the release." depends="check_git">
+    <!-- Verify that the tag doesn't already exist. -->
+    <exec dir="${basedir}" executable="${git.path}" outputproperty="tag_exists">
+      <arg value="show-ref" />
+      <arg value="${phpcas.version}"/>
+    </exec>
+    <fail message="The ${phpcas.version} tag already exists in the repository. Use `ant revert` followed by `ant cleanall` to start the build over again.">
+      <condition>
+        <not>
+          <equals arg1="${tag_exists}" arg2="" trim="true"/>
+        </not>
+      </condition>
+    </fail>
+
+    <!-- Check the status of source/CAS.php -->
+    <echo message="Checking for existing modifications to source/CAS.php..."/>
+    <exec dir="${basedir}/.." executable="${git.path}" outputproperty="linesChanged.CASphp">
+      <arg value="diff" />
+      <arg value="source/CAS.php"/>
+    </exec>
+    <fail message="Can't safely update the PHPCAS_VERSION because source/CAS.php contains uncommitted modifications: ${linesChanged.CASphp}">
+      <condition>
+        <not>
+          <equals arg1="${linesChanged.CASphp}" arg2="" trim="true"/>
+        </not>
+      </condition>
+    </fail>
+
+    <!-- Check the status of docs/index.html -->
+    <echo message="Checking for existing modifications to docs/index.html..."/>
+    <exec dir="${basedir}/.." executable="${git.path}" outputproperty="linesChanged.indexhtml">
+      <arg value="diff" />
+      <arg value="docs/index.html"/>
+    </exec>
+    <fail message="Can't safely update the doc URL because docs/index.html contains uncommitted modifications: ${linesChanged.indexhtml}">
+      <condition>
+        <not>
+          <equals arg1="${linesChanged.indexhtml}" arg2="" trim="true"/>
+        </not>
+      </condition>
+    </fail>
+
+    <!-- Record the current HEAD to allow us to revert our tagging later -->
+    <exec dir="${basedir}" executable="${git.path}" output="starting_HEAD">
+      <arg value="rev-parse" />
+      <arg value="HEAD"/>
+    </exec>
+
+    <!-- Update the PHPCAS_VERSION -->
+    <replaceregexp file="../source/CAS.php"
+      match="define\('PHPCAS_VERSION', '[^']*'\);"
+      replace="define('PHPCAS_VERSION', '${phpcas.version}');"
+      byline="true"
+    />
+
+    <!-- Update the doc url -->
+    <replaceregexp file="../docs/index.html"
+      match="http://downloads\.jasig\.org/cas-clients/php/[^/]+/docs/api/"
+      replace="http://downloads.jasig.org/cas-clients/php/${phpcas.version}/docs/api/"
+      byline="true"
+    />
+
+    <!-- Commit the version changes -->
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="add" />
+      <arg value="source/CAS.php" />
+      <arg value="docs/index.html" />
+    </exec>
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="commit" />
+      <arg value="-m" />
+      <arg value="Updated versions for the ${phpcas.version} release." />
+    </exec>
+
+    <!-- Tag the release -->
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="tag" />
+      <arg value="-m" />
+      <arg value="Tag for the ${phpcas.version} release." />
+      <arg value="${phpcas.version}" />
+    </exec>
+
+  </target>
+
+  <!-- ==========================================================
+       Create tarball package
+  -->
+  <target name="dist" description="Create dist and docs tarball packages">
+    <mkdir dir="dist"/>
+    <delete dir="tmp" />
+    <mkdir dir="tmp/CAS-${phpcas.version}"/>
+    <!-- copy source files to tmp directory -->
+    <copy todir="tmp/CAS-${phpcas.version}">
+      <fileset dir="../source" includes="**/*.php" />
+      <filterchain>
+        <expandproperties/>
+      </filterchain>
+    </copy>
+    <!-- copy README tmp directory -->
+    <copy todir="tmp/CAS-${phpcas.version}" file="../README.md" />
+    <copy todir="tmp/CAS-${phpcas.version}" file="../LICENSE" />
+    <copy todir="tmp/CAS-${phpcas.version}" file="../NOTICE" />
+    <!-- copy docs files to tmp directory -->
+    <mkdir dir="tmp/CAS-${phpcas.version}/docs"/>
+    <copy todir="tmp/CAS-${phpcas.version}/docs">
+      <fileset dir="../docs" excludes="images/*" />
+      <filterchain>
+        <expandproperties/>
+      </filterchain>
+    </copy>
+    <!-- copy images to tmp directory -->
+    <copy todir="tmp/CAS-${phpcas.version}/docs">
+      <fileset dir="../docs" includes="images/*" />
+    </copy>
+    <!-- Update the doc url -->
+    <replaceregexp file="tmp/CAS-${phpcas.version}/docs/index.html"
+      match="http://downloads\.jasig\.org/cas-clients/php/[^/]+/docs/api/"
+      replace="http://downloads.jasig.org/cas-clients/php/${phpcas.version}/docs/api/"
+      byline="true"
+    />
+    <!-- check for the doxygen program, and fail is not found -->
+    <echo message="checking for doxygen..."/>
+    <fail message="please set ${doxygen.path} in build.properties" unless="doxygen.path"/>
+    <available file="${doxygen.path}" type="file" property="doxygen.present"/>
+    <fail message="doxygen program not found (${doxygen.path})" unless="doxygen.present"/>
+    <!-- write Doxygen configuration file from template -->
+    <echo message="write Doxygen configuration file..."/>
+    <copy file="Doxyfile"
+          tofile="tmp/Doxyfile">
+      <filterchain>
+        <expandproperties/>
+        <tokenfilter>
+          <replaceregex pattern="\\" replace="/" flags="g"/>
+        </tokenfilter>
+      </filterchain>
+    </copy>
+    <!-- call Doxygen -->
+    <echo message="writing API documentation..."/>
+    <doxygen doxygenPath="${doxygen.path}" configFilename="${basedir}/tmp/Doxyfile"/>
+
+    <!-- Remove any real config from the examples -->
+    <delete file="tmp/CAS-${phpcas.version}/docs/examples/config.php"/>
+
+    <!-- Build our tarballs -->
+    <!-- Docs -->
+    <tar
+        destfile="dist/docs-${phpcas.version}.tgz"
+        compression="gzip"
+        basedir="tmp/CAS-${phpcas.version}"
+        includes="docs/**/*" />
+
+    <!-- Remove the api docs from the dist package -->
+    <delete dir="tmp/CAS-${phpcas.version}/docs/api"/>
+
+    <!-- write makepackage.php file from template -->
+    <echo message="write makepackage.php file..."/>
+    <copy file="makepackage.php"
+          tofile="tmp/makepackage.php">
+      <filterchain>
+        <expandproperties/>
+      </filterchain>
+    </copy>
+    <!-- generate package.xml -->
+    <echo message="checking for php..."/>
+    <fail message="please set ${php.path} in build.properties" unless="php.path"/>
+    <available file="${php.path}" type="file" property="php.present"/>
+    <fail message="php program not found (${php.path})" unless="php.present"/>
+    <echo message="building the PEAR package.xml file..."/>
+    <exec dir="${basedir}" executable="${php.path}" >
+      <arg line="-f tmp/makepackage.php"/>
+    </exec>
+
+    <!-- Dist package -->
+    <tar
+        destfile="dist/CAS-${phpcas.version}.tgz"
+        compression="gzip"
+        basedir="tmp/"
+        includes="CAS-${phpcas.version}/**,package.xml"/>
+
+    <!--delete dir="tmp" /-->
+  </target>
+
+  <!-- ==========================================================
+    Mark the version as development.
+  -->
+  <target name="markdev" description="Update the PHPCAS_VERSION and tag the release." depends="check_git">
+    <!-- Verify that the tag exists. -->
+    <exec dir="${basedir}" executable="${git.path}" outputproperty="tag_exists_m">
+      <arg value="show-ref" />
+      <arg value="${phpcas.version}"/>
+    </exec>
+    <fail message="The ${phpcas.version} tag doesn't exist in the repository. Use `ant tag` to start the build over again.">
+      <condition>
+        <equals arg1="${tag_exists_m}" arg2="" trim="true"/>
+      </condition>
+    </fail>
+
+    <!-- Check the status of source/CAS.php -->
+    <echo message="Checking for existing modifications to source/CAS.php..."/>
+    <exec dir="${basedir}/.." executable="${git.path}" outputproperty="linesChanged.CASphp2">
+      <arg value="diff" />
+      <arg value="source/CAS.php"/>
+    </exec>
+    <fail message="Can't safely update the PHPCAS_VERSION because source/CAS.php contains uncommitted modifications: ${linesChanged.CASphp2}">
+      <condition>
+        <not>
+          <equals arg1="${linesChanged.CASphp2}" arg2="" trim="true"/>
+        </not>
+      </condition>
+    </fail>
+
+    <!-- Update the PHPCAS_VERSION -->
+    <replaceregexp file="../source/CAS.php"
+      match="define\('PHPCAS_VERSION', '[^']*'\);"
+      replace="define('PHPCAS_VERSION', '${phpcas.version}+');"
+      byline="true"
+    />
+
+    <!-- Commit the tag changes -->
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="add" />
+      <arg value="source/CAS.php" />
+    </exec>
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="commit" />
+      <arg value="-m" />
+      <arg value="Updated version for development after the ${phpcas.version} release." />
+    </exec>
+
+  </target>
+
+      <!-- ==========================================================
+           Upload the distribution files to the download area
+      -->
+      <target name="upload"
+              description="Upload the distribution files to JA-SIG">
+        <!-- Check that all the properties used for archives upload are set -->
+        <fail message="please set ${upload.username} in build.properties" unless="upload.username"/>
+        <fail message="please set ${upload.password} in build.properties" unless="upload.password"/>
+        <scp
+            trust="true"
+            localFile="${basedir}/dist/CAS-${phpcas.version}.tgz"
+            remoteTodir="${upload.username}:${upload.password}@${upload.host}:${upload.remotedir}" />
+        <scp
+            trust="true"
+            localFile="${basedir}/dist/docs-${phpcas.version}.tgz"
+            remoteTodir="${upload.username}:${upload.password}@${upload.host}:${upload.remotedir}" />
+        <sshexec
+            host="${upload.host}"
+            username="${upload.username}"
+            command="cd ${upload.remotedir} &amp;&amp; rm -rf ${phpcas.version} docs &amp;&amp; mkdir ${phpcas.version} &amp;&amp; mv CAS-${phpcas.version}.tgz ${phpcas.version} &amp;&amp; gunzip docs-${phpcas.version}.tgz &amp;&amp; tar xf docs-${phpcas.version}.tar &amp;&amp; mv docs ${phpcas.version} &amp;&amp; rm docs-${phpcas.version}.tar &amp;&amp; echo 'done (you can kill the ant task)'"
+            password="${upload.password}"
+            trust="true" />
+      </target>
+
+      <!-- ==========================================================
+           Make a 'current' symlink to the current version
+      -->
+      <target name="makeCurrentSymlink"
+              description="Make a 'stable' symlink to the current version">
+        <!-- Check that all the properties used for archives upload are set -->
+        <fail message="please set ${upload.username} in build.properties" unless="upload.username"/>
+        <fail message="please set ${upload.password} in build.properties" unless="upload.password"/>
+        <sshexec
+            host="${upload.host}"
+            username="${upload.username}"
+            command="cd ${upload.remotedir} &amp;&amp; rm -f current &amp;&amp; ln -s ${phpcas.version} current &amp;&amp; echo 'done (you can kill the ant task)'"
+            password="${upload.password}"
+            trust="true" />
+        <sshexec
+            host="${upload.host}"
+            username="${upload.username}"
+            command="cd ${upload.remotedir} &amp;&amp; rm -f current.tgz &amp;&amp; ln -s ${phpcas.version}/CAS-${phpcas.version}.tgz current.tgz &amp;&amp; echo 'done (you can kill the ant task)'"
+            password="${upload.password}"
+            trust="true" />
+      </target>
+
+  <!-- ==========================================================
+    Push the release to the origin repository
+  -->
+  <target name="push" description="Push the release tag and commits" depends="check_git">
+    <!-- Verify that the tag exists. -->
+    <exec dir="${basedir}" executable="${git.path}" outputproperty="tag_exists">
+      <arg value="show-ref" />
+      <arg value="${phpcas.version}"/>
+    </exec>
+    <fail message="The ${phpcas.version} tag doesn't exist in the repository. Use `ant prepare` to start the build over again.">
+      <condition>
+        <equals arg1="${tag_exists}" arg2="" trim="true"/>
+      </condition>
+    </fail>
+
+    <!-- Get the name of the current branch -->
+    <exec dir="${basedir}" executable="${git.path}" outputproperty="branch">
+      <arg value="name-rev" />
+      <arg value="--name-only"/>
+      <arg value="HEAD"/>
+    </exec>
+
+    <!-- Push the current branch to the same name in the origin repository. -->
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="push" />
+      <arg value="--tags" />
+      <arg value="origin" />
+      <arg value="${branch}:${branch}" />
+    </exec>
+
+  </target>
+
+  <!-- ==========================================================
+       Clean up everything but distribution file
+  -->
+  <target name="clean" description="Clean up everything but distribution files">
+    <delete dir="tmp"/>
+  </target>
+
+  <target name="cleanall" description="Clean up everything including distribution files" depends="clean">
+    <delete dir="dist"/>
+
+    <!-- Delete our starting_HEAD file -->
+    <delete file="starting_HEAD"/>
+  </target>
+
+  <target name="revert" description="Reset the current branch to the starting commit and delete the release tag." depends="check_git">
+    <!-- Load the starting commit id -->
+    <loadfile property="starting_HEAD"
+      srcFile="starting_HEAD">
+      <filterchain>
+        <striplinebreaks/>
+      </filterchain>
+    </loadfile>
+
+    <!-- Reset the index to the starting commit, but leave the working directory untouched. -->
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="reset" />
+      <arg value="--mixed" />
+      <arg value="${starting_HEAD}" />
+    </exec>
+
+    <!-- Revert just source/CAS.php and docs/index.html since we should have already checked
+         them for uncommited changes in the tag target. -->
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="checkout" />
+      <arg value="HEAD" />
+      <arg value="source/CAS.php" />
+      <arg value="docs/index.html" />
+    </exec>
+
+    <!-- Delete our release tag. -->
+    <exec dir="${basedir}/.." executable="${git.path}" failonerror="true">
+      <arg value="tag" />
+      <arg value="-d" />
+      <arg value="${phpcas.version}" />
+    </exec>
+
+    <!-- Delete our starting_HEAD file -->
+    <delete file="starting_HEAD"/>
+  </target>
+
+  <target name="check_git">
+    <!-- check for Git -->
+    <echo message="checking for git..."/>
+    <fail message="please set ${git.path} in build.properties" unless="git.path"/>
+    <available file="${git.path}" type="file" property="git.present"/>
+    <fail message="git program not found (${git.path})" unless="git.present"/>
+  </target>
+
+</project>
+
diff --git a/vendor/jasig/phpcas/utils/makepackage.php b/vendor/jasig/phpcas/utils/makepackage.php
new file mode 100644
index 00000000000..3a5f3766b44
--- /dev/null
+++ b/vendor/jasig/phpcas/utils/makepackage.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Packaging File to create a pear package.xml
+ *
+ * PHP Version 5
+ *
+ * @category Authentication
+ * @package  PhpCAS
+ * @author   Brett Bieber <brett.bieber@gmail.com>
+ * @author   Joachim Fritschi <jfritschi@freenet.de>
+ * @license  http://www1.unl.edu/wdn/wiki/Software_License New BSD License
+ * @link     https://wiki.jasig.org/display/CASC/phpCAS
+ *
+ */
+error_reporting(E_ALL ^ E_DEPRECATED);
+ini_set('display_errors', true);
+
+/**
+ * Require the PEAR_PackageFileManager2 classes, and other
+ * necessary classes for package.xml file creation.
+ */
+require_once 'PEAR/PackageFileManager2.php';
+require_once 'PEAR/PackageFileManager/File.php';
+require_once 'PEAR/Task/Postinstallscript/rw.php';
+require_once 'PEAR/Config.php';
+require_once 'PEAR/Frontend.php';
+
+/**
+ * @var PEAR_PackageFileManager
+ */
+PEAR::setErrorHandling(PEAR_ERROR_DIE);
+chdir(dirname(__FILE__));
+$pfm = new PEAR_PackageFileManager2();
+$pfm->setOptions(
+    array(
+    'packagedirectory'  => '${basedir}/tmp/CAS-${phpcas.version}',
+    'outputdirectory'  => '${basedir}/tmp',
+    'baseinstalldir'    => '/',
+    'filelistgenerator' => 'file',
+    'simpleoutput' => true,
+    'roles'=>array('php'=>'php'),
+    'exceptions'=>array('README.md' => 'doc',
+                        'LICENSE' => 'doc',
+                        'NOTICE' => 'doc')
+    )
+);
+$pfm->setPackage('CAS');
+$pfm->setPackageType('php'); // this is a PEAR-style php script package
+$pfm->setSummary('Central Authentication Service client library in php');
+$pfm->setDescription('This package is a PEAR installable library for using a Central Authentication Service.');
+$pfm->setChannel('__uri');
+$pfm->setAPIStability('${phpcas.apiStability}');
+$pfm->setReleaseStability('${phpcas.releaseStability}');
+$pfm->setAPIVersion('${phpcas.version}');
+$pfm->setReleaseVersion('${phpcas.version}');
+$pfm->setNotes('see https://github.com/Jasig/phpCAS/blob/master/docs/ChangeLog');
+
+$pfm->addMaintainer('lead', 'jfritschi', 'Joachim Fritschi', 'jfritschi@freenet.de');
+$pfm->addMaintainer('contributor', 'adamfranco', 'Adam Franco', 'afranco@middlebury.edu');
+
+$pfm->setLicense('Apache 2.0 License', 'https://github.com/Jasig/phpCAS/blob/master/LICENSE');
+$pfm->clearDeps();
+$pfm->setPhpDep('5.0.0');
+$pfm->setPearinstallerDep('1.4.3');
+
+$pfm->addExtensionDep('required', 'curl');
+$pfm->addExtensionDep('required', 'openssl');
+$pfm->addExtensionDep('required', 'dom');
+$pfm->addExtensionDep('required', 'zlib');
+$pfm->addExtensionDep('required', 'pdo');
+
+
+$pfm->generateContents();
+$pfm->writePackageFile();
+
diff --git a/vendor/jasig/phpcas/utils/version.properties b/vendor/jasig/phpcas/utils/version.properties
new file mode 100644
index 00000000000..c7a3011c80e
--- /dev/null
+++ b/vendor/jasig/phpcas/utils/version.properties
@@ -0,0 +1,6 @@
+# Version number devX, alphaX, RCX
+phpcas.version=1.3.2
+# devel, alpha, beta, stable
+phpcas.releaseStability=stable
+# devel, alpha, beta, stable
+phpcas.apiStability=stable
-- 
GitLab