$master->headers->
set( PlatformRequest::HEADER_CONTEXT_TOKEN,
$session->
get(PlatformRequest::HEADER_CONTEXT_TOKEN
) );
} public function updateSessionAfterLogin(CustomerLoginEvent
$event): void
{ $token =
$event->
getContextToken();
$this->
updateSession($token);
} public function updateSessionAfterLogout(): void
{ $newToken = Random::
getAlphanumericString(32
);
$this->
updateSession($newToken, true
);
} public function updateSession(string
$token, bool
$destroyOldSession = false
): void
{