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();
RecipientSignatureToken recipientSignatureToken = new RecipientSignatureToken(
spVersion,
nestedPolicy
);
recipientSignatureToken.setOptional(SPUtils.isOptional(element));
recipientSignatureToken.setIgnorable(SPUtils.isIgnorable(element));
return recipientSignatureToken;
}