4 include_once
'./Services/Authentication/classes/Provider/class.ilAuthProvider.php';
5 include_once
'./Services/Authentication/interfaces/interface.ilAuthProviderInterface.php';
28 parent::__construct($credentials);
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';
133 $sync->setUserData(
array());
134 $sync->forceCreation(
true);
137 $internal_account = $sync->sync();
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');
Description of ilLDAPSyncronisationException.
static forceAuthentication()
This method is called to force authentication if the user was not already authenticated.
Interface of auth credentials.
static getUser()
This method returns the CAS user's login name.
CAS authentication provider.
Synchronization of user accounts used in auth container ldap, radius , cas,...
handleLDAPDataSource(\ilAuthStatus $status)
Handle user data synchonization by ldap data source.
static _lookupId($a_user_str)
Lookup id by login.
setExternalAccount($a_ext)
Set external account (unique for each auth mode)
Description of ilLDAPAccountMigrationRequiredException.
CAS user creation helper.
static getInstanceByServerId($a_server_id)
Get instance by server id.
setAuthenticatedUserId($a_id)
Base class for authentication providers (radius, ldap, apache, ...)
Standard interface for auth provider implementations.
static isDataSourceActive($a_auth_mode)
Check if a data source is active for a specific auth mode ilDB $ilDB.
setStatus($a_status)
Set auth status.
doAuthentication(\ilAuthStatus $status)
Do authentication.Authentication status bool
static getDataSource($a_auth_mode)
Create styles array
The data for the language used.
static setVerbose($verbose)
Enable verbose errors messages in the website output This is a security relevant since internal statu...
const STATUS_AUTHENTICATED
__construct(ilAuthCredentials $credentials)
ilAuthProviderCAS constructor.
static setDebug($filename='')
Set/unset debug mode.
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
handleAuthenticationFail(ilAuthStatus $status, $a_reason)
Handle failed authentication.
static setNoCasServerValidation()
Set no SSL validation for the CAS server.
Auth status implementation.
static client($server_version, $server_hostname, $server_port, $server_uri, $changeSessionID=true)
phpCAS client initializer.
static getInstance()
Get singleton instance.