本文整理汇总了PHP中Authenticator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Authenticator::__construct方法的具体用法?PHP Authenticator::__construct怎么用?PHP Authenticator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authenticator
的用法示例。
在下文中一共展示了Authenticator::__construct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param string $account_orgin Id of origin network
*
* @return void
*/
public function __construct($account_orgin)
{
// Call parent constructor
parent::__construct($account_orgin);
}
示例2: __construct
/**
* 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;
}
}
示例3: __construct
/**
* 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);
}
示例4: __construct
public function __construct(UserSession $Session)
{
// require UserSession instead of Session
parent::__construct($Session);
}