Refactor "Authentication" class with four main methods:

- withSession() - for auto authentication with Session/Cookie variables
- withOpenId() - for authentication with an OpenID account
- withPassword() - for authentication with Password
- setForUser() - for setting the user auth context of the current session

Refactor "Session" class - contains now "native" Session Management methods
This commit is contained in:
nupplaPhil 2019-12-03 22:29:37 +01:00
parent 18a3d18ba6
commit 96555a7385
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
13 changed files with 386 additions and 301 deletions

View file

@ -3,6 +3,7 @@
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Core\Authentication;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
@ -79,7 +80,9 @@ class Delegation extends BaseModule
Session::clear();
Session::setAuthenticatedForUser(self::getApp(), $user, true, true);
/** @var Authentication $authentication */
$authentication = self::getClass(Authentication::class);
$authentication->setForUser(self::getApp(), $user, true, true);
if ($limited_id) {
Session::set('submanage', $original_id);