. /** * User key auth method. * * @package auth_userkey * @copyright 2016 Dmitrii Metelkin (dmitriim@catalyst-au.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); /** * Shibboleth authentication plugin. */ class auth_plugin_userkey extends auth_plugin_base { /** * Constructor. */ public function __construct() { $this->authtype = 'userkey'; $this->config = get_config('auth/userkey'); } /** * Don't allow login using login form. * * @param string $username The username (with system magic quotes) * @param string $password The password (with system magic quotes) * * @return bool Authentication success or failure. */ public function user_login($username, $password) { return false; } /** * Don't store local passwords. * * @return bool True. */ public function prevent_local_passwords() { return true; } /** * Returns true if this authentication plugin is external. * * @return bool False. */ public function is_internal() { return false; } /** * The plugin can't change the user's password. * * @return bool False. */ public function can_change_password() { return false; } }