/**
* Set authenticated state
*
* @param boolean $authenticated
*/
public function setAuthenticated($authenticated)
{
// generally, there is no provisions in the WAMP specs to change from
// authenticated to unauthenticated
if ($this->authenticated && !$authenticated) {
$this->getManager()->error("Session changed from authenticated to unauthenticated");
}
// make sure the metaevent is only sent when changing from
// not-authenticate to authenticated
if ($authenticated && !$this->authenticated) {
// metaevent
$this->getRealm()->publishMeta('wamp.metaevent.session.on_join', [$this->getMetaInfo()]);
}
parent::setAuthenticated($authenticated);
}