[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Authentication plugin interface Copyright © 2004 Brion Vibber <[email protected]> https://www.mediawiki.org/
File Size: | 343 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
AuthPlugin:: (22 methods):
userExists()
authenticate()
modifyUITemplate()
setDomain()
getDomain()
validDomain()
updateUser()
autoCreate()
allowPropChange()
allowPasswordChange()
allowSetLocalPassword()
setPassword()
updateExternalDB()
updateExternalDBGroups()
canCreateAccounts()
addUser()
strict()
strictUserAuth()
initUser()
getCanonicalName()
getUserInstance()
domainList()
AuthPluginUser:: (5 methods):
__construct()
getId()
isLocked()
isHidden()
resetAuthToken()
Class: AuthPlugin - X-Ref
Authentication plugin interface. Instantiate a subclass of AuthPluginuserExists( $username ) X-Ref |
Check whether there exists a user account with the given name. The name will be normalized to MediaWiki's requirements, so you might need to munge it (for instance, for lowercase initial letters). param: string $username Username. return: bool |
authenticate( $username, $password ) X-Ref |
Check if a username+password pair is a valid login. The name will be normalized to MediaWiki's requirements, so you might need to munge it (for instance, for lowercase initial letters). param: string $username Username. param: string $password User password. return: bool |
modifyUITemplate( &$template, &$type ) X-Ref |
Modify options in the login template. param: UserLoginTemplate $template param: string $type 'signup' or 'login'. Added in 1.16. |
setDomain( $domain ) X-Ref |
Set the domain this plugin is supposed to use when authenticating. param: string $domain Authentication domain. |
getDomain() X-Ref |
Get the user's domain return: string |
validDomain( $domain ) X-Ref |
Check to see if the specific domain is a valid domain. param: string $domain Authentication domain. return: bool |
updateUser( &$user ) X-Ref |
When a user logs in, optionally fill in preferences and such. For instance, you might pull the email address or real name from the external user database. The User object is passed by reference so it can be modified; don't forget the & on your function declaration. param: User $user return: bool |
autoCreate() X-Ref |
Return true if the wiki should create a new local account automatically when asked to login a user who doesn't exist locally but does in the external auth database. If you don't automatically create accounts, you must still create accounts in some way. It's not possible to authenticate without a local account. This is just a question, and shouldn't perform any actions. return: bool |
allowPropChange( $prop = '' ) X-Ref |
Allow a property change? Properties are the same as preferences and use the same keys. 'Realname' 'Emailaddress' and 'Nickname' all reference this. param: string $prop return: bool |
allowPasswordChange() X-Ref |
Can users change their passwords? return: bool |
allowSetLocalPassword() X-Ref |
Should MediaWiki store passwords in its local database? return: bool |
setPassword( $user, $password ) X-Ref |
Set the given password in the authentication database. As a special case, the password may be set to null to request locking the password to an unusable value, with the expectation that it will be set later through a mail reset or other method. Return true if successful. param: User $user param: string $password Password. return: bool |
updateExternalDB( $user ) X-Ref |
Update user information in the external authentication database. Return true if successful. param: User $user return: bool |
updateExternalDBGroups( $user, $addgroups, $delgroups = array() X-Ref |
Update user groups in the external authentication database. Return true if successful. param: User $user param: array $addgroups Groups to add. param: array $delgroups Groups to remove. return: bool |
canCreateAccounts() X-Ref |
Check to see if external accounts can be created. Return true if external accounts can be created. return: bool |
addUser( $user, $password, $email = '', $realname = '' ) X-Ref |
Add a user to the external authentication database. Return true if successful. param: User $user Only the name should be assumed valid at this point param: string $password param: string $email param: string $realname return: bool |
strict() X-Ref |
Return true to prevent logins that don't authenticate here from being checked against the local database's password fields. This is just a question, and shouldn't perform any actions. return: bool |
strictUserAuth( $username ) X-Ref |
Check if a user should authenticate locally if the global authentication fails. If either this or strict() returns true, local authentication is not used. param: string $username Username. return: bool |
initUser( &$user, $autocreate = false ) X-Ref |
When creating a user account, optionally fill in preferences and such. For instance, you might pull the email address or real name from the external user database. The User object is passed by reference so it can be modified; don't forget the & on your function declaration. param: User $user param: bool $autocreate True if user is being autocreated on login |
getCanonicalName( $username ) X-Ref |
If you want to munge the case of an account name before the final check, now is your chance. param: string $username return: string |
getUserInstance( User &$user ) X-Ref |
Get an instance of a User object param: User $user return: AuthPluginUser |
domainList() X-Ref |
Get a list of domains (in HTMLForm options format) used. return: array |
Class: AuthPluginUser - X-Ref
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |