function testAuthHasNecessaryFieldsForEqUserCreation()
 {
     $AUTH = new Auth_Base();
     $AUTH->authenticate(TESTINGUSER, TESTINGPASSWORD);
     $this->assertEqual($AUTH->username, Auth_Base::$TEST_USERNAME);
     $this->assertEqual($AUTH->fname, Auth_Base::$TEST_FNAME);
     $this->assertEqual($AUTH->lname, Auth_Base::$TEST_LNAME);
     $this->assertEqual($AUTH->sortname, Auth_Base::$TEST_SORTNAME);
     $this->assertEqual($AUTH->email, Auth_Base::$TEST_EMAIL);
     $this->assertEqual($AUTH->inst_groups, Auth_Base::$TEST_INST_GROUPS);
 }
 public function getInstGroupsFromAuthSource($username)
 {
     $group_names = parent::getInstGroupsFromAuthSource($username);
     if (count($group_names) > 0) {
         return $group_names;
     }
     //        echo "TODO: implement fetching of group names<br/>\n";
 }
Beispiel #3
0
<?php

session_start();
require __DIR__ . '/config/init.php';
/** @var PDO $app_dbo */
$app_dbo = load_module('database', true);
load_module('auth');
try {
    $auth_response = Auth_Base::attempt(array('username' => '*****@*****.**', 'password' => '123456'));
} catch (Exception $e) {
    $auth_response = $e->getMessage();
}
var_dump($auth_response);