2 BobRay
It is possible to authorize a user without a password. For beta I’m just using a username for authorization, but later I will have my own checks that will make this way more secure(also it is based on complete security of the integrated site and of the process on exchanging data. But if it is not secure - it is not my trouble).
So the basic method is
/* part from Login.Login. */
$login = $modx->getService('login','Login',$corePath.'model/login/',$scriptProperties);
if (!is_object($login) || !($login instanceof Login)) return '';
$loginContext = $modx->context->get('key');
/* running the login process */
$response = $login->executeProcessor(array(
'action' => 'login',
'location' => 'security',
'login_context' => $loginContext,
'rememberme' => true,
'mycheck' => true, // my additional variable, that is used to skip modx original validation
'username' => 'tester_30' // later this will be a $username, that will be picked by uid from OpenID-service
));
And there(core->model->modx->processors->security->login.php) must be checks after each $rt = $modx->invokeEvent("OnBeforeWebLogin", $onBeforeLoginParams);
There are only 2 of them, and you need to make $rt value true, so :
else {
$rt = $modx->invokeEvent("OnBeforeWebLogin", $onBeforeLoginParams);
if($scriptProperties['mycheck']) {$rt[] = true;}
}
this will make all modx checks be passed by default if you have set mycheck.