/**
* Equivalent methods in application's API.
*
- * The 'authAuthenticate', 'authAuthenticateCallback', and
- * 'authTransparent' methods must not have the check_perms flag set
- * (however, for sanity reasons it is best to have a Horde_Auth::getAuth()
- * check inside of the authAuthenticate function).
- *
* @var array
*/
protected $_apiMethods = array(
if (!in_array($capability, $this->_loaded) &&
isset($this->_apiMethods[$capability])) {
$registry = Horde_Registry::singleton();
- $this->_capabilities[$capability] = $registry->hasMethod($this->_apiMethods[$capability], $this->_app);
+ $this->_capabilities[$capability] = $registry->hasAppMethod($this->_app, $this->_apiMethods[$capability]);
$this->_loaded[] = $capability;
}
$credentials['auth_ob'] = $this;
try {
- $result = $registry->callByPackage($this->_app, $this->_apiMethods['authenticate'], array($userId, $credentials));
+ $result = $registry->callAppMethod($this->_app, $this->_apiMethods['authenticate'], array('args' => array($userId, $credentials), 'noperms' => true));
} catch (Horde_Auth_Exception $e) {
throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN);
}
{
if ($this->hasCapability('list')) {
$registry = Horde_Registry::singleton();
- return $registry->callByPackage($this->_app, $this->_apiMethods['list']);
+ return $registry->callAppMethod($this->_app, $this->_apiMethods['list']);
} else {
return parent::listUsers();
}
{
if ($this->hasCapability('exists')) {
$registry = Horde_Registry::singleton();
- return $registry->callByPackage($this->_app, $this->_apiMethods['exists'], array($userId));
+ return $registry->callAppMethod($this->_app, $this->_apiMethods['exists'], array($userId));
} else {
return parent::exists($userId);
}
{
if ($this->hasCapability('add')) {
$registry = Horde_Registry::singleton();
- $registry->callByPackage($this->_app, $this->_apiMethods['exists'], array($userId, $credentials));
+ $registry->callAppMethod($this->_app, $this->_apiMethods['exists'], array($userId, $credentials));
} else {
parent::addUser($userId, $credentials);
}
{
if ($this->hasCapability('update')) {
$registry = Horde_Registry::singleton();
- $registry->callByPackage($this->_app, $this->_apiMethods['update'], array($oldID, $newID, $credentials));
+ $registry->callAppMethod($this->_app, $this->_apiMethods['update'], array($oldID, $newID, $credentials));
} else {
parent::updateUser($userId, $credentials);
}
{
if ($this->hasCapability('remove')) {
$registry = Horde_Registry::singleton();
- $registry->callByPackage($this->_app, $this->_apiMethods['remove'], array($userId));
+ $registry->callAppMethod($this->_app, $this->_apiMethods['remove'], array($userId));
Horde_Auth::removeUserData($userId);
} else {
parent::removeUser($userId);
}
$registry = Horde_Registry::singleton();
- return $registry->callByPackage($this->_app, $this->_apiMethods['transparent']);
+ return $registry->callAppMethod($this->_app, $this->_apiMethods['transparent'], array('noperms' => true));
}
/**
}
$registry = Horde_Registry::singleton();
- return $registry->callByPackage($this->_app, $this->_apiMethods['loginparams']);
+ return $registry->callAppMethod($this->_app, $this->_apiMethods['loginparams'], array('noperms' => true));
}
/**
{
if ($this->hasCapability('authenticatecallback')) {
$registry = Horde_Registry::singleton();
- $registry->callByPackage($this->_app, $this->_apiMethods['authenticatecallback']);
+ $registry->callAppMethod($this->_app, $this->_apiMethods['authenticatecallback'], array('noperms' => true));
}
}