Open Journal Systems
3.3.0
|
Data Fields | |
$conn | |
Data Fields inherited from AuthPlugin | |
$authId | |
$settings | |
Data Fields inherited from Plugin | |
$pluginCategory | |
$pluginPath | |
$request | |
Additional Inherited Members | |
Protected Member Functions inherited from Plugin | |
_registerTemplateResource ($inCore=false) | |
LDAP authentication plugin.
Definition at line 18 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin::authenticate | ( | $username, | |
$password | |||
) |
Authenticate a username and password.
$username | string |
$password | string |
Reimplemented from AuthPlugin.
Definition at line 89 of file LDAPAuthPlugin.inc.php.
References bind(), close(), getUserEntry(), and open().
LDAPAuthPlugin::bind | ( | $binddn = null , |
|
$password = null |
|||
) |
Bind to a directory. $binddn string directory to bind (optional) $password string (optional)
Definition at line 256 of file LDAPAuthPlugin.inc.php.
Referenced by authenticate(), createUser(), deleteUser(), getUserEntry(), setUserInfo(), setUserPassword(), and userExists().
LDAPAuthPlugin::close | ( | ) |
Close connection.
Definition at line 246 of file LDAPAuthPlugin.inc.php.
Referenced by authenticate(), createUser(), deleteUser(), getUserInfo(), setUserInfo(), setUserPassword(), and userExists().
LDAPAuthPlugin::createUser | ( | $user | ) |
Create a user on the LDAP server.
$user | User to create |
Reimplemented from AuthPlugin.
Definition at line 190 of file LDAPAuthPlugin.inc.php.
References bind(), close(), getUserEntry(), open(), and userToAttr().
LDAPAuthPlugin::deleteUser | ( | $username | ) |
Delete a user from the LDAP server.
$username | string user to delete |
Reimplemented from AuthPlugin.
Definition at line 215 of file LDAPAuthPlugin.inc.php.
References bind(), close(), getUserEntry(), and open().
LDAPAuthPlugin::encodePassword | ( | $password | ) |
Encode password for the 'userPassword' field using the specified hash.
$password | string |
Definition at line 359 of file LDAPAuthPlugin.inc.php.
Referenced by setUserPassword().
LDAPAuthPlugin::getDescription | ( | ) |
Return the localized description of this plugin.
Reimplemented from Plugin.
Definition at line 63 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin::getDisplayName | ( | ) |
Return the localized name of this plugin.
Reimplemented from Plugin.
Definition at line 55 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin::getInstance | ( | $settings, | |
$authId | |||
) |
Returns an instance of the authentication plugin
$settings | array settings specific to this instance. |
$authId | int identifier for this instance |
Reimplemented from AuthPlugin.
Definition at line 79 of file LDAPAuthPlugin.inc.php.
References AuthPlugin\$authId, and AuthPlugin\$settings.
LDAPAuthPlugin::getName | ( | ) |
Return the name of this plugin.
Reimplemented from Plugin.
Definition at line 47 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin::getUserEntry | ( | $username | ) |
Lookup a user entry in the directory.
$username | string |
Definition at line 268 of file LDAPAuthPlugin.inc.php.
References bind().
Referenced by authenticate(), createUser(), deleteUser(), getUserInfo(), setUserInfo(), and setUserPassword().
LDAPAuthPlugin::getUserInfo | ( | $user | ) |
Retrieve user profile information from the LDAP server.
$user | User to update |
Reimplemented from AuthPlugin.
Definition at line 132 of file LDAPAuthPlugin.inc.php.
References close(), getUserEntry(), open(), and userFromAttr().
LDAPAuthPlugin::open | ( | ) |
Open connection to the server.
Definition at line 237 of file LDAPAuthPlugin.inc.php.
References $conn.
Referenced by authenticate(), createUser(), deleteUser(), getUserInfo(), setUserInfo(), setUserPassword(), and userExists().
LDAPAuthPlugin::register | ( | $category, | |
$path, | |||
$mainContextId = null |
|||
) |
Load and initialize the plug-in and register plugin hooks.
For backwards compatibility this method will be called whenever the plug-in's category is being loaded. If, however, registerOn() returns an array then this method will only be called when the plug-in is enabled and an entry in the result set of registerOn() matches the current request operation. An empty array matches all request operations.
$category | String Name of category plugin was registered to |
$path | String The path the plugin was found in |
$mainContextId | integer To identify if the plugin is enabled we need a context. This context is usually taken from the request but sometimes there is no context in the request (e.g. when executing CLI commands). Then the main context can be given as an explicit ID. |
Reimplemented from Plugin.
Definition at line 22 of file LDAPAuthPlugin.inc.php.
References Plugin\addLocaleData().
LDAPAuthPlugin::setUserInfo | ( | $user | ) |
Store user profile information on the LDAP server.
$user | User to store |
Reimplemented from AuthPlugin.
Definition at line 150 of file LDAPAuthPlugin.inc.php.
References bind(), close(), getUserEntry(), open(), and userToAttr().
LDAPAuthPlugin::setUserPassword | ( | $username, | |
$password | |||
) |
Change a user's password on the LDAP server.
$username | string user to update |
$password | string the new password |
Reimplemented from AuthPlugin.
Definition at line 172 of file LDAPAuthPlugin.inc.php.
References bind(), close(), encodePassword(), getUserEntry(), and open().
LDAPAuthPlugin::userExists | ( | $username | ) |
Check if a username exists.
$username | string |
Reimplemented from AuthPlugin.
Definition at line 115 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin::userFromAttr | ( | & | $user, |
& | $uattr | ||
) |
Update User object from entry attributes. TODO Abstract this to allow arbitrary LDAP <-> OJS schema mappings. For now must be subclassed for other schemas. TODO How to deal with deleted fields.
$user | User |
$uattr | array |
Definition at line 287 of file LDAPAuthPlugin.inc.php.
References DAORegistry\getDAO(), and AppLocale\getLocale().
Referenced by getUserInfo().
LDAPAuthPlugin::userToAttr | ( | & | $user, |
& | $attr | ||
) |
Update entry attributes from User object. TODO How to deal with deleted fields.
$user | User |
$attr | array |
Definition at line 334 of file LDAPAuthPlugin.inc.php.
References DAORegistry\getDAO().
Referenced by createUser(), and setUserInfo().
resource LDAPAuthPlugin::$conn |