setAuthenticated() public method

Set athentication state (authenticated or not)
public setAuthenticated ( boolean $authenticated )
$authenticated boolean
Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 3
0
 /**
  * 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);
 }