aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-23 16:36:01 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-23 16:36:01 +0000
commita5c6e57d14eca2185f62bfbba9138bf48ffbed1b (patch)
treedde77d5bd5c0e654b15e9d0b7ca537b0d51e5eb6 /services
parent23f908c3e95b121f83f8c14450a9d06c4c8d41ad (diff)
downloadelgg-a5c6e57d14eca2185f62bfbba9138bf48ffbed1b.tar.gz
elgg-a5c6e57d14eca2185f62bfbba9138bf48ffbed1b.tar.bz2
Updated to use pam for auth token.
Added anonymous function support. git-svn-id: https://code.elgg.org/elgg/trunk@1505 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'services')
-rw-r--r--services/api/rest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/api/rest.php b/services/api/rest.php
index 41e44d9b2..15a7ad923 100644
--- a/services/api/rest.php
+++ b/services/api/rest.php
@@ -14,7 +14,7 @@
/**
* Start the Elgg engine
*/
- require_once('../engine/start.php');
+ require_once("../../engine/start.php");
global $CONFIG;
// Register the error handler
@@ -31,6 +31,8 @@
// Register some default PAM methods, plugins can add their own
register_pam_handler('pam_auth_session');
register_pam_handler('pam_auth_hmac');
+ register_pam_handler('pam_auth_usertoken', 'required'); // Either token present and valid OR method doesn't require one.
+ register_pam_handler('pam_auth_anonymous_method'); // Support anonymous functions
// Get parameter variables
$method = get_input('method');