function oauth2_user_wsclient_dev_settings in OAuth2 Login 8
Same name in this branch
- 8 oauth2_user/wsclient.inc \oauth2_user_wsclient_dev_settings()
- 8 oauth2_user/oauth2_user.api.php \oauth2_user_wsclient_dev_settings()
Same name and namespace in other branches
- 7.2 oauth2_user/wsclient.inc \oauth2_user_wsclient_dev_settings()
- 7.2 oauth2_user/oauth2_user.api.php \oauth2_user_wsclient_dev_settings()
Set curl options for development, testing and debug.
1 call to oauth2_user_wsclient_dev_settings()
- oauth2_user_default_wsclient_service in oauth2_user/
wsclient.inc - Implements hook_default_wsclient_service().
File
- oauth2_user/
wsclient.inc, line 55 - Define the web service client that gets the oauth2 user profile.
Code
function oauth2_user_wsclient_dev_settings() {
$skipssl = variable_get('oauth2_login_skipssl', TRUE);
$proxy = variable_get('oauth2_login_proxy', '');
$dev_settings = array();
if ($skipssl) {
// Skip checking the SSL certificate, for testing.
$dev_settings['curl options'] = [
CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_SSL_VERIFYHOST => FALSE,
];
}
if ($proxy) {
$dev_settings['curl options'][CURLOPT_PROXY] = $proxy;
}
return $dev_settings;
}