4include_once
'./Services/Authentication/classes/Provider/class.ilAuthProvider.php';
5include_once
'./Services/Authentication/interfaces/interface.ilAuthProviderInterface.php';
29 include_once
'./Services/CAS/classes/class.ilCASSettings.php';
46 include_once
'./Services/CAS/lib/CAS.php';
49 $this->
getLogger()->debug(
'Starting cas authentication attempt... ');
65 $this->
getLogger()->error(
'Cas authentication failed with message: ' . $e->getMessage());
77 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
85 if(strlen($local_user))
87 $this->
getLogger()->debug(
'CAS authentication successful.');
95 $this->
getLogger()->debug(
'User creation disabled. No valid local account found');
101 include_once
'./Services/CAS/classes/class.ilCASAttributeToUser.php';
103 $new_name = $importer->create($this->
getCredentials()->getUsername());
105 if(!strlen($new_name))
107 $this->
getLogger()->debug(
'User creation failed.');
123 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
130 include_once
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
132 $sync->setExternalAccount($this->
getCredentials()->getUsername());
133 $sync->setUserData(array());
134 $sync->forceCreation(
true);
137 $internal_account = $sync->sync();
139 catch(UnexpectedValueException $e) {
140 $this->
getLogger()->warning(
'Authentication failed with mesage: ' . $e->getMessage());
147 $this->
getLogger()->warning(
'User creation disabled. No valid local account found');
154 $this->
getLogger()->warning(
'User creation disabled. No valid local account found');
An exception for terminatinating execution or to throw for unit testing.
CAS authentication provider.
handleLDAPDataSource(\ilAuthStatus $status)
Handle user data synchonization by ldap data source.
doAuthentication(\ilAuthStatus $status)
Do authentication.bool
__construct(ilAuthCredentials $credentials)
ilAuthProviderCAS constructor.
Base class for authentication providers (radius, ldap, apache, ...)
handleAuthenticationFail(ilAuthStatus $status, $a_reason)
Handle failed authentication.
Auth status implementation.
setStatus($a_status)
Set auth status.
const STATUS_AUTHENTICATED
CAS user creation helper.
static getInstance()
Get singleton instance.
Description of ilLDAPAccountMigrationRequiredException.
static getDataSource($a_auth_mode)
static getInstanceByServerId($a_server_id)
Get instance by server id.
static isDataSourceActive($a_auth_mode)
Check if a data source is active for a specific auth mode @global ilDB $ilDB.
Description of ilLDAPSyncronisationException.
Synchronization of user accounts used in auth container ldap, radius , cas,...
static _lookupId($a_user_str)
Lookup id by login.
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
static getUser()
This method returns the CAS user's login name.
static forceAuthentication()
This method is called to force authentication if the user was not already authenticated.
static setNoCasServerValidation()
Set no SSL validation for the CAS server.
static setDebug($filename='')
Set/unset debug mode.
static setVerbose($verbose)
Enable verbose errors messages in the website output This is a security relevant since internal statu...
static client($server_version, $server_hostname, $server_port, $server_uri, $changeSessionID=true)
phpCAS client initializer.
Interface of auth credentials.
Standard interface for auth provider implementations.