The curl and openssl PHP extensions must be loaded if you want to use this feature.
| Requirement | Value / Description | PHP_VERSION | " . (version_compare(PHP_VERSION, '5.6.0', '>=')? '>=5.6.0' : '<5.6.0') . ' | '; echo "
|---|---|
| openssl | " . ((extension_loaded('openssl'))? 'extension loaded' : 'extension not loaded') . ' |
| curl | " . ((extension_loaded('curl'))? 'extension loaded' : 'extension not loaded') . ' |
| oauth2_enabled | " . ($config['oauth2_enabled']===TRUE? 'TRUE': 'FALSE') . ' |
| oauth2_provider | " . $config['oauth2_provider'] . ' |
| oauth2_client_id | " . ($config['oauth2_client_id']!=''? 'Provided': 'Empty') . ' |
| oauth2_client_secret | " . ($config['oauth2_client_secret']!=''? 'Provided': 'Empty') . ' |
| curl.cainfo | " . (file_exists(ini_get('curl.cainfo'))===TRUE? 'Found': 'Not found') . ' |
| openssl.cafile | " . (file_exists(ini_get('openssl.cafile'))===TRUE? 'Found': 'Not found') . ' |
| openssl_get_cert_locations | " . ((function_exists('openssl_get_cert_locations'))? 'Exists' : 'Doesn\'t exist') . ' |
| $key | " . (file_exists($value)===TRUE? 'Found': 'Not found') . ' |
Instruction for Google API:
Setup Jorani by editing application/config/config.php
oauth2_enabled to TRUE.oauth2_provider to google (only google is supported).oauth2_client_id with the value you got from Google developers console.oauth2_client_secret with the value you got from Google developers console.Depending on the version you are using, PHP will try to search for a bundle of certicates to be trusted. It is a file containing a list of public keys emitted by servers and APIs. Of course, the Google API must be listed prior trying to use the Google+ API for authentication purposes.
In case your system is not up-to-date, Jorani is bundled with a list of trusted certicates into assets/keys/cacert.pem. The absolute path to this file must be known by either:
You should modify the PHP.ini file depending on the version of PHP, as follow for PHP 5.6+:
[openssl] ; The location of a Certificate Authority (CA) file on the local filesystem ; to use when verifying the identity of SSL/TLS peers. Most users should ; not specify a value for this directive as PHP will attempt to use the ; OS-managed cert stores in its absence. If specified, this value may still ; be overridden on a per-stream basis via the "cafile" SSL stream context ; option. openssl.cafile=C:\wamp\www\auth\cacert.pem ; If openssl.cafile is not specified or if the CA file is not found, the ; directory pointed to by openssl.capath is searched for a suitable ; certificate. This value must be a correctly hashed certificate directory. ; Most users should not specify a value for this directive as PHP will ; attempt to use the OS-managed cert stores in its absence. If specified, ; this value may still be overridden on a per-stream basis via the "capath" ; SSL stream context option. ;openssl.capath=
Or as follow for older versions of PHP:
[curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. curl.cainfo=C:\wamp\www\auth\cacert.pem
Of course, adapt the path according to your environment.
In case of error, here are some additional steps:
$ setsebool -P httpd_can_network_connect 1