Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
AuthPlugin Class Reference
Inheritance diagram for AuthPlugin:
Plugin

Public Member Functions

 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
 _getContextSpecificInstallationHook ()
 
 addLocaleData ($locale=null)
 
 getCategory ()
 
 getContextSpecificPluginSettingsFile ()
 
 getContextSpecificSetting ($context, $name)
 
 getCurrentVersion ()
 
 getDescription ()
 
 getDisplayName ()
 
 getHideManagement ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallSchemaFile ()
 
 getInstallSitePluginSettingsFile ()
 
 getLocaleFilename ($locale)
 
 getManagementVerbLinkAction ($request, $verb)
 
 getManagementVerbs ()
 
 getName ()
 
 getPluginPath ()
 
getRequest ()
 
 getSeq ()
 
 getSetting ($contextId, $name)
 
 getSettingMainContext ()
 
 getTemplatePath ($inCore=false)
 
 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, &$pluginModalContent=null)
 
 Plugin ()
 
 register ($category, $path)
 
 smartyPluginUrl ($params, &$smarty)
 
 updateContextSpecificSetting ($context, $name, $value, $type=null)
 
 updateSchema ($hookName, $args)
 
 updateSetting ($contextId, $name, $value, $type=null)
 

Public Attributes

 $authId
 
 $settings
 
- Public Attributes inherited from Plugin
 $pluginCategory
 
 $pluginPath
 
 $request
 

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 OMP.

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

Member Function Documentation

AuthPlugin::authenticate (   $username,
  $password 
)

Authenticate a username and password.

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

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

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

Constructor.

Parameters
$settingsarray

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

AuthPlugin::createUser ( $user)

Create a user on the remote source.

Parameters
$userUser to create
Returns
boolean true if successful

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

Referenced by doSetUserPassword().

AuthPlugin::deleteUser (   $username)

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

Parameters
$usernamestring user to delete
Returns
boolean true if successful

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

AuthPlugin::doCreateUser ( $user)

Create remote user account, if enabled.

Parameters
$userUser to create
Returns
boolean true if successful

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

AuthPlugin::doGetUserInfo ( $user)

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

Parameters
$userUser
Returns
boolean true if successful

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

References setUserInfo().

AuthPlugin::doSetUserInfo ( $user)

Update remote user profile, if enabled.

Parameters
$userUser
Returns
boolean true if successful

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

References setUserPassword().

AuthPlugin::doSetUserPassword (   $username,
  $password 
)

Update remote user password, if enabled.

Parameters
$usernamestring
$passwordstring
Returns
boolean true if successful

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

References createUser().

AuthPlugin::getDescription ( )

Return the localized description of this plugin. Should be overridden by subclass.

Returns
string

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

AuthPlugin::getDisplayName ( )

Return the localized name of this plugin. Should be overridden by subclass.

Returns
string

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

AuthPlugin::getInstance (   $settings,
  $authId 
)

Returns an instance of the authentication plugin

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

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

AuthPlugin::getManagementVerbs ( )

Return the management verbs for this plugin.

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

AuthPlugin::getName ( )

Return the name of this plugin. Should be overridden by subclass.

Returns
string

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

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 83 of file AuthPlugin.inc.php.

References getUserInfo().

AuthPlugin::getUserInfo ( $user)

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

Parameters
$userUser to update
Returns
boolean true if successful

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

Referenced by getSettingsTemplate().

AuthPlugin::isSitePlugin ( )

Return true iff this is a site-wide plugin.

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

AuthPlugin::setUserInfo ( $user)

Store user profile information on the remote source.

Parameters
$userUser to store
Returns
boolean true if successful

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

Referenced by doGetUserInfo().

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

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

Referenced by doSetUserInfo().

AuthPlugin::userExists (   $username)

Check if a username exists.

Parameters
$usernamestring
Returns
boolean

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

Member Data Documentation

$authId AuthPlugin::$authId

int auth source ID for this plugin instance

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

$settings AuthPlugin::$settings

array settings for this plugin instance

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


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