/** * Constructor * * @param string $account_orgin Id of origin network * * @return void */ public function __construct($account_orgin) { // Call parent constructor parent::__construct($account_orgin); }
/** * AuthenticatorRadius constructor * * Example: new AuthenticatorRadius(IDRC_ACCOUNT_ORIGIN, "192.168.0.11", * 1812, 1813, "secret_key", "CHAP_MD5"); * * @param string $account_orgin The network ID * @param string $host Hostname of the RADIUS server * @param int $auth_port Authentication port of the RADIUS server * @param int $acct_port Accounting port of the RADIUS server * @param string $secret_key The secret key between between this * client and the server * @param string $encryption_method The encryption method choosen for the * requests * * @return void */ public function __construct($account_orgin, $host = "localhost", $auth_port = 1812, $acct_port = 1813, $secret_key = "", $encryption_method = "CHAP_MD5") { // Call parent constructor parent::__construct($account_orgin); if (Dependency::check("Auth_RADIUS")) { /** * Including PEAR RADIUS and CHAP MD5 interface classes */ require_once "Auth/RADIUS.php"; require_once "Crypt/CHAP.php"; /* * Store RADIUS server parameters * * Defaults to localhost:0 with MD5 CHAP encryption * * Setting port to 0 will get default RADIUS Auth service port (either * 1645 or 1812) */ $this->mRadius_hostname = $host; $this->mRadius_auth_port = $auth_port; $this->mRadius_acct_port = $acct_port; $this->mRadius_secret_key = $secret_key; $this->mRadius_encryption_method = $encryption_method; } }
/** * AuthenticatorLDAP constructor * * Example: new AuthenticatorLDAP(IDRC_ACCOUNT_ORIGIN, '192.168.0.11', * 'company.com', 'password', 'mail'); * * @param string $account_orgin The network ID * @param string $host Hostname of the LDAP server * @param string $rdn The Relative Distinguished Name of the LDAP * server * @param string $rdn The Relative Distinguished Name of the LDAP * server * @param string $pass The password of the LDAP server * @param string $o The base dn of the LDAP server * @param string $filter It's the field that will be used in the * LDAP search, i.e.: uid, mail, name server * * @return void */ public function __construct($account_orgin, $host, $rdn, $pass, $o, $filter) { // Call parent constructor parent::__construct($account_orgin); $this->mldap_hostname = $host; $this->mldap_filter = $filter; $this->mldap_o = $o; $this->mldap_rdn = trim($rdn); $this->mldap_pass = trim($pass); }
public function __construct(UserSession $Session) { // require UserSession instead of Session parent::__construct($Session); }