Setup of OAuth2 sign-in

The curl and openssl PHP extensions must be loaded if you want to use this feature.

Checkup of your environement

'; echo "'; echo "'; echo "'; echo "'; echo "'; echo "'; echo "'; echo "'; echo "'; if (function_exists('openssl_get_cert_locations')) { $filesToCheck = openssl_get_cert_locations(); foreach ($filesToCheck as $key => $value) { echo "'; } } ?>
Requirement Value / Description
PHP_VERSION" . (version_compare(PHP_VERSION, '5.6.0', '>=')? '>=5.6.0' : '<5.6.0') . '
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') . '

Additional information

Setup Google+ API

Instruction for Google API:

Setup Jorani

Setup Jorani by editing application/config/config.php

Setup your PHP environment

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.

Troubleshooting

In case of error, here are some additional steps: