diff options
-rw-r--r-- | lib/openid_consumer.php | 14 | ||||
-rw-r--r-- | lib/openid_server.php | 13 | ||||
-rw-r--r-- | start.php | 8 |
3 files changed, 34 insertions, 1 deletions
diff --git a/lib/openid_consumer.php b/lib/openid_consumer.php new file mode 100644 index 000000000..3dfc09a1e --- /dev/null +++ b/lib/openid_consumer.php @@ -0,0 +1,14 @@ +<?php +/** + * OpenID library loader for consumers + */ + +$openid_path = dirname(dirname(__FILE__)) . '/vendors/php-openid/'; +$path = ini_get('include_path'); +$path = $openid_path . PATH_SEPARATOR . $path; +ini_set('include_path', $path); + +require_once 'Auth/OpenID.php'; +require_once 'Auth/OpenID/Consumer.php'; +require_once 'Auth/OpenID/SReg.php'; +require_once 'Auth/OpenID/AX.php'; diff --git a/lib/openid_server.php b/lib/openid_server.php new file mode 100644 index 000000000..c689caf57 --- /dev/null +++ b/lib/openid_server.php @@ -0,0 +1,13 @@ +<?php +/** + * OpenID library loader for consumers + */ + +$openid_path = dirname(dirname(__FILE__)) . '/vendors/php-openid/'; +$path = ini_get('include_path'); +$path = $openid_path . PATH_SEPARATOR . $path; +ini_set('include_path', $path); + +require_once 'Auth/OpenID.php'; +require_once 'Auth/OpenID/Server.php'; +require_once 'Auth/OpenID/SReg.php'; @@ -1,6 +1,12 @@ <?php /** - * + * OpenID API Library */ +elgg_register_event_handler('init', 'system', 'openid_api_init'); +function openid_api_init() { + $dir = elgg_get_plugins_path() . 'openid_api/lib/'; + elgg_register_library('openid_comsumer', "$dir/openid_consumer.php"); + elgg_register_library('openid_server', "$dir/openid_server.php"); +} |