OneLogin_Saml2_Response::getNameId PHP Метод

getNameId() публичный Метод

Gets the NameID provided by the SAML response from the IdP.
public getNameId ( ) : string
Результат string Name ID Value
    public function getNameId()
    {
        $nameIdvalue = null;
        $nameIdData = $this->getNameIdData();
        if (!empty($nameIdData) && isset($nameIdData['Value'])) {
            $nameIdvalue = $nameIdData['Value'];
        }
        return $nameIdvalue;
    }

Usage Example

Пример #1
0
 /**
  * Tests the getNameId method of the OneLogin_Saml2_Response
  * Case valid signed response, signed assertion
  *
  * @covers OneLogin_Saml2_Response::getNameId
  */
 public function testResponseAndAssertionSigned()
 {
     // Both the Response and the Asseretion are signed
     $message = file_get_contents(TEST_ROOT . '/data/responses/simple_saml_php.xml');
     $response = new OneLogin_Saml2_Response($this->_settings, base64_encode($message));
     $this->assertEquals('*****@*****.**', $response->getNameId());
 }
All Usage Examples Of OneLogin_Saml2_Response::getNameId