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... ');
64 $this->
getLogger()->error(
'Cas authentication failed with message: ' . $e->getMessage());
75 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
82 if (strlen($local_user)) {
83 $this->
getLogger()->debug(
'CAS authentication successful.');
89 if (!$this->
getSettings()->isUserCreationEnabled()) {
90 $this->
getLogger()->debug(
'User creation disabled. No valid local account found');
96 include_once
'./Services/CAS/classes/class.ilCASAttributeToUser.php';
98 $new_name = $importer->create($this->
getCredentials()->getUsername());
100 if (!strlen($new_name)) {
101 $this->
getLogger()->debug(
'User creation failed.');
117 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
124 include_once
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
128 $sync->forceCreation(
true);
131 $internal_account =
$sync->sync();
133 $this->
getLogger()->warning(
'Authentication failed with mesage: ' . $e->getMessage());
139 $this->
getLogger()->warning(
'User creation disabled. No valid local account found');
145 $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.
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 _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
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.
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.