X-Git-Url: https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=blobdiff_plain;f=src%2Fedu%2Finternet2%2Fmiddleware%2Fshibboleth%2Fidp%2Fauthn%2FSaml2LoginContext.java;h=7173e9817a9c22a82b792d43cb35238f3b2d587f;hp=645ac954666633c760ad31a69d2bf582706c576b;hb=c33424f4c7fc30cf144fc940d82c5fb63aa6c1c5;hpb=2ee3989d88b937c29c36eb07e53d872ba457874a diff --git a/src/edu/internet2/middleware/shibboleth/idp/authn/Saml2LoginContext.java b/src/edu/internet2/middleware/shibboleth/idp/authn/Saml2LoginContext.java index 645ac95..7173e98 100644 --- a/src/edu/internet2/middleware/shibboleth/idp/authn/Saml2LoginContext.java +++ b/src/edu/internet2/middleware/shibboleth/idp/authn/Saml2LoginContext.java @@ -36,6 +36,7 @@ import org.opensaml.xml.io.Marshaller; import org.opensaml.xml.io.MarshallingException; import org.opensaml.xml.io.Unmarshaller; import org.opensaml.xml.io.UnmarshallingException; +import org.opensaml.xml.util.DatatypeHelper; import org.opensaml.xml.util.XMLHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -191,7 +192,7 @@ public class Saml2LoginContext extends LoginContext implements Serializable { List authnClasses = authnContext.getAuthnContextClassRefs(); if (authnClasses != null) { for (AuthnContextClassRef classRef : authnClasses) { - if (classRef != null) { + if (classRef != null && !DatatypeHelper.isEmpty(classRef.getAuthnContextClassRef())) { requestedMethods.add(classRef.getAuthnContextClassRef()); } } @@ -200,7 +201,7 @@ public class Saml2LoginContext extends LoginContext implements Serializable { List authnDeclRefs = authnContext.getAuthnContextDeclRefs(); if (authnDeclRefs != null) { for (AuthnContextDeclRef declRef : authnDeclRefs) { - if (declRef != null) { + if (declRef != null&& !DatatypeHelper.isEmpty(declRef.getAuthnContextDeclRef())) { requestedMethods.add(declRef.getAuthnContextDeclRef()); } }