Skip to content

Commit 3d5d88b

Browse files
author
Thomas BELOT
committed
Added a few lines on how to use CASAuth behind a proxy
1 parent 1e8b564 commit 3d5d88b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ Assume $WIKI is the directory for your wiki.
4747

4848
6. You should now have working CAS authentication for your wiki!
4949

50+
Proxy support and custom CAS certificate
51+
----------------------------------------
52+
Alternatively, if you need to deal with a proxy or if your CAS has
53+
a custom / self-signed certificate, you can use part of the following code in step 4. above
54+
55+
```php
56+
require_once( "$IP/extensions/CASAuth/CASAuth.php" );
57+
phpCAS::setCasServerCACert('/path/to/ca-bundle.crt');
58+
phpCAS::setExtraCurlOption(CURLOPT_PROXY, 'proxy.localnet');
59+
phpCAS::setExtraCurlOption(CURLOPT_PROXYPORT, 8080);
60+
phpCAS::setExtraCurlOption(CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
61+
casSetup();
62+
```
63+
5064
Credits
5165
-------
5266

0 commit comments

Comments
 (0)