attemptedUsernames.addAll(candidateUsernames);
}
- String errorMessage = "No CollectionSpace account was found for " + StringUtils.join(attemptedUsernames, " / ") + ".";
+ String errorMessage = attemptedUsernames.size() == 0
+ ? "The SAML assertion did not contain a CollectionSpace username."
+ : "No CollectionSpace account found for " + StringUtils.join(attemptedUsernames, " / ") + ".";
throw(new UsernameNotFoundException(errorMessage));
}
public static final String BASE64_ENCODING = "BASE64";
public static final String BASE16_ENCODING = "HEX";
public static final String RFC2617_ENCODING = "RFC2617";
- private static char MD5_HEX[] = "0123456789abcdef".toCharArray();
private static final List<Object> DEFAULT_SAML_ASSERTION_USERNAME_PROBES = new ArrayList<>();
DEFAULT_SAML_ASSERTION_USERNAME_PROBES.add(new AssertionNameIDProbeType());
String[] attributeNames = new String[]{
+ "urn:oid:0.9.2342.19200300.100.1.3",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
"email",
"mail"
username. Defaults to:
<name-id />
+ <attribute name="urn:oid:0.9.2342.19200300.100.1.3" />
<attribute name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" />
<attribute name="email" />
<attribute name="mail" />