type property is an string node, not an array
This commit is contained in:
parent
904c97aced
commit
c47a04aa8c
@ -25,7 +25,7 @@ public class Assertion extends Credential {
|
|||||||
protected Assertion(Resource resource, JsonNode data, String jwt, Map<String, SchemaKey> schemas) {
|
protected Assertion(Resource resource, JsonNode data, String jwt, Map<String, SchemaKey> schemas) {
|
||||||
super(ID, resource, data, jwt, schemas);
|
super(ID, resource, data, jwt, schemas);
|
||||||
|
|
||||||
ArrayNode typeNode = (ArrayNode)jsonData.get("type");
|
JsonNode typeNode = jsonData.get("type");
|
||||||
this.assertionType = Assertion.Type.valueOf(typeNode);
|
this.assertionType = Assertion.Type.valueOf(typeNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,15 +63,12 @@ public class Assertion extends Credential {
|
|||||||
Assertion,
|
Assertion,
|
||||||
Unknown;
|
Unknown;
|
||||||
|
|
||||||
public static Assertion.Type valueOf (ArrayNode typeArray) {
|
public static Assertion.Type valueOf (JsonNode typeNode) {
|
||||||
if(typeArray != null) {
|
if(typeNode != null) {
|
||||||
Iterator<JsonNode> iter = typeArray.iterator();
|
String value = typeNode.asText();
|
||||||
while(iter.hasNext()) {
|
if(value.equals("Assertion")) {
|
||||||
String value = iter.next().asText();
|
return Assertion;
|
||||||
if(value.equals("Assertion")) {
|
}
|
||||||
return Assertion;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return Unknown;
|
return Unknown;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user