All auth plugins need to add such code:
function checkAuthSession(&$params) {
...
if ($userid) {
$this->saveduser = usergetobject($userid);
if ($this->isSufficient()) {
$params['results'][$this->name] = FORGEAUTHAUTHORITATIVEACCEPT;
} else {
$params['results'][$this->name] = FORGEAUTHNOTAUTHORITATIVE;
}
} else {
$this->saveduser = NULL;
if ($this->isRequired()) {
$params['results'][$this->name] = FORGEAUTHAUTHORITATIVEREJECT;
} else {
$params['results'][$this->name] = FORGEAUTHNOTAUTHORITATIVE;
}
}
which is currently duplicated into several plugins. It would be nice to have a method setting this values in the ForgeAuthPlugin class.
|