@Override
public Assertion build(Element element, AssertionBuilderFactory factory) throws IllegalArgumentException {
final SPConstants.SPVersion spVersion = SPConstants.SPVersion.getSPVersion(element.getNamespaceURI());
final Element nestedPolicyElement = SPUtils.getFirstPolicyChildElement(element);
final Policy nestedPolicy = nestedPolicyElement != null ? factory.getPolicyEngine().getPolicy(nestedPolicyElement) : new Policy();
SignatureToken signatureToken = new SignatureToken(
spVersion,
nestedPolicy
);
signatureToken.setOptional(SPUtils.isOptional(element));
signatureToken.setIgnorable(SPUtils.isIgnorable(element));
return signatureToken;
}