PHP 클래스 AuthPlugin, ojs

상속: extends YagePlugin
파일 보기 프로젝트 열기: pkp/ojs 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$authId auth source ID for this plugin instance
$settings settings for this plugin instance

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

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

authenticate() 추상적인 공개 메소드

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

createUser() 공개 메소드

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

deleteUser() 공개 메소드

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

doCreateUser() 공개 메소드

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

doGetUserInfo() 공개 메소드

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

doSetUserInfo() 공개 메소드

Update remote user profile, if enabled.
public doSetUserInfo ( $user ) : boolean
$user User
리턴 boolean true if successful

doSetUserPassword() 공개 메소드

Update remote user password, if enabled.
public doSetUserPassword ( $username, $password ) : boolean
$username string
$password string
리턴 boolean true if successful

getInstance() 추상적인 공개 메소드

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
리턴 AuthPlugin

getSettingsTemplate() 공개 메소드

Can return null if there are no plugin-specific settings.
public getSettingsTemplate ( ) : string
리턴 string

getUserInfo() 공개 메소드

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

isSitePlugin() 공개 메소드

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

setUserInfo() 공개 메소드

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

setUserPassword() 공개 메소드

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

userExists() 공개 메소드

Check if a username exists.
public userExists ( $username ) : boolean
$username string
리턴 boolean

프로퍼티 상세

$authId 공개적으로 프로퍼티

auth source ID for this plugin instance
public $authId

$settings 공개적으로 프로퍼티

settings for this plugin instance
public $settings