Skip to content

Commit

Permalink
Merge tag '1.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
snelg committed Jul 5, 2019
2 parents 8305a14 + 9d0e6dc commit 03cbea9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ Configure::write('CAS.port', 8443);
* **uri** defaults to '' (an empty string)
* *debug* (optional) if true, then phpCAS will write debug info to logs/phpCAS.log
* *cert_path* (optional) if set, then phpCAS will use the specified CA certificate file to verify the CAS server
* *curlopts* (optional) key/value paired array of additional CURL parameters to pass through to phpCAS::setExtraCurlOption, e.g.
```php
'curlopts' => [CURLOPT_PROXY => 'http://proxy:5543', CURLOPT_CRLF => true]
```
6 changes: 6 additions & 0 deletions src/Auth/CasAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public function __construct(ComponentRegistry $registry, array $config = [])
phpCAS::client(CAS_VERSION_2_0, $settings['hostname'], $settings['port'], $settings['uri']);
}

if (!empty($settings['curlopts'])) {
foreach ($settings['curlopts'] as $key => $val) {
phpCAS::setExtraCurlOption($key, $val);
}
}

if (empty($settings['cert_path'])) {
phpCAS::setNoCasServerValidation();
} else {
Expand Down

0 comments on commit 03cbea9

Please sign in to comment.