Skip to content

Commit

Permalink
Add test case for encrypted name id in encrypted assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
joonlabs committed Sep 11, 2024
1 parent 8448205 commit 748293e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/src/OneLogin/Saml2/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1823,4 +1823,12 @@ public function testIsValidSignUsingX509certMulti()
$response = new Response($settings, $xml);
$this->assertTrue($response->isValid());
}

public function testCanGetEncryptedNameIdInEncryptedAssertion()
{
$xml = file_get_contents(TEST_ROOT . '/data/responses/response_encrypted_nameid_encrypted_assertion.xml.base64');
$response = new Response($this->_settings, $xml);
$this->assertTrue($response->isValid());
$this->assertSame('[email protected]', $response->getNameId());
}
}

0 comments on commit 748293e

Please sign in to comment.