コード例 #1
0
ファイル: Client.php プロジェクト: duanejeffers/Thruway
 /**
  * @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()));
 }
コード例 #2
0
ファイル: Client.php プロジェクト: voryx/thruway
 /**
  * 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));
 }
コード例 #3
0
ファイル: Client.php プロジェクト: pacho104/redbpim
 /**
  * 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, []));
 }