Set athentication state (authenticated or not)
public setAuthenticated ( boolean $authenticated ) | ||
$authenticated | boolean |
/** * 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); }
/** * Set authenticated state * * @param boolean $authenticated */ public function setAuthenticated($authenticated) { // 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); }
/** * Set authenticated state * * @param boolean $authenticated */ public function setAuthenticated($authenticated) { // make sure the metaevent is only sent when changing from // not-authenticate to authenticated if ($authenticated && !$this->authenticated) { // metaevent $metaInfo = $this->getMetaInfo(); $this->getRealm()->publishMeta('wamp.metaevent.session.on_join', [$metaInfo]); Logger::info($this, "Session joined: " . json_encode($metaInfo)); } parent::setAuthenticated($authenticated); }