diff options
Diffstat (limited to 'lib/classes/auth_plugins/StudipAuthSSO.php')
| -rw-r--r-- | lib/classes/auth_plugins/StudipAuthSSO.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/classes/auth_plugins/StudipAuthSSO.php b/lib/classes/auth_plugins/StudipAuthSSO.php new file mode 100644 index 0000000..dd6af11 --- /dev/null +++ b/lib/classes/auth_plugins/StudipAuthSSO.php @@ -0,0 +1,51 @@ +<?php +# Lifter007: TODO +# Lifter003: TODO +# Lifter010: TODO +/* + * StudipAuthSSO.php - abstract base class for SSO auth plugins + * Copyright (c) 2007 Elmar Ludwig, Universitaet Osnabrueck + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +/* + * Abstract base class for SSO authentication plugins. + */ +abstract class StudipAuthSSO extends StudipAuthAbstract +{ + /** + * @var string the descriptive name of the authentication plugin + */ + public $plugin_fullname; + + /** + * @var string a short description, when present it is shown on the login page + */ + public $login_description; + + /** + * Return the current username. + */ + abstract function getUser (); + + /** + * Check whether this user can be authenticated. The default + * implementation just checks whether $username is not empty. + */ + function isAuthenticated ($username, $password) + { + return !empty($username); + } + + /** + * SSO auth plugins cannot determine if a username is used. + */ + function isUsedUsername ($username) + { + return false; + } +} |
