PHP Class AuthPlugin, ojs

Inheritance: extends YagePlugin
Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Свойство Type Description
$authId auth source ID for this plugin instance
$settings settings for this plugin instance

Méthodes publiques

Méthode Description
__construct ( $settings = [], $authId = null ) Constructor.
authenticate ( $username, $password ) : boolean Authenticate a username and password.
createUser ( $user ) : boolean Create a user on the remote source.
deleteUser ( $username ) : boolean Delete a user from the remote source.
doCreateUser ( $user ) : boolean Create remote user account, if enabled.
doGetUserInfo ( $user ) : boolean Update local user profile from the remote source, if enabled.
doSetUserInfo ( $user ) : boolean Update remote user profile, if enabled.
doSetUserPassword ( $username, $password ) : boolean Update remote user password, if enabled.
getInstance ( $settings, $authId ) : AuthPlugin Returns an instance of the authentication plugin
getSettingsTemplate ( ) : string Return the path to a template for plugin settings.
getUserInfo ( $user ) : boolean Retrieve user profile information from the remote source.
isSitePlugin ( ) Return true iff this is a site-wide plugin.
setUserInfo ( $user ) : boolean Store user profile information on the remote source.
setUserPassword ( $username, $password ) : boolean Change a user's password on the remote source.
userExists ( $username ) : boolean Check if a username exists.

Method Details

__construct() public méthode

Constructor.
public __construct ( $settings = [], $authId = null )
$settings array
$authId int ID for this instance

authenticate() abstract public méthode

Authenticate a username and password.
abstract public authenticate ( $username, $password ) : boolean
$username string
$password string
Résultat boolean true if authentication is successful

createUser() public méthode

Create a user on the remote source.
public createUser ( $user ) : boolean
$user User to create
Résultat boolean true if successful

deleteUser() public méthode

This function is currently not used within OJS, but is reserved for future use.
public deleteUser ( $username ) : boolean
$username string user to delete
Résultat boolean true if successful

doCreateUser() public méthode

Create remote user account, if enabled.
public doCreateUser ( $user ) : boolean
$user User to create
Résultat boolean true if successful

doGetUserInfo() public méthode

Update local user profile from the remote source, if enabled.
public doGetUserInfo ( $user ) : boolean
$user User
Résultat boolean true if successful

doSetUserInfo() public méthode

Update remote user profile, if enabled.
public doSetUserInfo ( $user ) : boolean
$user User
Résultat boolean true if successful

doSetUserPassword() public méthode

Update remote user password, if enabled.
public doSetUserPassword ( $username, $password ) : boolean
$username string
$password string
Résultat boolean true if successful

getInstance() abstract public méthode

Returns an instance of the authentication plugin
abstract public getInstance ( $settings, $authId ) : AuthPlugin
$settings array settings specific to this instance
$authId int identifier for this instance
Résultat AuthPlugin

getSettingsTemplate() public méthode

Can return null if there are no plugin-specific settings.
public getSettingsTemplate ( ) : string
Résultat string

getUserInfo() public méthode

Any unsupported fields (e.g., OJS-specific ones) should not be modified.
public getUserInfo ( $user ) : boolean
$user User to update
Résultat boolean true if successful

isSitePlugin() public méthode

Return true iff this is a site-wide plugin.
public isSitePlugin ( )

setUserInfo() public méthode

Store user profile information on the remote source.
public setUserInfo ( $user ) : boolean
$user User to store
Résultat boolean true if successful

setUserPassword() public méthode

Change a user's password on the remote source.
public setUserPassword ( $username, $password ) : boolean
$username string user to update
$password string the new password
Résultat boolean true if successful

userExists() public méthode

Check if a username exists.
public userExists ( $username ) : boolean
$username string
Résultat boolean

Property Details

$authId public_oe property

auth source ID for this plugin instance
public $authId

$settings public_oe property

settings for this plugin instance
public $settings