public function CasServerConfig::getCasServerGuzzleConnectionOptions in CAS 2.x
Same name and namespace in other branches
- 8 src/CasServerConfig.php \Drupal\cas\CasServerConfig::getCasServerGuzzleConnectionOptions()
Gets config data for guzzle communications with the CAS server.
Return value
array The guzzle connection options.
File
- src/
CasServerConfig.php, line 284
Class
- CasServerConfig
- Class CasServerConfig.
Namespace
Drupal\casCode
public function getCasServerGuzzleConnectionOptions() {
$options = [];
$verify = $this
->getVerify();
switch ($verify) {
case CasHelper::CA_CUSTOM:
$cert = $this
->getCustomRootCertBundlePath();
$options['verify'] = $cert;
break;
case CasHelper::CA_NONE:
$options['verify'] = FALSE;
break;
case CasHelper::CA_DEFAULT:
default:
$options['verify'] = TRUE;
}
$options['timeout'] = $this
->getDirectConnectionTimeout();
return $options;
}