Split auth stuff off into own context.
This commit is contained in:
parent
0d0bd041a4
commit
3309f75592
11 changed files with 94 additions and 68 deletions
public
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue