|
| | __construct () |
| |
| | forceAuthentication ($username, $status, $auth) |
| | Force CAS authentication. More...
|
| |
| | loginObserver ($a_username, $a_auth) |
| |
| | fetchData ($a_username, $a_password, $isChallengeResponse=false) |
| |
| | Auth_Container () |
| | Constructor. More...
|
| |
| | fetchData ($username, $password, $isChallengeResponse=false) |
| | Fetch data from storage container. More...
|
| |
| | verifyPassword ($password1, $password2, $cryptType="md5") |
| | Crypt and verfiy the entered password. More...
|
| |
| | supportsChallengeResponse () |
| | Returns true if the container supports Challenge Response password authentication. More...
|
| |
| | getCryptType () |
| | Returns the crypt current crypt type of the container. More...
|
| |
| | listUsers () |
| | List all users that are available from the storage container. More...
|
| |
| | getUser ($username) |
| | Returns a user assoc array. More...
|
| |
| | addUser ($username, $password, $additional=null) |
| | Add a new user to the storage container. More...
|
| |
| | removeUser ($username) |
| | Remove user from the storage container. More...
|
| |
| | changePassword ($username, $password) |
| | Change password for user in the storage container. More...
|
| |
| | log ($message, $level=AUTH_LOG_DEBUG) |
| | Log a message to the Auth log. More...
|
| |
| | loginObserver ($a_username, $a_auth) |
| | Called after successful login. More...
|
| |
| | failedLoginObserver ($a_username, $a_auth) |
| | Called after failed login. More...
|
| |
| | checkAuthObserver ($a_username, $a_auth) |
| | Called after check auth requests. More...
|
| |
| | logoutObserver ($a_username, $a_auth) |
| | Called after logout. More...
|
| |
| | supportsCaptchaVerification () |
| | Returns whether or not the auth container supports the verification of captchas This should be true for those auth methods, which are available in the default login form. More...
|
| |
CAS authentication
- Author
- Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
- Version
- $Id$
Definition at line 14 of file class.ilAuthContainerCAS.php.
| ilAuthContainerCAS::loginObserver |
( |
|
$a_username, |
|
|
|
$a_auth |
|
) |
| |
- See also
- ilAuthContainerBase::loginObserver()
Definition at line 52 of file class.ilAuthContainerCAS.php.
References $ilLog, $ilSetting, $PHPCAS_CLIENT, ilObjUser\_checkExternalAuthAccount(), ilAuthUtils\_generateLogin(), AUTH_CAS, AUTH_CAS_NO_ILIAS_USER, AUTH_WRONG_LOGIN, handleLDAPDataSource(), IL_PASSWD_MD5, and ilLDAPServer\isDataSourceActive().
56 $ilLog->write(__METHOD__.
': Successful CAS login.');
59 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
65 include_once(
"./Services/CAS/lib/CAS.php");
66 if ($PHPCAS_CLIENT->getUser() !=
"")
68 $username = $PHPCAS_CLIENT->getUser();
69 $ilLog->write(__METHOD__.
': Username: '.$username);
72 include_once(
'./Services/User/classes/class.ilObjUser.php');
75 if ($local_user !=
"")
77 $a_auth->setAuth($local_user);
81 if (!$ilSetting->get(
"cas_create_users"))
92 $newUser[
"firstname"] = $local_user;
93 $newUser[
"lastname"] =
"";
95 $newUser[
"login"] = $local_user;
98 $newUser[
"passwd"] =
"";
102 $newUser[
"auth_mode"] =
"cas";
103 $newUser[
"ext_account"] = $username;
104 $newUser[
"profile_incomplete"] = 1;
107 $userObj->assignData($newUser);
108 $userObj->setTitle($userObj->getFullname());
109 $userObj->setDescription($userObj->getEmail());
112 $userObj->setLanguage($ilSetting->get(
"language"));
115 $userObj->setTimeLimitOwner(7);
116 $userObj->setTimeLimitUnlimited(1);
117 $userObj->setTimeLimitFrom(time());
118 $userObj->setTimeLimitUntil(time());
121 $userObj->setOwner(0);
123 $userObj->setActive(1);
125 $userObj->updateOwner();
128 $userObj->saveAsNew();
131 $userObj->writePrefs();
134 $rbacadmin->assignUser($ilSetting->get(
'cas_user_default_role'), $userObj->getId(),
true);
137 $a_auth->setAuth($local_user);
143 $ilLog->write(__METHOD__.
': Login failed.');
handleLDAPDataSource($a_auth, $ext_account)
Handle ldap as data source.
$PHPCAS_CLIENT
This global variable is used by the interface class phpCAS.
const AUTH_CAS_NO_ILIAS_USER
static isDataSourceActive($a_auth_mode)
Check if a data source is active for a specific auth mode ilDB $ilDB.
_generateLogin($a_login)
generate free login by starting with a default string and adding postfix numbers
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
const AUTH_WRONG_LOGIN
Returned if container is unable to authenticate user/password pair.