Example #1
0
 /**
  * @param ClientSession $session
  */
 public function startSession(ClientSession $session)
 {
     $details = ["roles" => ["publisher" => new \stdClass(), "subscriber" => new \stdClass(), "caller" => new \stdClass(), "callee" => new \stdClass()]];
     /** @var ClientAuthenticationInterface $ca */
     foreach ($this->clientAuthenticators as $ca) {
         $this->authMethods = array_merge($this->authMethods, $ca->getAuthMethods());
     }
     $details["authmethods"] = $this->authMethods;
     $details["authid"] = $this->authId;
     $this->addRole(new Callee($this->getLogger()))->addRole(new Caller())->addRole(new Publisher())->addRole(new Subscriber());
     $session->setRealm($this->realm);
     $session->sendMessage(new HelloMessage($session->getRealm(), $details, array()));
 }
Example #2
0
 /**
  * Start client session
  *
  * @param \Thruway\ClientSession $session
  */
 public function startSession(ClientSession $session)
 {
     $this->addRole(new Callee())->addRole(new Caller())->addRole(new Publisher())->addRole(new Subscriber());
     $details = (object) ["roles" => $this->getRoleInfoObject()];
     $details->authmethods = $this->authMethods;
     $details->authid = $this->authId;
     $session->setRealm($this->realm);
     $session->sendMessage(new HelloMessage($session->getRealm(), $details));
 }
Example #3
0
 /**
  * Start client session
  *
  * @param \Thruway\ClientSession $session
  */
 public function startSession(ClientSession $session)
 {
     $details = ["roles" => ["publisher" => new \stdClass(), "subscriber" => new \stdClass(), "caller" => new \stdClass(), "callee" => new \stdClass()]];
     $details["authmethods"] = $this->authMethods;
     $details["authid"] = $this->authId;
     $this->addRole(new Callee())->addRole(new Caller())->addRole(new Publisher())->addRole(new Subscriber());
     $session->setRealm($this->realm);
     $session->sendMessage(new HelloMessage($session->getRealm(), $details, []));
 }