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';
51 $radius = radius_auth_open();
60 self::CONNECT_TIMEOUT,
65 radius_create_request($radius, RADIUS_ACCESS_REQUEST);
66 radius_put_attr($radius, RADIUS_USER_NAME, $this->
getCredentials()->getUsername());
67 radius_put_attr($radius, RADIUS_USER_PASSWORD, $this->
getCredentials()->getPassword());
71 $result = radius_send_request($radius);
74 case RADIUS_ACCESS_ACCEPT:
75 $this->
getLogger()->info(
'Radius authentication successful.');
82 case RADIUS_ACCESS_REJECT:
83 $this->
getLogger()->info(
'Radius authentication rejected with message: ' . radius_strerror($radius));
87 case RADIUS_ACCESS_CHALLENGE:
88 $this->
getLogger()->info(
'Radius authentication failed (access challenge): ' . radius_strerror($radius));
93 $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
static _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
const STATUS_AUTHENTICATED
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..