Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
LDAPAuthPlugin Class Reference
Inheritance diagram for LDAPAuthPlugin:
AuthPlugin Plugin PKPPlugin

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 Member Functions inherited from AuthPlugin
 authenticate ($username, $password)
 
 AuthPlugin ($settings=array(), $authId=null)
 
 createUser (&$user)
 
 deleteUser ($username)
 
 doCreateUser (&$user)
 
 doGetUserInfo (&$user)
 
 doSetUserInfo (&$user)
 
 doSetUserPassword ($username, $password)
 
 getDescription ()
 
 getDisplayName ()
 
getInstance ($settings, $authId)
 
 getManagementVerbs ()
 
 getName ()
 
 getSettingsTemplate ()
 
 getUserInfo (&$user)
 
 isSitePlugin ()
 
 setUserInfo (&$user)
 
 setUserPassword ($username, $password)
 
 userExists ($username)
 
- Public Member Functions inherited from Plugin
 getContextSpecificPluginSettingsFile ()
 
 getNewJournalPluginSettingsFile ()
 
 getSetting ($journalId, $name)
 
 Plugin ()
 
 updateSetting ($journalId, $name, $value, $type=null)
 
- Public Member Functions inherited from PKPPlugin
 _getContextSpecificInstallationHook ()
 
 addHelpData ($locale=null)
 
 addLocaleData ($locale=null)
 
 getCategory ()
 
 getContextSpecificPluginSettingsFile ()
 
 getContextSpecificSetting ($context, $name)
 
 getCurrentVersion ()
 
 getDescription ()
 
 getDisplayName ()
 
 getHelpMappingFilename ()
 
 getHideManagement ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallSchemaFile ()
 
 getInstallSitePluginSettingsFile ()
 
 getLocaleFilename ($locale)
 
 getManagementVerbs ()
 
 getName ()
 
 getPluginPath ()
 
 getSeq ()
 
 getSettingMainContext ()
 
 getTemplatePath ()
 
 import ($class)
 
 installContextSpecificSettings ($hookName, $args)
 
 installData ($hookName, $args)
 
 installEmailTemplateData ($hookName, $args)
 
 installEmailTemplates ($hookName, $args)
 
 installFilters ($hookName, $args)
 
 installLocale ($hookName, $args)
 
 installSiteSettings ($hookName, $args)
 
 isSitePlugin ()
 
 manage ($verb, $args, &$message, &$messageParams, $request=null)
 
 PKPPlugin ()
 
 register ($category, $path)
 
 smartyPluginUrl ($params, &$smarty)
 
 updateContextSpecificSetting ($context, $name, $value, $type=null)
 
 updateSchema ($hookName, $args)
 

Detailed Description

LDAP authentication plugin.

Definition at line 18 of file LDAPAuthPlugin.inc.php.

Member Function Documentation

LDAPAuthPlugin::authenticate (   $username,
  $password 
)

Authenticate a username and password.

Parameters
$usernamestring
$passwordstring
Returns
boolean true if authentication is successful

Definition at line 90 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.

Parameters
$userUser to create
Returns
boolean true if successful

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.

Parameters
$usernamestring user to delete
Returns
boolean true if successful

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.

Parameters
$passwordstring
Returns
string hashed string (with prefix).

Definition at line 368 of file LDAPAuthPlugin.inc.php.

Referenced by createUser(), and setUserPassword().

LDAPAuthPlugin::getDescription ( )

Return the localized description of this plugin.

Returns
string

Definition at line 63 of file LDAPAuthPlugin.inc.php.

LDAPAuthPlugin::getDisplayName ( )

Return the localized name of this plugin.

Returns
string

Definition at line 55 of file LDAPAuthPlugin.inc.php.

& LDAPAuthPlugin::getInstance (   $settings,
  $authId 
)

Returns an instance of the authentication plugin

Parameters
$settingsarray settings specific to this instance.
$authIdint identifier for this instance
Returns
LDAPuthPlugin

Definition at line 79 of file LDAPAuthPlugin.inc.php.

LDAPAuthPlugin::getName ( )

Return the name of this plugin.

Returns
string

Definition at line 47 of file LDAPAuthPlugin.inc.php.

LDAPAuthPlugin::getUserEntry (   $username)

Lookup a user entry in the directory.

Parameters
$usernamestring

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.

Parameters
$userUser to update
Returns
boolean true if successful

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

Parameters
$categoryString Name of category plugin was registered to
Returns
boolean True iff plugin initialized successfully; if false, the plugin will not be registered.

Definition at line 25 of file LDAPAuthPlugin.inc.php.

References PKPPlugin\addLocaleData().

LDAPAuthPlugin::setUserInfo ( $user)

Store user profile information on the LDAP server.

Parameters
$userUser to store
Returns
boolean true if successful

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.

Parameters
$usernamestring user to update
$passwordstring the new password
Returns
boolean true if successful

Definition at line 173 of file LDAPAuthPlugin.inc.php.

References bind(), close(), encodePassword(), getUserEntry(), and open().

LDAPAuthPlugin::userExists (   $username)

Check if a username exists.

Parameters
$usernamestring
Returns
boolean

Definition at line 116 of file LDAPAuthPlugin.inc.php.

References bind(), close(), and open().

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.

Parameters
$userUser
$uattrarray

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.

Parameters
$userUser
$attrarray

Definition at line 343 of file LDAPAuthPlugin.inc.php.

References AppLocale\getLocale().

Referenced by createUser(), and setUserInfo().


The documentation for this class was generated from the following file: