yii\authclient\OpenId::getTrustRoot PHP Method

getTrustRoot() public method

public getTrustRoot ( ) : string
return string client trust root (realm).
    public function getTrustRoot()
    {
        if ($this->_trustRoot === null) {
            $this->_trustRoot = Yii::$app->getRequest()->getHostInfo();
        }
        return $this->_trustRoot;
    }

Usage Example

 /**
  * @depends testSetGet
  */
 public function testGetDefaults()
 {
     $client = new OpenId();
     $this->assertNotEmpty($client->getTrustRoot(), 'Unable to get default trust root!');
     $this->assertNotEmpty($client->getReturnUrl(), 'Unable to get default return URL!');
 }