Inheritance diagram for LDAPAuthPlugin:
Public Member Functions | |
authenticate ($username, $password) | |
bind ($binddn=null, $password=null) | |
close () | |
createUser (&$user) | |
deleteUser ($username) | |
encodePassword ($password) | |
getDescription () | |
getDisplayName () | |
& | getInstance ($settings, $authId) |
getName () | |
getUserEntry ($username) | |
getUserInfo (&$user) | |
open () | |
register ($category, $path) | |
setUserInfo (&$user) | |
setUserPassword ($username, $password) | |
userExists ($username) | |
userFromAttr (&$user, &$uattr) | |
userToAttr (&$user, &$attr) | |
Public Attributes | |
$conn |
Definition at line 20 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin.authenticate | ( | $ | username, | |
$ | password | |||
) |
Authenticate a username and password.
$username | string | |
$password | string |
Reimplemented from AuthPlugin.
Definition at line 92 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 257 of file LDAPAuthPlugin.inc.php.
Referenced by authenticate(), createUser(), deleteUser(), getUserEntry(), setUserInfo(), setUserPassword(), and userExists().
LDAPAuthPlugin.close | ( | ) |
Close connection.
Definition at line 247 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 191 of file LDAPAuthPlugin.inc.php.
References bind(), close(), encodePassword(), 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 216 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 368 of file LDAPAuthPlugin.inc.php.
Referenced by createUser(), and setUserPassword().
LDAPAuthPlugin.getDescription | ( | ) |
Return the localized description of this plugin.
Reimplemented from AuthPlugin.
Definition at line 65 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin.getDisplayName | ( | ) |
Return the localized name of this plugin.
Reimplemented from AuthPlugin.
Definition at line 57 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 81 of file LDAPAuthPlugin.inc.php.
References AuthPlugin.$authId, and AuthPlugin.$settings.
LDAPAuthPlugin.getName | ( | ) |
Return the name of this plugin.
Reimplemented from AuthPlugin.
Definition at line 49 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin.getUserEntry | ( | $ | username | ) |
Lookup a user entry in the directory.
$username | string |
Definition at line 269 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 133 of file LDAPAuthPlugin.inc.php.
References close(), getUserEntry(), open(), and userFromAttr().
LDAPAuthPlugin.open | ( | ) |
Open connection to the server.
Definition at line 238 of file LDAPAuthPlugin.inc.php.
Referenced by authenticate(), createUser(), deleteUser(), getUserInfo(), setUserInfo(), setUserPassword(), and userExists().
LDAPAuthPlugin.register | ( | $ | category, | |
$ | path | |||
) |
Called as a plugin is registered to the registry
$category | String Name of category plugin was registered to |
Reimplemented from Plugin.
Definition at line 27 of file LDAPAuthPlugin.inc.php.
LDAPAuthPlugin.setUserInfo | ( | &$ | user | ) |
Store user profile information on the LDAP server.
$user | User to store |
Reimplemented from AuthPlugin.
Definition at line 151 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 173 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 116 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 288 of file LDAPAuthPlugin.inc.php.
References 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 343 of file LDAPAuthPlugin.inc.php.
Referenced by createUser(), and setUserInfo().