Skip to content
Snippets Groups Projects
Commit 7f6df92f authored by Brian Vuyk's avatar Brian Vuyk
Browse files

Use !in_array() for improved readability

parent 51cabde0
No related branches found
No related tags found
No related merge requests found
......@@ -587,8 +587,9 @@ class sspmod_saml_Message {
$found = FALSE;
$lastError = 'No SubjectConfirmation element in Subject.';
$validSCMethods = array(SAML2_Const::CM_BEARER, SAML2_Const::CM_HOK, SAML2_Const::CM_VOUCHES);
foreach ($assertion->getSubjectConfirmation() as $sc) {
if ($sc->Method !== SAML2_Const::CM_BEARER && $sc->Method !== SAML2_Const::CM_HOK && $sc->Method !== SAML2_Const::CM_VOUCHES) {
if (!in_array($sc->Method, $validSCMethods)) {
$lastError = 'Invalid Method on SubjectConfirmation: ' . var_export($sc->Method, TRUE);
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment