26 $this->
messages = array(
'sufficient' => array(),
'required' => array());
47 if (!isset($_PAM_HANDLERS[$this->policy]) ||
48 !is_array($_PAM_HANDLERS[$this->policy])) {
52 $authenticated =
false;
54 foreach ($_PAM_HANDLERS[$this->policy] as $v) {
61 $importance = $v->importance;
68 $authenticated =
true;
70 if ($importance ==
'required') {
71 $this->
messages[
'required'][] =
"$handler:failed";
74 $this->
messages[
'sufficient'][] =
"$handler:failed";
78 if ($importance ==
'required') {
79 $this->
messages[
'required'][] = $e->getMessage();
82 $this->
messages[
'sufficient'][] = $e->getMessage();
87 return $authenticated;
97 if (!empty($this->
messages[
'required'])) {
99 } elseif (!empty($this->
messages[
'sufficient'])) {
__construct($policy)
constructor
elgg global
Pointer to the global context.
authenticate($credentials=array())
Authenticate a set of credentials against a policy This function will process all registered PAM hand...
getFailureMessage()
Get a failure message to display to user.