예제 #1
0
 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());
     }
 }
예제 #2
0
        $_SESSION['_client']['reset-token'] = $_POST['token'];
        Signal::send('auth.pwreset.login', $client);
        return parent::login($client, $bk);
    }
}
UserAuthenticationBackend::register('ClientPasswordResetTokenBackend');
class ClientAcctConfirmationTokenBackend extends UserAuthenticationBackend
{
    static $id = "confirm.client";
    function supportsInteractiveAuthentication()
    {
        return false;
    }
    function signOn($errors = array())
    {
        global $ost;
        if (!isset($_GET['token'])) {
            return false;
        } elseif (!($_config = new Config('pwreset'))) {
            return false;
        } elseif (!($id = $_config->get($_GET['token']))) {
            return false;
        } elseif (!($acct = ClientAccount::lookup(array('user_id' => $id))) || !$acct->getId() || $id != $acct->getUserId() || !($client = new ClientSession(new EndUser($acct->getUser())))) {
            return false;
        } else {
            return $client;
        }
    }
}
UserAuthenticationBackend::register('ClientAcctConfirmationTokenBackend');
예제 #3
0
 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));
     }
 }