From fbde3767cd9745068d9fd1b8c6be5d295ba8471f Mon Sep 17 00:00:00 2001 From: Thomas BELOT Date: Fri, 5 Jun 2015 18:03:12 +0200 Subject: [PATCH] Added a few lines on how to use CASAuth behind a proxy --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index b92589b..bbe291c 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,20 @@ Assume $WIKI is the directory for your wiki. 6. You should now have working CAS authentication for your wiki! +Proxy support and custom CAS certificate +---------------------------------------- +Alternatively, if you need to deal with a proxy or if your CAS has +a custom / self-signed certificate, you can use part of the following code in step 4. above + +```php +require_once( "$IP/extensions/CASAuth/CASAuth.php" ); +phpCAS::setCasServerCACert('/path/to/ca-bundle.crt'); +phpCAS::setExtraCurlOption(CURLOPT_PROXY, 'proxy.localnet'); +phpCAS::setExtraCurlOption(CURLOPT_PROXYPORT, 8080); +phpCAS::setExtraCurlOption(CURLOPT_PROXYTYPE, CURLPROXY_HTTP); +casSetup(); +``` + Credits -------