Open Journal Systems  3.3.0
AuthPlugin Class Reference
Inheritance diagram for AuthPlugin:
Plugin LDAPAuthPlugin

Public Member Functions

 __construct ($settings=array(), $authId=null)
 
 authenticate ($username, $password)
 
 createUser ($user)
 
 deleteUser ($username)
 
 doCreateUser ($user)
 
 doGetUserInfo ($user)
 
 doSetUserInfo ($user)
 
 doSetUserPassword ($username, $password)
 
 getInstance ($settings, $authId)
 
 getSettingsTemplate ()
 
 getUserInfo ($user)
 
 isSitePlugin ()
 
 setUserInfo ($user)
 
 setUserPassword ($username, $password)
 
 userExists ($username)
 
- Public Member Functions inherited from Plugin
 __construct ()
 
 _overridePluginTemplates ($hookName, $args)
 
 addLocaleData ($locale=null)
 
 getActions ($request, $actionArgs)
 
 getCanDisable ()
 
 getCanEnable ()
 
 getCategory ()
 
 getContextSpecificPluginSettingsFile ()
 
 getCurrentVersion ()
 
 getDescription ()
 
 getDirName ()
 
 getDisplayName ()
 
 getEnabled ()
 
 getHideManagement ()
 
 getInstallControlledVocabFiles ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallMigration ()
 
 getInstallSchemaFile ()
 
 getInstallSitePluginSettingsFile ()
 
 getLocaleFilename ($locale)
 
 getName ()
 
 getPluginPath ()
 
getRequest ()
 
 getSeq ()
 
 getSetting ($contextId, $name)
 
 getTemplatePath ($inCore=false)
 
 getTemplateResource ($template=null, $inCore=false)
 
 import ($class)
 
 installContextSpecificSettings ($hookName, $args)
 
 installControlledVocabs ($hookName, $args)
 
 installData ($hookName, $args)
 
 installEmailTemplateData ($hookName, $args)
 
 installEmailTemplates ($hookName, $args)
 
 installFilters ($hookName, $args)
 
 installLocale ($hookName, $args)
 
 installSiteSettings ($hookName, $args)
 
 manage ($args, $request)
 
 register ($category, $path, $mainContextId=null)
 
 smartyPluginUrl ($params, $smarty)
 
 updateSchema ($hookName, $args)
 
 updateSetting ($contextId, $name, $value, $type=null)
 

Data Fields

 $authId
 
 $settings
 
- Data Fields inherited from Plugin
 $pluginCategory
 
 $pluginPath
 
 $request
 

Additional Inherited Members

- Protected Member Functions inherited from Plugin
 _registerTemplateResource ($inCore=false)
 

Detailed Description

Abstract class for authentication plugins.

TODO: Error reporting when updating remote source fails. TODO: Support importing user accounts from the authentication source into OJS/OMP.

Definition at line 22 of file AuthPlugin.inc.php.

Constructor & Destructor Documentation

◆ __construct()

AuthPlugin::__construct (   $settings = array(),
  $authId = null 
)

Constructor.

Parameters
$settingsarray
$authIdint ID for this instance

Definition at line 41 of file AuthPlugin.inc.php.

References $authId, and $settings.

Member Function Documentation

◆ authenticate()

AuthPlugin::authenticate (   $username,
  $password 
)
abstract

Authenticate a username and password.

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

Reimplemented in LDAPAuthPlugin.

◆ createUser()

AuthPlugin::createUser (   $user)

Create a user on the remote source.

Parameters
$userUser to create
Returns
boolean true if successful

Reimplemented in LDAPAuthPlugin.

Definition at line 182 of file AuthPlugin.inc.php.

Referenced by doCreateUser().

◆ deleteUser()

AuthPlugin::deleteUser (   $username)

Delete a user from the remote source. This function is currently not used within OJS or OMP, but is reserved for future use.

Parameters
$usernamestring user to delete
Returns
boolean true if successful

Reimplemented in LDAPAuthPlugin.

Definition at line 193 of file AuthPlugin.inc.php.

◆ doCreateUser()

AuthPlugin::doCreateUser (   $user)

Create remote user account, if enabled.

Parameters
$userUser to create
Returns
boolean true if successful

Definition at line 106 of file AuthPlugin.inc.php.

References createUser().

◆ doGetUserInfo()

AuthPlugin::doGetUserInfo (   $user)

Update local user profile from the remote source, if enabled.

Parameters
$userUser
Returns
boolean true if successful

Definition at line 69 of file AuthPlugin.inc.php.

References getUserInfo().

◆ doSetUserInfo()

AuthPlugin::doSetUserInfo (   $user)

Update remote user profile, if enabled.

Parameters
$userUser
Returns
boolean true if successful

Definition at line 81 of file AuthPlugin.inc.php.

References setUserInfo().

◆ doSetUserPassword()

AuthPlugin::doSetUserPassword (   $username,
  $password 
)

Update remote user password, if enabled.

Parameters
$usernamestring
$passwordstring
Returns
boolean true if successful

Definition at line 94 of file AuthPlugin.inc.php.

References setUserPassword().

◆ getInstance()

AuthPlugin::getInstance (   $settings,
  $authId 
)
abstract

Returns an instance of the authentication plugin

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

Reimplemented in LDAPAuthPlugin.

◆ getSettingsTemplate()

AuthPlugin::getSettingsTemplate ( )

Return the path to a template for plugin settings. Can return null if there are no plugin-specific settings.

Returns
string

Definition at line 56 of file AuthPlugin.inc.php.

References Plugin\getTemplateResource().

◆ getUserInfo()

AuthPlugin::getUserInfo (   $user)

Retrieve user profile information from the remote source. Any unsupported fields (e.g., OJS- or OMP-specific ones) should not be modified.

Parameters
$userUser to update
Returns
boolean true if successful

Reimplemented in LDAPAuthPlugin.

Definition at line 154 of file AuthPlugin.inc.php.

Referenced by doGetUserInfo().

◆ isSitePlugin()

AuthPlugin::isSitePlugin ( )

Return true iff this is a site-wide plugin.

Reimplemented from Plugin.

Definition at line 200 of file AuthPlugin.inc.php.

◆ setUserInfo()

AuthPlugin::setUserInfo (   $user)

Store user profile information on the remote source.

Parameters
$userUser to store
Returns
boolean true if successful

Reimplemented in LDAPAuthPlugin.

Definition at line 163 of file AuthPlugin.inc.php.

Referenced by doSetUserInfo().

◆ setUserPassword()

AuthPlugin::setUserPassword (   $username,
  $password 
)

Change a user's password on the remote source.

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

Reimplemented in LDAPAuthPlugin.

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

Referenced by doSetUserPassword().

◆ userExists()

AuthPlugin::userExists (   $username)

Check if a username exists.

Parameters
$usernamestring
Returns
boolean

Reimplemented in LDAPAuthPlugin.

Definition at line 144 of file AuthPlugin.inc.php.

Field Documentation

◆ $authId

$authId AuthPlugin::$authId

int auth source ID for this plugin instance

Definition at line 34 of file AuthPlugin.inc.php.

Referenced by __construct(), and LDAPAuthPlugin\getInstance().

◆ $settings

$settings AuthPlugin::$settings

array settings for this plugin instance

Definition at line 28 of file AuthPlugin.inc.php.

Referenced by __construct(), and LDAPAuthPlugin\getInstance().


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