ILIAS
eassessment Revision 61809
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
ILIAS
Todo List
Deprecated List
Modules
Namespaces
Data Structures
Files
File List
classes
cron
include
Modules
Services
AccessControl
Accessibility
Accordion
Administration
AdvancedEditing
AdvancedMetaData
AuthApache
Authentication
AuthShibboleth
Block
Booking
Cache
Calendar
CAS
Certificate
Clipboard
Component
Contact
Container
ContainerReference
COPage
CopyWizard
Database
DataSet
Dom
EventHandling
Excel
Exceptions
Export
Feedback
Feeds
FileSystemStorage
Form
Frameset
GoogleMaps
Help
Html
InfoScreen
Init
InsertChar
JSON
Language
LDAP
License
LinkChecker
LoadTest
Locator
Logging
Mail
MainMenu
Math
MediaObjects
Membership
MetaData
Migration
Navigation
News
Notes
Notification
Object
OpenId
OrgUnit
Payment
PDF
PEAR
lib
Auth
Container
Array.php
DB.php
DBLite.php
File.php
IMAP.php
KADM5.php
LDAP.php
MDB.php
MDB2.php
Multiple.php
NetVPOPMaild.php
PEAR.php
POP3.php
RADIUS.php
SAP.php
SMBPasswd.php
SOAP.php
SOAP5.php
vpopmail.php
Frontend
Anonymous.php
Auth.php
Container.php
Controller.php
HTTP.php
RADIUS.php
HTML
HTTP
Log
Mail
MDB2
Net
OLE
PEAR
Spreadsheet
XML
Auth.php
Log.php
Mail.php
MDB2.php
PEAR.php
ReleasesInfo.php
System.php
PermanentLink
PersonalDesktop
PHPUnit
PrivacySecurity
QTI
Radius
Rating
Registration
Repository
RTE
Search
SOAPAuth
Style
Survey
Table
Tagging
Tracking
Transformation
Tree
UIComponent
User
Utilities
WebAccessChecker
WebDAV
WebServices
Workflow
XHTMLPage
XHTMLValidator
Xml
YUI
setup
sso
webservice
calendar.php
confirmReg.php
error.php
feed.php
goto.php
ilias.php
index.php
login.php
logout.php
payment.php
privfeed.php
pwassist.php
register.php
repository.php
rootindex.php
sessioncheck.php
shib_login.php
shib_logout.php
start.php
studip_referrer.php
webdav.php
Globals
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
KADM5.php
Go to the documentation of this file.
1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
3
29
require_once
'Auth/Container.php'
;
33
require_once
'PEAR.php'
;
34
55
class
Auth_Container_KADM5
extends
Auth_Container
{
56
57
// {{{ properties
58
63
var
$options
= array();
64
65
// }}}
66
// {{{ Auth_Container_KADM5()
67
81
function
Auth_Container_KADM5
(
$options
) {
82
if
(!extension_loaded(
'kadm5'
)) {
83
return
PEAR::raiseError
(
"Cannot use Kerberos V authentication, KADM5 extension not loaded!"
, 41,
PEAR_ERROR_DIE
);
84
}
85
86
$this->
_setDefaults
();
87
88
if
(isset(
$options
[
'hostname'
])) {
89
$this->options[
'hostname'
] =
$options
[
'hostname'
];
90
}
91
if
(isset(
$options
[
'realm'
])) {
92
$this->options[
'realm'
] =
$options
[
'realm'
];
93
}
94
if
(isset(
$options
[
'timeout'
])) {
95
$this->options[
'timeout'
] =
$options
[
'timeout'
];
96
}
97
if
(isset(
$options
[
'checkServer'
])) {
98
$this->options[
'checkServer'
] =
$options
[
'checkServer'
];
99
}
100
101
if
($this->options[
'checkServer'
]) {
102
$this->
_checkServer
();
103
}
104
}
105
106
// }}}
107
// {{{ fetchData()
108
116
function
fetchData
($username, $password) {
117
$this->
log
(
'Auth_Container_KADM5::fetchData() called.'
,
AUTH_LOG_DEBUG
);
118
if
( ($username == NULL) || ($password == NULL) ) {
119
return
false
;
120
}
121
122
$server
= $this->options[
'hostname'
];
123
$realm = $this->options[
'realm'
];
124
$check = @kadm5_init_with_password(
$server
, $realm, $username, $password);
125
126
if
($check ==
false
) {
127
return
false
;
128
}
else
{
129
return
true
;
130
}
131
}
132
133
// }}}
134
// {{{ _setDefaults()
135
141
function
_setDefaults
() {
142
$this->options[
'hostname'
] =
'localhost'
;
143
$this->options[
'realm'
] = NULL;
144
$this->options[
'timeout'
] = 10;
145
$this->options[
'checkServer'
] =
false
;
146
}
147
148
// }}}
149
// {{{ _checkServer()
150
156
function
_checkServer
() {
157
$fp = @fsockopen ($this->options[
'hostname'
], 88, $errno, $errstr, $this->options[
'timeout'
]);
158
if
(is_resource($fp)) {
159
@fclose($fp);
160
}
else
{
161
$message =
"Error connecting to Kerberos V server "
162
.$this->options[
'hostname'
].
":"
.$this->options[
'port'
];
163
return
PEAR::raiseError
($message, 41,
PEAR_ERROR_DIE
);
164
}
165
}
166
167
// }}}
168
169
}
170
171
?>
Services
PEAR
lib
Auth
Container
KADM5.php
Generated on Mon Apr 25 2016 19:01:38 for ILIAS by
1.8.1.2 (using
Doxyfile
)