get_saml_attributes() public method

Retrieves an Array with the logged user data.
public get_saml_attributes ( ) : array
return array
コード例 #1
0
ファイル: ResponseTest.php プロジェクト: DbyD/cruk
 public function testGetAttributes()
 {
     $xml = file_get_contents(TEST_ROOT . '/data/responses/response1.xml.base64');
     $response = new OneLogin_Saml_Response($this->_settings, $xml);
     $expectedAttributes = array('uid' => array('demo'), 'another_value' => array('value'));
     $this->assertEquals($expectedAttributes, $response->getAttributes());
     $this->assertEquals($response->getAttributes(), $response->get_saml_attributes());
     // An assertion that has no attributes should return an empty array when asked for the attributes
     $assertion = file_get_contents(TEST_ROOT . '/data/responses/response2.xml.base64');
     $response = new OneLogin_Saml_Response($this->_settings, $assertion);
     $this->assertEmpty($response->getAttributes());
 }