29 require_once
'Auth/Container.php';
33 require_once
'PEAR.php';
82 if (!extension_loaded(
'kadm5')) {
88 if (isset($options[
'hostname'])) {
89 $this->options[
'hostname'] = $options[
'hostname'];
91 if (isset($options[
'realm'])) {
92 $this->options[
'realm'] = $options[
'realm'];
94 if (isset($options[
'timeout'])) {
95 $this->options[
'timeout'] = $options[
'timeout'];
97 if (isset($options[
'checkServer'])) {
98 $this->options[
'checkServer'] = $options[
'checkServer'];
101 if ($this->options[
'checkServer']) {
118 if ( ($username == NULL) || ($password == NULL) ) {
122 $server = $this->options[
'hostname'];
123 $realm = $this->options[
'realm'];
124 $check = @kadm5_init_with_password(
$server, $realm, $username, $password);
126 if ($check ==
false) {
142 $this->options[
'hostname'] =
'localhost';
143 $this->options[
'realm'] = NULL;
144 $this->options[
'timeout'] = 10;
145 $this->options[
'checkServer'] =
false;
157 $fp = @fsockopen ($this->options[
'hostname'], 88, $errno, $errstr, $this->options[
'timeout']);
158 if (is_resource($fp)) {
161 $message =
"Error connecting to Kerberos V server " 162 .$this->options[
'hostname'].
":".$this->options[
'port'];
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
_setDefaults()
Set some default options.
& raiseError($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
This method is a wrapper that returns an instance of the configured error class with this object's de...
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
_checkServer()
Check if the given server and port are reachable.
fetchData($username, $password)
Try to login to the KADM5 server.
Auth_Container_KADM5($options)
Constructor of the container class.