File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424use SimpleSAML \Logger ;
2525use SimpleSAML \Module \saml \Error as SAMLError ;
2626use SimpleSAML \SAML2 \Constants ;
27+ use SimpleSAML \SAML2 \XML \Comparison ;
2728use SimpleSAML \Utils ;
2829
2930/**
@@ -505,12 +506,11 @@ public static function buildAuthnRequest(
505506
506507 if ($ spMetadata ->hasValue ('AuthnContextClassRef ' )) {
507508 $ accr = $ spMetadata ->getArrayizeString ('AuthnContextClassRef ' );
508- $ comp = $ spMetadata ->getOptionalValueValidate ('AuthnContextComparison ' , [
509- Constants::COMPARISON_EXACT ,
510- Constants::COMPARISON_MINIMUM ,
511- Constants::COMPARISON_MAXIMUM ,
512- Constants::COMPARISON_BETTER ,
513- ], Constants::COMPARISON_EXACT );
509+ $ comp = $ spMetadata ->getOptionalValueValidate (
510+ 'AuthnContextComparison ' ,
511+ array_column (Comparison::cases (), 'value ' ),
512+ Comparison::EXACT ->value ,
513+ );
514514 $ ar ->setRequestedAuthnContext (['AuthnContextClassRef ' => $ accr , 'Comparison ' => $ comp ]);
515515 }
516516
You can’t perform that action at this time.
0 commit comments