Thruway\AbstractSession::setAuthenticated PHP Method

setAuthenticated() public method

Set athentication state (authenticated or not)
public setAuthenticated ( boolean $authenticated )
$authenticated boolean
    public function setAuthenticated($authenticated)
    {
        $this->authenticated = $authenticated;
    }

Usage Example

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);
 }
All Usage Examples Of Thruway\AbstractSession::setAuthenticated