mirror of
https://github.com/friendica/friendica
synced 2025-04-27 06:30:12 +00:00
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:
parent
18a3d18ba6
commit
96555a7385
13 changed files with 386 additions and 301 deletions
|
@ -3,6 +3,7 @@
|
|||
namespace Friendica\Module\TwoFactor;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Authentication;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
|
@ -41,7 +42,9 @@ class Recovery extends BaseModule
|
|||
notice(L10n::t('Remaining recovery codes: %d', RecoveryCode::countValidForUser(local_user())));
|
||||
|
||||
// Resume normal login workflow
|
||||
Session::setAuthenticatedForUser($a, $a->user, true, true);
|
||||
/** @var Authentication $authentication */
|
||||
$authentication = self::getClass(Authentication::class);
|
||||
$authentication->setForUser($a, $a->user, true, true);
|
||||
} else {
|
||||
notice(L10n::t('Invalid code, please retry.'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue