class SamlSPResponse in SAML Service Provider 3.x
Same name and namespace in other branches
- 8.3 src/SAML/SamlSPResponse.php \Drupal\saml_sp\SAML\SamlSPResponse
- 8.2 src/SAML/SamlSPResponse.php \Drupal\saml_sp\SAML\SamlSPResponse
- 4.x src/SAML/SamlSPResponse.php \Drupal\saml_sp\SAML\SamlSPResponse
Provides the response.
Hierarchy
- class \Drupal\saml_sp\SAML\SamlSPResponse extends \OneLogin\Saml2\Response
Expanded class hierarchy of SamlSPResponse
File
- src/
SAML/ SamlSPResponse.php, line 10
Namespace
Drupal\saml_sp\SAMLView source
class SamlSPResponse extends Response {
/**
* Verifies that the document has the expected signed nodes.
*/
public function validateSignedElements($signedElements) {
if (count($signedElements) > 2) {
return FALSE;
}
$ocurrence = array_count_values($signedElements);
if (in_array('samlp:Response', $signedElements) && $ocurrence['samlp:Response'] > 1 || in_array('saml:Assertion', $signedElements) && $ocurrence['saml:Assertion'] > 1 || in_array('Assertion', $signedElements) && $ocurrence['Assertion'] > 1 || !in_array('samlp:Response', $signedElements) && !in_array('saml:Assertion', $signedElements) && !in_array('Assertion', $signedElements)) {
return FALSE;
}
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SamlSPResponse:: |
public | function | Verifies that the document has the expected signed nodes. |