5 include_once
'./Services/Authentication/classes/Provider/class.ilAuthProvider.php';
6 include_once
'./Services/Authentication/interfaces/interface.ilAuthProviderInterface.php';
7 include_once
'./Services/Authentication/interfaces/interface.ilAuthProviderAccountMigrationInterface.php';
30 parent::__construct($credentials);
32 include_once
'./Services/Radius/classes/class.ilRadiusSettings.php';
52 $radius = radius_auth_open();
56 $this->
getLogger()->debug(
'Using: ' .
$server.
':'. $this->settings->getPort());
62 self::CONNECT_TIMEOUT,
67 radius_create_request($radius, RADIUS_ACCESS_REQUEST);
68 radius_put_attr($radius, RADIUS_USER_NAME, $this->
getCredentials()->getUsername());
69 radius_put_attr($radius, RADIUS_USER_PASSWORD, $this->
getCredentials()->getPassword());
73 $result = radius_send_request($radius);
77 case RADIUS_ACCESS_ACCEPT:
78 $this->
getLogger()->info(
'Radius authentication successful.');
85 case RADIUS_ACCESS_REJECT:
86 $this->
getLogger()->info(
'Radius authentication rejected with message: ' . radius_strerror($radius));
90 case RADIUS_ACCESS_CHALLENGE:
91 $this->
getLogger()->info(
'Radius authentication failed (access challenge): ' . radius_strerror($radius));
96 $this->
getLogger()->error(
'Radius authentication failed with message: ' . radius_strerror($radius));
Interface of auth credentials.
getExternalAccountName()
get external account name
Description of class interface.
getUserAuthModeName()
get user auth mode name
Description of class class.
createNewAccount(\ilAuthStatus $status)
create new account
static _lookupId($a_user_str)
Lookup id by login.
setAuthenticatedUserId($a_id)
__construct(\ilAuthCredentials $credentials)
Base class for authentication providers (radius, ldap, apache, ...)
Standard interface for auth provider implementations.
setStatus($a_status)
Set auth status.
doAuthentication(\ilAuthStatus $status)
do authentication
static _getInstance()
singleton get instance
const STATUS_AUTHENTICATED
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.
getTriggerAuthMode()
get trigger auth mode
Auth status implementation.
migrateAccount(ilAuthStatus $status)
Migrate existing account to radius authentication Create new account..