ShibAuthPlugin Class Reference
List of all members.
Detailed Description
Version 1.2.5 (Works out of box with MW 1.7 or above)
Authentication Plugin for Shibboleth (http://shibboleth.internet2.edu) Derived from AuthPlugin.php Much of the commenting comes straight from AuthPlugin.php
Portions Copyright 2006, 2007 Regents of the University of California. Portions Copyright 2007, 2008 Steven Langenaken Released under the GNU General Public License
Documentation at http://www.mediawiki.org/wiki/Extension:Shibboleth_Authentication Project IRC Channel: sdcolleges on irc.freenode.net
Extension Maintainer: * Steven Langenaken - Added assertion support, more robust https checking, bugfixes for lazy auth, ShibUpdateUser hook Extension Developers: * D.J. Capelis - Developed initial version of the extension
Member Function Documentation
ShibAuthPlugin::addUser |
( |
$ |
user, |
|
|
$ |
password, |
|
|
$ |
email = '' , |
|
|
$ |
realname = '' | |
|
) |
| | |
Add a user to the external authentication database. Return true if successful.
- Parameters:
-
| User | $user |
| string | $password |
- Returns:
- bool public
ShibAuthPlugin::allowPasswordChange |
( |
|
) |
|
Can users change their passwords?
- Returns:
- bool
ShibAuthPlugin::authenticate |
( |
$ |
username, |
|
|
$ |
password | |
|
) |
| | |
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).
- Parameters:
-
| string | $username |
| string | $password |
- Returns:
- bool public
ShibAuthPlugin::autoCreate |
( |
|
) |
|
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.
- Returns:
- bool public
ShibAuthPlugin::canCreateAccounts |
( |
|
) |
|
Check to see if external accounts can be created. Return true if external accounts can be created.
- Returns:
- bool public
ShibAuthPlugin::getCanonicalName |
( |
$ |
username |
) |
|
If you want to munge the case of an account name before the final check, now is your chance.
ShibAuthPlugin::initUser |
( |
&$ |
user, |
|
|
$ |
autocreate = false | |
|
) |
| | |
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.
- Parameters:
-
ShibAuthPlugin::modifyUITemplate |
( |
&$ |
template, |
|
|
&$ |
type | |
|
) |
| | |
Modify options in the login template.
- Parameters:
-
| UserLoginTemplate | $template public |
ShibAuthPlugin::setDomain |
( |
$ |
domain |
) |
|
Set the domain this plugin is supposed to use when authenticating.
- Parameters:
-
ShibAuthPlugin::setPassword |
( |
$ |
user, |
|
|
$ |
password | |
|
) |
| | |
Set the given password in the authentication database. Return true if successful.
- Parameters:
-
- Returns:
- bool public
ShibAuthPlugin::strict |
( |
|
) |
|
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.
- Returns:
- bool public
ShibAuthPlugin::updateExternalDB |
( |
$ |
user |
) |
|
Update user information in the external authentication database. Return true if successful.
- Parameters:
-
- Returns:
- bool public
ShibAuthPlugin::updateUser |
( |
&$ |
user |
) |
|
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.
- Parameters:
-
ShibAuthPlugin::userExists |
( |
$ |
username |
) |
|
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).
- Parameters:
-
- Returns:
- bool public
ShibAuthPlugin::validDomain |
( |
$ |
domain |
) |
|
Check to see if the specific domain is a valid domain.
- Parameters:
-
- Returns:
- bool public
The documentation for this class was generated from the following file:
- extensions/Shibboleth/ShibAuthPlugin.php