Update IssuerProbe.java

The `issuer` is an instance of the `Profile` class which has an optional array of `IdentifierEntry` class, not `IdentityObject`. See https://github.com/1EdTech/openbadges-specification/blob/develop/ob_v3p0/common_credentials.lines#L129.
This commit is contained in:
Andy Miller 2023-05-15 05:33:21 +09:00 committed by GitHub
parent 3ba3c642a9
commit bed81d538d

View File

@ -42,9 +42,9 @@ public class IssuerProbe extends Probe<JsonNode> {
if (issuer.hasNonNull("otherIdentifier")) { if (issuer.hasNonNull("otherIdentifier")) {
List<JsonNode> otherIdentifiers = JsonNodeUtil.asNodeList(issuer.get("otherIdentifier")); List<JsonNode> otherIdentifiers = JsonNodeUtil.asNodeList(issuer.get("otherIdentifier"));
for (JsonNode otherIdentifier : otherIdentifiers) { for (JsonNode otherIdentifier : otherIdentifiers) {
// check that type contains "IdentityObject" // check that type contains "IdentifierEntry"
if (!JsonNodeUtil.asStringList(otherIdentifier.get("type")).contains("IdentityObject")) { if (!JsonNodeUtil.asStringList(otherIdentifier.get("type")).contains("IdentifierEntry")) {
return error("otherIdentifier in issuer is not of type \"IdentityObject\"", ctx); return error("otherIdentifier in issuer is not of type \"IdentifierEntry\"", ctx);
} }
} }
} }