25include_once(
"Auth/Auth.php");
45 if ($a_params[
"sessionName"] !=
"")
47 parent::Auth(
"", array(
"sessionName" => $a_params[
"sessionName"]));
54 include_once(
"./Services/CAS/lib/CAS.php");
56 $this->server_hostname = $a_params[
"server_hostname"];
57 $this->server_port = (int) $a_params[
"server_port"];
58 $this->server_uri = $a_params[
"server_uri"];
63 $this->server_port, (
string) $this->server_uri);
222 include_once(
'./Services/User/classes/class.ilObjUser.php');
225 if ($local_user !=
"")
242 $newUser[
"firstname"] = $local_user;
243 $newUser[
"lastname"] =
"";
245 $newUser[
"login"] = $local_user;
248 $newUser[
"passwd"] =
"";
252 $newUser[
"auth_mode"] =
"cas";
254 $newUser[
"profile_incomplete"] = 1;
257 $userObj->assignData($newUser);
258 $userObj->setTitle($userObj->getFullname());
259 $userObj->setDescription($userObj->getEmail());
262 $userObj->setLanguage(
$ilSetting->get(
"language"));
265 $userObj->setTimeLimitOwner(7);
266 $userObj->setTimeLimitUnlimited(1);
267 $userObj->setTimeLimitFrom(time());
268 $userObj->setTimeLimitUntil(time());
271 $userObj->setOwner(0);
273 $userObj->setActive(1);
275 $userObj->updateOwner();
278 $userObj->saveAsNew();
281 $userObj->writePrefs();
284 $rbacadmin->assignUser(
$ilSetting->get(
'cas_user_default_role'), $userObj->getId(),
true);
const AUTH_WRONG_LOGIN
Returned if container is unable to authenticate user/password pair.
setAuth($username)
Register variable in a session telling that the user has logged in successfully.
const AUTH_CAS_NO_ILIAS_USER
_generateLogin($a_login)
generate free login by starting with a default string and adding postfix numbers
ilCASAuth($a_params)
Constructor @access public.
checkCASAuth()
check cas autehntication
logout()
Register variable in a session telling that the user has logged in successfully.
login()
Checks if the current user is authenticated yet @access public.
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
$PHPCAS_CLIENT
This global variable is used by the interface class phpCAS.
forceAuthentication()
This method is called to force authentication if the user was not already authenticated.
getUser()
This method returns the CAS user's login name.
client($server_version, $server_hostname, $server_port, $server_uri, $start_session=true)
phpCAS client initializer.