Split auth stuff off into own context.

This commit is contained in:
flash 2023-09-08 00:43:00 +00:00
parent 0d0bd041a4
commit 3309f75592
11 changed files with 94 additions and 68 deletions
public

View file

@ -39,7 +39,7 @@ if(file_exists(MSZ_ROOT . '/.migrating')) {
exit;
}
$tokenPacker = $msz->createAuthTokenPacker();
$tokenPacker = $msz->getAuthContext()->createAuthTokenPacker();
if(filter_has_var(INPUT_COOKIE, 'msz_auth'))
$tokenInfo = $tokenPacker->unpack(filter_input(INPUT_COOKIE, 'msz_auth'));
@ -58,7 +58,7 @@ $userInfoReal = null;
if($tokenInfo->hasUserId() && $tokenInfo->hasSessionToken()) {
$users = $msz->getUsersContext()->getUsers();
$sessions = $msz->getSessions();
$sessions = $msz->getAuthContext()->getSessions();
$tokenBuilder = new AuthTokenBuilder($tokenInfo);
try {