public function bootstrap() { $config = $this->getConfig(); $enabled = $config->get('cas-enabled'); if (in_array($enabled, array('all', 'staff'))) { require_once 'cas.php'; CasStaffAuthBackend::bootstrap($this->getConfig()); StaffAuthenticationBackend::register(new CasStaffAuthBackend()); } if (in_array($enabled, array('all', 'client'))) { require_once 'cas.php'; CasClientAuthBackend::bootstrap($this->getConfig()); UserAuthenticationBackend::register(new CasClientAuthBackend()); } }
} elseif (!($ts = $_config->lastModified($_POST['token'])) && $ost->getConfig()->getPwResetWindow() < time() - strtotime($ts)) { $errors['msg'] = __('Invalid reset token'); } elseif (!$staff->forcePasswdRest()) { $errors['msg'] = __('Unable to reset password'); } else { return $staff; } } function login($staff, $bk) { $_SESSION['_staff']['reset-token'] = $_POST['token']; Signal::send('auth.pwreset.login', $staff); return parent::login($staff, $bk); } } StaffAuthenticationBackend::register('PasswordResetTokenBackend'); /* * AuthToken Authentication Backend * * Provides auto-login facility for end users with valid link * * Ticket used to loggin is tracked durring the session this is * important in the future when auto-logins will be * limited to single ticket view. */ class AuthTokenAuthentication extends UserAuthenticationBackend { static $name = "Auth Token Authentication"; static $id = "authtoken"; function signOn() {
function bootstrap() { $config = $this->getConfig(); if ($config->get('multiauth-staff')) { StaffAuthenticationBackend::register(new StaffLDAPMultiAuthentication($config)); } if ($config->get('multiauth-client')) { UserAuthenticationBackend::register(new ClientLDAPMultiAuthentication($config)); } }